Command shape
Commands read as a noun and a verb: what you are managing, then what you are doing to it.wpc on its own to see what it manages, and a noun on its own to see its
verbs:
The v1 names (
wpc plugin:ls, wpc theme:push…) still work and will keep
working — see Upgrading to v2.API Key
list, info, push and build --push call the registry and need an API key,
passed with --api-key or the WPC_API_KEY environment variable
(manage API keys). Without one, they fail with exit code
2 before any network call. init, build (without --push), manifest and
self-update work without a key.
Global options
string
default:"https://registry.wp-content.io"
Provide custom repository API url
string
API Key to use
string
default:"human"
Response format:
human, plain or json. Any other value is rejected with
exit code 2.Output formats
default
Interactive when you run
wpc in a terminal: lists are browsed with the arrow
keys and details open in place. Falls back to plain automatically whenever
the CLI is not talking to a human.The static tables, even in a terminal. Use it when you want a readable output
you can scroll back through or copy.
Raw, machine-readable output. Never interactive, never decorated — this is the
format to use in scripts and CI.
Interactive mode
In a terminal,wpc plugin list, wpc theme list and the info commands are
navigable:
Pages are fetched only as you walk into them, and quitting leaves the page you
ended on printed in your terminal.
wpc plugin init is the one command that asks questions, because creating
something from nothing is what it is for. Press esc at any question
to abandon it — nothing is written until the last answer is in.
Every other command takes its arguments up front and says so when one is
missing: a wpc plugin info that guessed would just be wpc plugin list under
another name.
Interactive mode never interferes with automation. It switches itself off for
--output=json, piped output, CI, -n/--no-interaction, -q/--quiet and
--no-ansi. To force the static rendering in a terminal, use
--output=plain or set WPC_NO_TUI=1.Accent colour
The highlighted row, the active tab and the insertion point use the wp-content.io button colour. Everything else stays on your terminal’s own palette. SetWPC_ACCENT_COLOR to a hex value or an ANSI colour name to change it:
Scripting wpc
stdout is the answer, stderr is everything else. Errors, progress steps and notices go to stderr, so a command that fails writes nothing to stdout and a redirect never collects an error message where it expected a result.--output=json answers in JSON even when it fails, including for a
mistyped command or a missing argument. Errors come back as one object on
stdout:
code is the HTTP status when the failure came from the registry, and the exit
code otherwise; it is never 0. -q/--quiet silences the diagnostics, not the
JSON answer.
Exit codes
wpc, wpc list and wpc plugin also answer --output=json with the commands
they would have displayed: