CLI Reference
Complete reference for all Shipyard CLI commands.
Global flags
| Flag | Description |
|---|---|
--api-url <URL> | Override the API server URL (default: https://api.shipyard.wtf) |
--help | Show help for any command |
--version | Print version |
The API URL can also be set via the SHIPYARD_API_URL environment variable.
Authentication
shipyard login
Authenticate with Shipyard. Opens a browser window to sign in via Privy, then paste the API token back into the terminal. Credentials are stored in ~/.shipyard/auth.json.
shipyard login$ shipyard login
Opening browser for authentication...
Paste your API token: shp_abc123...
✓ Logged in as jeremy@example.comshipyard logout
Remove stored credentials from ~/.shipyard/auth.json.
shipyard logout$ shipyard logout
✓ Logged outshipyard whoami
Display the currently authenticated user.
shipyard whoami$ shipyard whoami
Email: jeremy@example.com
Wallet: 0xABC...123
Plan: freeProject management
shipyard init
Initialize a Shipyard project in the current directory. Detects the framework, prompts for a project name, creates the project on the API, and writes a shipyard.json config file.
shipyard init$ shipyard init
Detected framework: astro
Project name (my-app): my-app
✓ Created project: my-app
✓ Wrote shipyard.jsonshipyard status
Show the current project status from the local shipyard.json file.
shipyard status$ shipyard status
Project: my-app
Framework: astro
Preview: https://my-app.shipyard.wtfshipyard projects list
List all projects for the authenticated user.
shipyard projects list$ shipyard projects list
NAME FRAMEWORK STATUS REGION
my-app astro active iad
my-api hono active iad
landing next active iadshipyard projects create
Create a new project without initializing locally.
shipyard projects create <name>$ shipyard projects create my-new-app
✓ Created project: my-new-appDeployment
shipyard deploy
Build and deploy the current project. Runs the build command, packages the output directory, uploads the artifact to S3, and provisions a machine. Captures git info (commit SHA, message, branch) automatically.
shipyard deploy [flags]| Flag | Description |
|---|---|
| --prod | Deploy directly to production |
| --skip-build | Skip the build step (use existing output) |
$ shipyard deploy
Building with `pnpm build`...
Packaging artifact (2.4 MB)...
Uploading to S3...
Provisioning Fly Machine (iad)...
✓ Deployed! https://xk9m2p.shipyard.wtf
$ shipyard deploy --prod
...
✓ Deployed to production! https://my-app.shipyard.wtfshipyard promote
Promote a preview deployment to production. The deployment ID is the subdomain from the preview URL.
shipyard promote <deployment-id>$ shipyard promote xk9m2p
✓ Promoted xk9m2p to production
Live at https://my-app.shipyard.wtfshipyard rollback
Roll back production to the previous deployment.
shipyard rollback$ shipyard rollback
Rolling back to deployment v3...
✓ Rolled back to v3Domains
shipyard domains add
Add a custom domain to the current project. Returns a TXT record for DNS verification.
shipyard domains add <domain>$ shipyard domains add app.example.com
Add this TXT record to your DNS:
_shipyard.app.example.com → shipyard-verify=abc123...
Then run: shipyard domains verify app.example.comshipyard domains list
List all domains for the current project.
shipyard domains list$ shipyard domains list
DOMAIN STATUS SSL
app.example.com active active
staging.example.com pending pendingshipyard domains verify
Verify DNS ownership of a domain by checking the TXT record.
shipyard domains verify <domain>$ shipyard domains verify app.example.com
✓ Domain verified! SSL certificate provisioning...shipyard domains remove
Remove a custom domain from the current project.
shipyard domains remove <domain>$ shipyard domains remove staging.example.com
✓ Removed staging.example.comEnvironment variables
shipyard env set
Set an environment variable for the current project. Values are encrypted at rest.
shipyard env set KEY=value$ shipyard env set DATABASE_URL=postgres://...
✓ Set DATABASE_URL (production)shipyard env list
List environment variables (values are masked).
shipyard env list$ shipyard env list
KEY TARGET VALUE
DATABASE_URL production ********
API_KEY production ********shipyard env unset
Remove an environment variable.
shipyard env unset <KEY>$ shipyard env unset API_KEY
✓ Removed API_KEYLogs
shipyard logs
Stream logs from the current project's production deployment.
shipyard logs [flags]| Flag | Description |
|---|---|
| --follow, -f | Stream logs in real-time |
$ shipyard logs --follow
2024-01-15T10:30:00Z GET /api/health 200 12ms
2024-01-15T10:30:01Z GET / 200 45ms
...