Skip to main content
Version: 4.0 preview

Latest features: the command line

Version
4.0 preview
Updated
View markdown

A store you can operate from a deploy script. CBX ships a full configbox:* command suite — cache, migrations, charset, settings, tokens, types, strings, payments, product transfer, the MCP server — and it is the same suite on Joomla, WordPress and Magento 2, because the logic lives in one platform-agnostic core and each host adds only a thin wrapper.

php cli/joomla.php configbox:migrate --status # Joomla
wp configbox migrate --status # WordPress
bin/magento configbox:migrate --status # Magento 2

Back to Latest features


What it can do

AreaCommands
Cacheconfigbox:cache:clear
Schemaconfigbox:migrate (--status), configbox:migrate:unblock, configbox:charset
Settingsconfigbox:config:get / set / list, configbox:sysvar:get / set / list
APIconfigbox:token:mint / list / revoke, configbox:api:export
Typesconfigbox:generate-types (--check, --schema-drift)
Contentconfigbox:strings:purge
Productsconfigbox:product:export, configbox:product:import
Paymentsconfigbox:payments:poll
AIconfigbox:mcp, configbox:chatadvisor:analyze, configbox:chatadvisor:relay
Anything elseconfigbox:run-task — exercise any controller task headlessly, as any user
Yoursthe reserved custom namespace

Deploy gates, not just deploy steps

The commands that matter to a pipeline exit non-zero while work is pending, which is what turns them from a convenience into a gate:

  • configbox:migrate --status reports the installed version, the newest shipped version and every pending script — and applies nothing. It fails while anything is due, or the install is frozen, so a deploy fails loudly instead of the first visitor getting a 500.

  • configbox:charset --status fails while any table is off the target charset and collation.

  • configbox:generate-types --check fails on drift between the generated artifacts and the property definitions — a CI check that the committed types still describe the models.

  • Migrations: the versioned, idempotent scripts behind all of this

Recovery, not just happy paths

A failed migration freezes further updates on purpose, and the way out is a command rather than a database edit: configbox:migrate:unblock reports the block, supports --dry-run, and can skip a named version or a whole track once a human has decided that is right.

Settings with the UI's own validation

configbox:config:get / set / list read and write store settings through the same validation the settings form uses, per language where a setting is translatable — so a scripted change cannot put a value in the database that the admin screen would have refused. sysvar:* does the same for system variables.

Moving products from a script

Product transfer has a command-line half on both ends, so a staging → live promotion drops into a deploy step: configbox:product:export writes a package, configbox:product:import validates and imports it with --mode, --new-ids, --dry-run and a --force that must be asked for explicitly — a deploy step that has not said --force gets a refusal and a non-zero exit rather than a silent overwrite.

Your own commands, in the upgrade-safe layer

One file in the customization layer declares site-specific commands, and they appear under the reserved custom namespace next to the stock ones — a nightly order export for cron, a one-off data fix, an ERP import: anything you would otherwise script against the database directly, but with CBX booted and every helper at hand.

The contract, loader and runner are shared core, so the same commands file surfaces unchanged on all three hosts. On Joomla the declared commands additionally appear individually in list and get their own --help, with the bare dispatcher kept as the always-available fallback — a broken commands.php costs the site its custom commands and nothing else, configbox:migrate above all.

Two commands worth knowing about

  • configbox:run-task — run any controller task from the shell, as any user, with any output mode. It is how a scripted fix reaches application code instead of SQL, and it is the mechanism the chat advisor uses in-process to act on the visitor's behalf.
  • configbox:mcp — the MCP server over stdio, with a --read-only mode that withholds every write tool.

Next: the MCP server · the AI assistant · back to Latest features