Deplo
Integrations

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 URLdeplo deploy ./file.html is one command, one URL
  • CI/CD native — set DEPLO_KEY env var, run deplo deploy, done. No interactive auth
  • Pipe-friendly — deploy from stdin: echo '{"ok":true}' | deplo deploy -
  • Machine-readable output--json flag 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 scriptYou'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 commandsYou 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 whoami

deploy — Deploy files

deplo deploy <path> [options]
FlagDefaultDescription
--project <slug>Target project slug. Auto-created if missing.
--name <slug>Alias for --project
--type <type>static_filestatic_file | static_site | json_api
--ttl <duration>7d1h | 24h | 7d | 30d | forever
--entry <path>index.htmlEntry point for static_site
--jsonPrint JSON output (for scripting)
--openOpen 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 --json

Type 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 confirmation

projects create options

FlagDescription
--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

FlagDescription
--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_old456

leads — 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.json

Leads 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 --yes

The raw token value is shown only once at creation. Store it immediately.


Global flags

--help     Show command help
--version  Show CLI version

Environment variables

VariableDescription
DEPLO_KEYsk_live_ token for non-interactive auth
DEPLO_API_URLOverride the API base URL (default: https://api.deplo.sh)

What's next?

On this page