Command reference
Every clouzark command and its options.
Run clouzark <command> --help for the same information in your terminal. List commands accept --json.
Account
| Command | Does |
|---|---|
login [--token <pat>] [--api-url <url>] [--no-browser] | Log in through the browser, or with an access token |
logout | Revoke this machine's token and forget it |
whoami | Show the user, team, and API |
init [--no-agents] | Link hosting and database, and write a Clouzark section into AGENTS.md |
link [-p <ref>] [-y] / unlink | Link this directory to a hosting project |
mcp [--read-only] [-p <ref>] [--db <ref>] | Run as an MCP server for coding agents (AI agents) |
Web hosting
| Command | Does |
|---|---|
projects ls | List the team's hosting projects |
projects create [repo] [-n <name>] [--root <dir>] [--framework <f>] [--production-branch <b>] [--no-link] [--no-wait] | Import a GitHub repo as a project (this repo's origin by default), link it, and follow the first production build |
deploy [--prod] [-b <branch>] [--no-wait] | Build a branch's latest pushed commit and stream the log |
deploy --upload [--prod] | Build this directory as it is now |
deployments ls [-n <limit>] | Recent deployments |
logs [deploymentId] [-f] | Show or follow a build log (the latest deployment by default) |
promote <deploymentId> | Make a deployment the live production deployment |
rollback | Roll production back to the previous live deployment |
redeploy [deploymentId] [--no-wait] | Rebuild with the current environment variables |
cancel <deploymentId> | Cancel a queued deployment |
env ls | List variable names and targets |
env add <KEY> [value] [-t all|production|preview] | Add or update a variable (prompts for the value if omitted) |
env rm <KEY> [-t ...] | Remove a variable |
env pull [file] [-e production|preview] [-y] | Write resolved values to a file (.env.local by default) |
domains ls | List custom domains |
domains add <hostname> | Add a domain and print the DNS records to create |
domains verify <hostname> | Check DNS and issue the certificate |
domains rm <hostname> | Remove a domain |
Database
| Command | Does |
|---|---|
db ls | List database projects |
db create <name> [--no-link] | Create a database (and link it) |
db delete <ref> [-y] | Permanently delete a database |
db link [--db <ref>] | Link this directory to a database |
db query [sql] [-f file] [--json] | Run SQL from an argument, a file, or stdin |
db url [--json] | Print the connection string |
db keys [--json] | Print the REST URL, anon key, and service key |
db dump [-f file] [--data-only|--full] | Dump with your local pg_dump (schema only by default) |
migration new <name> | Create clouzark/migrations/<timestamp>_<name>.sql |
migration ls | Compare local migrations with the applied ones |
db push [--dry-run] [-y] | Apply pending migrations |
gen types typescript [-o file] | Generate TypeScript types for the public schema |