WordPress / WordPress/create-block-theme

Feature Request: WPCLI support

Open
#688 6 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement wp-cli
Dominant language
JavaScript
Stars
417
Forks
66
PR merge metrics
No merged PRs in 30d

Description

For developers who want to continually save their changes for version control purposes, doing this through the UI can be cumbersome. Beyond just "save", I think many of the commands in CBT could also have complementary WPCLI commands, like making a variation or exporting the theme.

"Save" Example

I've created a very crude, messy example of what it could look like to have a "save" command like this

wp cbt save or wp cbt save --saveTemplates et cetera

that a developer could run at any time to push their changes to their local theme or automate somehow.

This is not opened as a PR because it's not meant to be good code! It's just a janky working demo to see if the idea felt helpful in practice. A real PR would need to have some sort of abstraction layer and better loading of the class, right now I'm just duplicating code from the rest API endpoints.

https://github.com/bacoords/create-block-theme/tree/add/cli-export-command

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the add/cli-export-command demo and the existing REST API endpoints it duplicates. Define the initial WPCLI command scope and abstraction needed to support commands such as save, template variation, and theme export, then verify the commands can automate those workflows.

Written by the indexing model from the issue text.

Assessment

Tech stack
wordpress
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.