ShipStatic Docs llms.txt llms-full.txt

Ship CLI

The command-line interface for ShipStatic. NPM / GIT

Quick Start

Zero install — deploy in one line:

npx -y @shipstatic/ship ./dist

Or install once and use repeatedly:

npm install -g @shipstatic/ship
ship ./dist

Your site is live in seconds.

Public deploys

Without authentication, deployments go to the public account and expire in 3 days. The response includes a claim URL — visit it while signed in at my.shipstatic.com to transfer the deployment to your account and keep it permanently.

$ npx -y @shipstatic/ship ./dist --json
{
  "deployment": "happy-cat-abc1234",
  "url": "https://happy-cat-abc1234.shipstatic.com",
  "claim": "https://my.shipstatic.com/claim/...",
  "expires": "..."
}

Authentication

Anonymous deploys work without authentication. For permanent deploys and management operations, pass an API Key (or a deploy token) via flag, environment variable, or config file.

Commands

Deploy (shortcut)

ship <path>
ship <path> --label production --label v1.0
ship <path> --password 'hunter2!'
ship <path> --no-spa-detect --no-path-detect

Deployments

ship deployments upload <path>
ship deployments list
ship deployments get <id>
ship deployments set <id> --label production
ship deployments remove <id>

Domains

ship domains set <name>                   # Reserve
ship domains set <name> <deployment>      # Link or switch
ship domains set <name> --label prod      # Label
ship domains list
ship domains get <name>
ship domains validate <name>              # Pre-flight check
ship domains verify <name>                # Trigger DNS verification
ship domains remove <name>

Tokens

ship tokens create --ttl 3600 --label ci
ship tokens list
ship tokens remove <token>

Account

ship whoami                               # Current account
ship account get                          # Same as whoami
ship ping                                 # API connectivity

Setup

ship config                               # Interactive .shiprc setup
ship completion install                   # Install shell completions (bash, zsh, fish)
ship completion uninstall                 # Remove shell completions

Global Flags

Apply to every command.

Flag Description
--api-key <key> API key
--deploy-token <token> Single-use deploy token
--api-url <url> API URL (for development)
--config <file> Custom config file path
--json JSON output
-q, --quiet Output only the resource identifier (compose with pipes)
--no-color Disable colored output
--help Show help
--version Show version

Deploy Flags

Apply to ship <path> and ship deployments upload.

Flag Description
--label <label> Add label (repeatable)
--password <pwd> Protect the deployment with a password (6–128 characters)
--no-path-detect Disable path optimization
--no-spa-detect Disable SPA detection

Composability

-q outputs only the identifier so you can pipe between commands:

ship ./dist -q | ship domains set www.example.com

--json returns the full structured response — useful for scripts:

URL=$(ship ./dist --json | jq -r '.url')

Configuration

Resolved in order of precedence:

  1. Command-line flags
  2. Environment variables (SHIP_API_KEY, SHIP_API_URL, SHIP_PASSWORD)
  3. .shiprc file
  4. package.json "ship" key

Run ship config to write .shiprc interactively — it prompts for the API key (and optional API URL) and saves them to your home directory.

SHIP_PASSWORD is a CLI-only convenience for --password (e.g. CI secrets). Empty values are treated as unset — an unset CI secret never accidentally protects a deploy.