@zerodeploy/cli
v0.1.39
Published
Zero-friction deployment CLI for frontend SPAs
Downloads
254
Readme
ZeroDeploy CLI
Command-line interface for deploying static sites and SPAs to ZeroDeploy.
Installation
npm install -g @zerodeploy/cliOr use directly with npx:
npx @zerodeploy/cli deployQuick Start
# 1. Login with GitHub
zerodeploy login
# 2. Create an organization
zerodeploy org create "My Company"
# 3. Create a site and initialize config
zerodeploy site create "My Website" --org my-company
zerodeploy init --org my-company --site my-website
# 4. Deploy your site
zerodeploy deploy --dir ./distYour site will be live at https://my-website.zerodeploy.app. With zerodeploy.json in place, all commands resolve org/site automatically — no flags needed.
Commands
| Command | Description |
|---------|-------------|
| login | Authenticate with GitHub OAuth |
| logout | Clear stored authentication token |
| whoami | Display current logged-in user |
| usage | Show current usage and plan limits |
| org list/create/delete | Manage organizations |
| site list/create/delete | Manage sites |
| site stats | View site traffic analytics |
| deploy | Deploy a directory to a site |
| deploy promote | Promote a preview deployment to production |
| deployments list/show/logs | View deployment history and logs |
| rollback | Roll back to a previous deployment |
| domain add/verify/list/remove | Manage custom domains |
| domain redirect | Set www/apex redirect mode |
| token create/list/delete | Manage API and deploy tokens |
| form list/export/delete/notify | Manage form submissions |
| billing usage/bills/adjustments | View billing information |
| account email/delete | Manage account settings |
| init | Create zerodeploy.json config file |
| update | Update CLI to the latest version |
| inspect | Output command metadata as JSON |
Most data-returning commands support --json for machine-readable output.
For detailed documentation on each command, see the CLI Reference.
Configuration
Create a zerodeploy.json in your project root:
zerodeploy init --org my-company --site my-websiteThen deploy with just:
zerodeploy deploy # deploy only
zerodeploy deploy --build # build + deployCI/CD
For GitHub-based CI/CD, use the GitHub App integration which auto-deploys on push and creates preview deployments for PRs — no configuration needed.
For other CI/CD systems, create a deploy token and set the ZERODEPLOY_TOKEN environment variable:
zerodeploy token create "CI Deploy" --org my-company
# Then in your CI pipeline (org/site resolved from zerodeploy.json or env vars):
ZERODEPLOY_ORG=my-org ZERODEPLOY_SITE=my-site npx @zerodeploy/cli deployUpdating
zerodeploy updateThe CLI checks for updates automatically after each command (once per day) and shows a banner if a new version is available.
Publishing
Releases are automated via GitHub Actions with npm Trusted Publishing.
# 1. Bump version in package.json
# 2. Commit and tag
git commit -am "cli: v0.1.16"
git tag cli-v0.1.16
git push && git push --tagsThe tag triggers the publish-cli.yml workflow which builds and publishes to npm. No tokens needed.
