CLI reference
Konten ini belum tersedia dalam bahasa Anda.
bunx mailriz-cli@latest <command>Running it with no command starts setup. An unrecognised command prints the
list rather than a bare error.
Deploys everything: D1, R2, the Worker, the custom domain, Email Routing, and optionally Cloudflare Access. Interactive.
Safe to re-run — it reuses an existing mailriz database and buckets rather
than creating duplicates. Use it to change the auth mode, or to repair an
installation whose Access application is missing.
Writes ~/.mailriz/config.json (mode 600).
status
Section titled “status”Prints the installation and probes it:
dashboard https://inbox.yourdomain.cominbox anything@yourdomain.comadmin you@example.comauth Cloudflare Accessworker mailrizd1 f4ccc0eeapi token not savedinstalled 16/08/2026, 09:12✔ health respondingRead-only. Never prints the token’s value, only whether one is stored.
update
Section titled “update”Moves the Worker to the latest release. Applies migrations first, then redeploys, then repairs alias domains. D1 and R2 data are untouched.
Refuses to run on an access-mode installation with no recorded audience tag, because redeploying would lock the dashboard out. See Updating.
destroy
Section titled “destroy”Deletes the Worker, the database, the buckets, and the local config. Requires typing the dashboard hostname to confirm. Leaves Email Routing rules and the Access application in place. See Removing MailRiz.
Also --help, -h. Prints the command list.
Authentication
Section titled “Authentication”update and destroy need the API token. They take it from, in order:
- what you type at the prompt,
- the token saved during setup, if you opted in,
$CLOUDFLARE_API_TOKEN.
Pressing Enter uses the first fallback available; the prompt names which one. A too-short entry is rejected even when a fallback exists — a typo should not silently deploy with a different token than the one you were typing.
Where state lives
Section titled “Where state lives”~/.mailriz/config.json, mode 600: account and zone ids, worker name,
hostnames, database and bucket names, auth mode, and the API token only if you
chose to save it.
Deleting the file does not affect the deployment; it only makes the CLI forget
where it is. Re-running setup recreates it.