Authentication

Manage your ZeroDeploy authentication with GitHub OAuth.

login

Authenticate with GitHub OAuth. Opens your browser for authentication and stores the JWT token locally.

bash
zerodeploy login

How It Works

  1. The CLI opens your browser to the GitHub OAuth page
  2. You authorize ZeroDeploy to access your GitHub account
  3. The CLI receives and stores a JWT token
  4. Token is saved to ~/.zerodeploy/token

The token is valid for 30 days. Run login again to refresh it.

logout

Clear the stored authentication token.

bash
zerodeploy logout

whoami

Display information about the currently logged-in user.

OptionDescription
--jsonOutput as JSON for scripting
bash
zerodeploy whoami

Example output:

text
Logged in as:
  Username: johndoe
  User ID:  019b1234-5678-...
  Admin:    No

usage

Display your current usage and plan limits with visual progress bars.

bash
zerodeploy usage
OptionDescription
--jsonOutput as JSON for scripting

Example output:

text
Plan: Pro

Account Usage:
  Total Sites              ██████░░░░░░░░░░░░░░ 3/10 (30%)
  Deployments (month)      ██░░░░░░░░░░░░░░░░░░ 120/1,000 (12%)

Plan Limits:
  Sites per org:           10
  Deployments per day:     500
  Deployments per month:   1,000
  Max deployment size:     100MB
  Storage per org:         10GB
  Deploy tokens per site:  10
  Domains per site:        3
  API requests/min:        120
  Deploy requests/min:     30

Organization Usage:

  my-company:
  Sites                    ████████░░░░░░░░░░░░ 4/10 (40%)
  Deployments (month)      ██░░░░░░░░░░░░░░░░░░ 100/1,000 (10%)
    Storage:                 2.5GB / 10GB

The progress bars are color-coded:

Token Storage

The JWT token is stored at ~/.zerodeploy/token. This file contains only the raw token string.

Environment Variable Override

For CI/CD environments, you can set the ZERODEPLOY_TOKEN environment variable instead of using file-based authentication. The environment variable takes precedence over the file-based token.

bash
export ZERODEPLOY_TOKEN=your-token-here
zerodeploy deploy

For GitHub Actions, use deploy tokens instead of your personal JWT.

account email

Set or update your email address for deployment notifications.

zerodeploy account email <email>

bash
zerodeploy account email you@example.com

You will receive deployment notifications at this email address.

account delete

Permanently delete your ZeroDeploy account and all associated data. This action cannot be undone.

zerodeploy account delete [options]

OptionDescription
--forceSkip confirmation prompts
bash
zerodeploy account delete

Warning: This permanently deletes:

You will be asked to type "delete my account" and confirm before deletion proceeds.

update

Update the ZeroDeploy CLI to the latest version from npm.

zerodeploy update

bash
zerodeploy update

This command checks the npm registry for the latest version and updates your global installation. If you're already on the latest version, it will let you know.

The CLI also checks for updates automatically after each command (once per day) and shows a banner if a new version is available.

Disable Update Checks

To disable the automatic update check (e.g., in scripts), set the environment variable:

bash
export ZERODEPLOY_NO_UPDATE_CHECK=1

Update checks are also automatically skipped in CI environments (when CI is set).

inspect

Output command metadata as JSON for LLM and automation use. This command enables AI assistants and scripts to programmatically discover and use CLI commands.

zerodeploy inspect [command...]

ArgumentDescription
commandCommand path to inspect (e.g., "org create")

List All Commands

bash
zerodeploy inspect

Output:

json
{
  "name": "zerodeploy",
  "version": "0.1.3",
  "commands": ["account", "deploy", "deployments", "domain", "form", ...]
}

Inspect a Command Group

bash
zerodeploy inspect org

Output:

json
{
  "name": "org",
  "description": "Manage organizations",
  "subcommands": ["create", "delete", "list"]
}

Inspect a Specific Command

bash
zerodeploy inspect deploy

Output includes arguments, options, and examples:

json
{
  "name": "deploy",
  "description": "Deploy a site",
  "usage": "zerodeploy deploy [site]",
  "arguments": [
    { "name": "site", "description": "Site slug", "required": false }
  ],
  "options": [
    { "name": "org", "short": "o", "description": "Organization slug", ... },
    { "name": "build", "short": "b", "description": "Run build command first", "type": "boolean" },
    { "name": "json", "description": "Output as JSON", "type": "boolean" }
  ],
  "examples": ["zerodeploy deploy", "zerodeploy deploy web --org acme --dir ./dist"]
}

Use Case: AI Assistants

The inspect command enables AI assistants (like Claude, GPT, etc.) to: