Skip to content
The mz CLI The on-VPS mz command — a power-user and AI front-end to the same native engine the dashboard drives; discovery with mz commands, the invocation contract and known limits.

The mz CLI

MZPanel is dashboard-first, but every server also ships a command-line front-end: mz. SSH into a box (or open the web terminal) and drive it directly with commands like mz sites, mz php list or mz stack list --json, the same way the dashboard does. This is the “power-user” half of MZPanel’s two operating modes: click in the panel, or type on the box.

/usr/local/bin/mz is a symlink to the mzagent binary. Invoked as mz, it routes your arguments into the same native Go engine the panel’s jobs use. There is no separate implementation and no Bash, so mz reaches the operations the panel runs on a box: about 390 commands in 53 domains at the time of writing. mz commands always shows the live list.

mz only ever operates its own box. Fleet-level things (other servers, DNS provider records, uptime monitors, backup schedules, team, billing) live on the control plane. Use the API or MCP for those.

Terminal window
mz --help # domains and common commands
mz commands # the full machine-readable catalog (JSON)
mz commands stack # one domain
mz version

mz commands prints {schema, source, contract, gaps, domains[]}. Each entry in domains[].commands[] is shaped like this:

{ "id": "stack.deploy",
"argv": "stack create <name> --domain <d> [--port N] --compose-b64 <base64(compose)> --json",
"rw": "W", "tier": "Pro", "secret_in_args": true }
  • rw: R (read) or W (write).
  • stream: true: the command emits live output and an exit code, not one JSON document.
  • secret: true: the output contains a credential or token.
  • secret_in_args: true: an argument carries a credential.
  • tier: the plan the panel requires for it. The local path does not check it.
  • notes: caveats such as non-native flags.
  1. Always pass an action. Use mz php list, not mz php. A domain that is both a write domain and a cached read rejects the bare form.
  2. Append --json and parse stdout as one JSON object or array, except for commands marked stream (deploys, stack up/down/restart, cron run, site limits clear, site pull, …), which print log lines and exit with the job’s code. Read the exit code for success.
  3. Base64 payload flags. --b64, --compose-b64, --spec, --config-b64 and --data take base64-encoded (or inline-JSON) payloads, not literal text.
  4. Secret output. Commands marked secret (database admin-UI logins, env listings with --reveal, LiteLLM keys, WordPress login URLs) print credentials. Handle them with care.
  5. Root, local trust. On the box there is no plan check, no per-action RBAC and no audit log, unlike the panel. Treat mz as “you already have root on this machine.”
Terminal window
mz sites --json # every site on the box
mz site info example.com --json # one site
mz cron add --schedule "0 3 * * *" --command "/usr/local/bin/report" --user www-data --json
mz cron run <id> # streams output, exits with the job's code
mz logs site:example.com --lines 200 --json # one site's logs

An AI agent with a shell on the VPS should run mz commands once, use --json everywhere, and treat the W commands as production changes: same rules as the safe operating rules. For anything that spans servers, or when the agent runs on your own machine rather than on the box, connect over MCP instead. It’s scoped, audited and fleet-wide.

  • Sealed credentials. Offsite backups (backup v2 … to an rclone or SFTP destination, remote backups with credentials) and shared-certificate install need credentials that the panel injects over the WebSocket. A bare local mz doesn’t have them, so drive those from the dashboard. Local backups (mz backup full|db|all) work standalone.
  • Not native anywhere yet: waf install (use the modsecurity extension), pgadmin reload-servers.
  • Not argv commands: the terminal PTY, the file manager RPC, the HTTP-over-WS proxy (phpMyAdmin, pgAdmin, webmail) and chunked binary transfer are separate channels, not mz commands.
  • Human pretty-printing was dropped. Always pass --json.