Authentication
Manage your ZeroDeploy authentication with GitHub OAuth.
login
Authenticate with GitHub OAuth. Opens your browser for authentication and stores the JWT token locally.
zerodeploy login How It Works
- The CLI opens your browser to the GitHub OAuth page
- You authorize ZeroDeploy to access your GitHub account
- The CLI receives and stores a JWT token
- 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.
zerodeploy logout whoami
Display information about the currently logged-in user.
| Option | Description |
|---|---|
--json | Output as JSON for scripting |
zerodeploy whoami Example output:
Logged in as:
Username: johndoe
User ID: 019b1234-5678-...
Admin: No usage
Display your current usage and plan limits with visual progress bars.
zerodeploy usage | Option | Description |
|---|---|
--json | Output as JSON for scripting |
Example output:
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:
- Green - Under 70% usage
- Yellow - 70-90% usage
- Red - Over 90% usage
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.
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>
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]
| Option | Description |
|---|---|
--force | Skip confirmation prompts |
zerodeploy account delete Warning: This permanently deletes:
- Your account
- All organizations you own
- All sites and deployments
- All custom domains
- All deploy tokens
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
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:
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...]
| Argument | Description |
|---|---|
command | Command path to inspect (e.g., "org create") |
List All Commands
zerodeploy inspect Output:
{
"name": "zerodeploy",
"version": "0.1.3",
"commands": ["account", "deploy", "deployments", "domain", "form", ...]
} Inspect a Command Group
zerodeploy inspect org Output:
{
"name": "org",
"description": "Manage organizations",
"subcommands": ["create", "delete", "list"]
} Inspect a Specific Command
zerodeploy inspect deploy Output includes arguments, options, and examples:
{
"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:
- Discover available CLI commands without documentation
- Understand required and optional arguments
- Generate correct command invocations
- Parse JSON output from commands with
--jsonflag