# Latest features: the command line

> What's new on the command line — the configbox suite on Joomla, WordPress and Magento 2, deploy gates that exit non-zero, and a reserved namespace for site-specific commands.

Source: CBX documentation, version 4.0 preview (unreleased). Canonical page: https://docs.configbox.at/docs/4.0-preview/features/latest/cli. Last updated 2026-08-25.

---
**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.

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

← [Back to Latest features](https://docs.configbox.at/docs/4.0-preview/features/latest/)

---

## What it can do

| Area | Commands |
|---|---|
| **Cache** | `configbox:cache:clear` |
| **Schema** | `configbox:migrate` (`--status`), `configbox:migrate:unblock`, `configbox:charset` |
| **Settings** | `configbox:config:get` / `set` / `list`, `configbox:sysvar:get` / `set` / `list` |
| **API** | `configbox:token:mint` / `list` / `revoke`, `configbox:api:export` |
| **Types** | `configbox:generate-types` (`--check`, `--schema-drift`) |
| **Content** | `configbox:strings:purge` |
| **Products** | `configbox:product:export`, `configbox:product:import` |
| **Payments** | `configbox:payments:poll` |
| **AI** | `configbox:mcp`, `configbox:chatadvisor:analyze`, `configbox:chatadvisor:relay` |
| **Anything else** | `configbox:run-task` — exercise any controller task headlessly, as any user |
| **Yours** | the reserved `custom` namespace |

- [Every command in detail, with arguments, options and exit codes](https://docs.configbox.at/docs/4.0-preview/technical/cli_commands#1-the-commands)

## 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](https://docs.configbox.at/docs/4.0-preview/technical/migrations)

## 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.

- [`configbox:migrate:unblock`](https://docs.configbox.at/docs/4.0-preview/technical/cli_commands#1-the-commands) ·
  [when and how to use it](https://docs.configbox.at/docs/4.0-preview/technical/migrations)

## 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.

- [The settings commands](https://docs.configbox.at/docs/4.0-preview/technical/cli_commands#1-the-commands) ·
  [what each setting means](https://docs.configbox.at/docs/4.0-preview/functional/configuration)

## 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.

- [Product transfer, both halves](https://docs.configbox.at/docs/4.0-preview/technical/product_transfer#7b-the-other-two-ways-in-and-the-one-rule-they-share) ·
  [the feature](https://docs.configbox.at/docs/4.0-preview/features/latest/catalog-operations)

## 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.

- [Custom CLI commands: the contract, a worked example, the conventions](https://docs.configbox.at/docs/4.0-preview/customization/custom_cli_commands)
- [The architecture, and why dispatch is lazy](https://docs.configbox.at/docs/4.0-preview/technical/cli_commands#5-reuse-on-wordpress--magento)

## 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](https://docs.configbox.at/docs/4.0-preview/features/latest/ai-assistant) uses in-process to act on the visitor's behalf.
- **`configbox:mcp`** — the [MCP server](https://docs.configbox.at/docs/4.0-preview/features/latest/mcp-server) over stdio, with a `--read-only` mode that
  withholds every write tool.

---

*Next: [the MCP server](https://docs.configbox.at/docs/4.0-preview/features/latest/mcp-server) · [the AI assistant](https://docs.configbox.at/docs/4.0-preview/features/latest/ai-assistant) ·
[back to Latest features](https://docs.configbox.at/docs/4.0-preview/features/latest/)*
