Ship CLI
The command-line interface for ShipStatic. NPM / GIT
npm install -g @shipstatic/ship
Quick Start
ship ./dist
Your site is live.
Authentication
Requires an API Key. Pass it via flag, environment variable, or config file.
Commands
Deploy (shortcut)
ship <path>
ship <path> --label production --label v1.0
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
ship config # Setup wizard
ship completion install # Shell completions
Global Flags
| Flag | Description |
|---|---|
--api-key <key> |
API key |
--deploy-token <token> |
Single-use deploy token |
--config <file> |
Custom config file path |
--label <label> |
Add label (repeatable) |
--no-path-detect |
Disable path optimization |
--no-spa-detect |
Disable SPA detection |
--no-color |
Disable colored output |
--json |
JSON output |
--version |
Show version |
Configuration
Resolved in order of precedence:
- Command-line flags
- Environment variables (
SHIP_API_KEY,SHIP_API_URL) .shiprcfilepackage.json"ship"key
Run ship config to create or update your .shiprc interactively.