CLI Reference
Complete reference for the deplo command-line interface.
The deplo CLI is the fastest way for humans and scripts to deploy files to deplo.sh.
Why use the CLI?
The CLI is the right choice when you need shell-level control over deployments — whether you're a human at a terminal, a CI/CD pipeline, or a shell-capable AI agent:
- Fastest path to a URL —
deplo deploy ./file.htmlis one command, one URL - CI/CD native — set
DEPLO_KEYenv var, rundeplo deploy, done. No interactive auth - Pipe-friendly — deploy from stdin:
echo '{"ok":true}' | deplo deploy - - Machine-readable output —
--jsonflag for scripting and automation
When to use the CLI vs. other methods:
| Use the CLI when... | Use something else when... |
|---|---|
| You're in a terminal or shell script | You're inside a TypeScript process → use the SDK |
| You're setting up CI/CD (GitHub Actions, etc.) | You're using Claude or Cursor → use the MCP server |
| Your agent can execute shell commands | You need a language-agnostic HTTP call → use the REST API |
deplo.sh vs. traditional deployment
# ❌ Traditional: create repo, push, configure, wait for build...
git init && git add . && git commit -m "deploy"
git remote add origin https://github.com/...
git push origin main
# Then go to Vercel/Netlify dashboard, import repo, configure build...
# ✅ deplo.sh: one command
deplo deploy ./dist --project my-app --type static_site
# → https://my-app.deplo.sh (live in < 5 seconds)Installation
npm install -g @deplo/cli
# or use without installing
npx @deplo/cli <command>Authentication
The CLI authenticates exclusively with API tokens (sk_live_...). Create one at app.deplo.sh/dashboard/tokens.
# Authenticate with your API token
deplo login --token sk_live_xxxxxxxxxxxxxxxx
# Or set an env var for one-off usage (no login required)
export DEPLO_KEY=sk_live_xxxxxxxxxxxxxxxx
# Logout (clears stored token)
deplo logout
# Show current session
deplo whoamideploy — Deploy files
deplo deploy <path> [options]| Flag | Default | Description |
|---|---|---|
--project <slug> | — | Target project slug. Auto-created if missing. |
--name <slug> | — | Alias for --project |
--type <type> | static_file | static_file | static_site | json_api |
--ttl <duration> | 7d | 1h | 24h | 7d | 30d | forever |
--entry <path> | index.html | Entry point for static_site |
--json | — | Print JSON output (for scripting) |
--open | — | Open URL in browser after deploy |
Examples
# Deploy a single HTML file
deplo deploy report.html --project weekly-report
# Deploy a built directory as a static site
deplo deploy ./dist --project my-app --type static_site --ttl forever
# Deploy from stdin (pipe JSON data)
echo '{"status":"ok"}' | deplo deploy - --project status-check --type json_api
# Use token auth (no login required)
DEPLO_KEY=sk_live_xxx deplo deploy ./dist --project my-app
# Machine-readable output
deplo deploy report.html --project weekly-report --jsonType auto-detection: If you deploy a directory and omit --type, the CLI selects static_site automatically.
projects — Manage projects
deplo projects list [--json]
deplo projects create <name> [--slug <slug>] [--type <type>] [--ttl <ttl>] [--gate <gate>] [--password <pw>] [--json]
deplo projects get <slug|id> [--json]
deplo projects update <slug|id> [--name <name>] [--domain <domain>] [--gate <gate>] [--password <pw>] [--ttl <ttl>] [--json]
deplo projects verify-domain <slug|id> [--json]
deplo projects delete <slug|id> [--yes]deplo projects list
deplo projects create "Weekly Sales Report" --slug weekly-report --type static_file
deplo projects get weekly-report
# Create a password-protected project
deplo projects create "Internal Report" --slug internal-report --gate password --password s3cr3t
# Create a project that captures visitor emails (email gate / lead capture)
deplo projects create "Marketing Landing" --slug marketing-landing --gate email
# Rename a project
deplo projects update weekly-report --name "Monthly Sales Report"
# Enable password protection on an existing project
deplo projects update weekly-report --gate password --password s3cr3t
# Switch to email gate (collect visitor emails as leads)
deplo projects update weekly-report --gate email
# Remove access gate (make project public again)
deplo projects update weekly-report --gate none
# Attach a custom domain, then verify after adding CNAME → proxy.deplo.sh
deplo projects update weekly-report --domain reports.acme.com
deplo projects verify-domain weekly-report
# Remove the custom domain
deplo projects update weekly-report --domain ""
deplo projects delete weekly-report --yes # skip confirmationprojects create options
| Flag | Description |
|---|---|
--slug <slug> | URL-safe identifier for the project (auto-generated from name if omitted) |
--type <type> | static_file | static_site | json_api (default: static_file) |
--ttl <ttl> | Default TTL for new deployments: 1h | 24h | 7d | 30d | forever |
--gate <gate> | Access gate: none (public) | password (password-protected) | email (lead capture) |
--password <pw> | Required when --gate password. Password visitors must enter to access the project. |
projects update options
| Flag | Description |
|---|---|
--name <name> | New display name for the project |
--domain <domain> | Custom domain to attach (e.g. reports.acme.com). Pass "" to remove. |
--gate <gate> | Change access gate: none | password | email. Pass none to make project public. |
--password <pw> | Set or update gate password (when --gate password). Pass "" to remove. |
--ttl <ttl> | Default TTL for new deployments: 1h | 24h | 7d | 30d | forever |
deployments — Manage deployment versions
deplo deployments list <project-slug|id> [--json]
deplo deployments promote <project-slug|id> <deployment-id> [--json]
deplo deployments archive <project-slug|id> <deployment-id> [--json]# List all versions
deplo deployments list weekly-report
# Roll back to a previous version
deplo deployments promote weekly-report dep_abc123
# Archive an old deployment
deplo deployments archive weekly-report dep_old456leads — View gate leads
When a project uses the email gate, visitor emails are captured as leads. Use the leads commands to view and export them.
deplo leads list <project-slug|id> [--page <n>] [--limit <n>] [--search <query>] [--json]
deplo leads export <project-slug|id> [--format csv|json] [--output <file>]# List leads for a project (20 per page by default)
deplo leads list marketing-landing
# Search for a specific email
deplo leads list marketing-landing --search "acme.com"
# Export all leads as CSV
deplo leads export marketing-landing --format csv --output leads.csv
# Export as JSON
deplo leads export marketing-landing --format json --output leads.jsonLeads are captured whenever a visitor submits their email through the gate page. Each lead record contains the email address and the timestamp it was captured.
tokens — Manage API tokens
deplo tokens list [--project <projectId>] [--json]
deplo tokens create <name> [--scopes <scopes>] [--project <projectId>] [--expires <date>] [--json]
deplo tokens revoke <token-id> [--yes]deplo tokens list
deplo tokens create "CI Deploy" --scopes deploy
deplo tokens create "Agent Token" --scopes deploy --project proj_abc123
deplo tokens create "Temp Token" --expires 2026-12-31
deplo tokens revoke tok_abc123 --yesThe raw token value is shown only once at creation. Store it immediately.
Global flags
--help Show command help
--version Show CLI versionEnvironment variables
| Variable | Description |
|---|---|
DEPLO_KEY | sk_live_ token for non-interactive auth |
DEPLO_API_URL | Override the API base URL (default: https://api.deplo.sh) |
What's next?
- Quickstart — deploy your first file in under 60 seconds
- REST API — the HTTP API the CLI uses under the hood
- What is deplo.sh? — platform overview and design principles
- Deploy with Cursor — use the MCP server for AI-assisted deployment
- Projects & Deployments — managing versions and rollbacks