CLI Reference

Complete reference for all ZeroDeploy CLI commands.

Installation

npm install -g @zerodeploy/cli
yarn global add zerodeploy
pnpm add -g zerodeploy
bun add -g zerodeploy

Command Overview

CommandDescription
loginAuthenticate with GitHub OAuth
logoutClear stored authentication token
whoamiDisplay current logged-in user
usageShow current usage and plan limits
org listList your organizations
org createCreate a new organization
org deleteDelete an organization
site listList all your sites
site createCreate a new site
site statsView site traffic analytics
site linkLink site to GitHub repository
site unlinkUnlink site from GitHub repository
site deleteDelete a site and all deployments
deployDeploy a directory to a site
deployments listList deployment history
deployments showView deployment details
deployments logsView deployment finalize logs
rollbackRoll back to a previous deployment
deploy promotePromote a preview deployment to production
domain addAdd a custom domain to a site
domain verifyVerify ownership of a custom domain
domain listList custom domains for a site
domain removeRemove a custom domain from a site
domain redirectSet redirect mode for a custom domain
token createCreate an API token (PAT or deploy token)
token listList API tokens
token deleteDelete an API token
form listList forms for a site
form submissionsView recent form submissions
form exportExport form submissions as CSV
form deleteDelete a form and all submissions
form notifyConfigure email notifications for a form
initCreate zerodeploy.json config file
account emailSet your notification email
account deletePermanently delete your account
billingShow subscription status and billing information
billing usageShow current usage and estimated costs
updateUpdate CLI to the latest version
inspectOutput command metadata as JSON (for LLM/automation)

Global Options

OptionDescription
--helpShow help for any command
--versionShow CLI version
--jsonOutput as JSON (supported on most data-returning commands)

Configuration

Token Storage

Authentication tokens are stored at ~/.zerodeploy/token.

Environment Variables

VariableDescription
ZERODEPLOY_TOKENOverride token (for CI/CD). Takes precedence over file-based token.
ZERODEPLOY_ORGDefault organization slug. Overridden by --org flag.
ZERODEPLOY_SITEDefault site slug. Overridden by --site flag.