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.
What mz is
Section titled “What mz is”/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.
Discover commands
Section titled “Discover commands”mz --help # domains and common commandsmz commands # the full machine-readable catalog (JSON)mz commands stack # one domainmz versionmz 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) orW(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.
The invocation contract
Section titled “The invocation contract”- Always pass an action. Use
mz php list, notmz php. A domain that is both a write domain and a cached read rejects the bare form. - Append
--jsonand parse stdout as one JSON object or array, except for commands markedstream(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. - Base64 payload flags.
--b64,--compose-b64,--spec,--config-b64and--datatake base64-encoded (or inline-JSON) payloads, not literal text. - Secret output. Commands marked
secret(database admin-UI logins, env listings with--reveal, LiteLLM keys, WordPress login URLs) print credentials. Handle them with care. - Root, local trust. On the box there is no plan check, no per-action RBAC and no
audit log, unlike the panel. Treat
mzas “you already have root on this machine.”
mz sites --json # every site on the boxmz site info example.com --json # one sitemz cron add --schedule "0 3 * * *" --command "/usr/local/bin/report" --user www-data --jsonmz cron run <id> # streams output, exits with the job's codemz logs site:example.com --lines 200 --json # one site's logsFor AI agents on the box
Section titled “For AI agents on the box”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.
Known limits
Section titled “Known limits”- 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 localmzdoesn’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 themodsecurityextension),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
mzcommands. - Human pretty-printing was dropped. Always pass
--json.
Related
Section titled “Related”- mz command catalog: the domains.
- Agent binary (mzagent): the daemon side of the same binary.
- Job kinds: the panel’s view of the same engine.