# Spaceship CLI - Comprehensive Agent Reference Manual > An exhaustive technical manual for autonomous agents driving the Spaceship CLI (`spaceship`). Covers all endpoints of the Spaceship REST API v1. ## When To Use This Tool - Automated registration, renewal, transfer, and lifecycle management of domain names. - Managing authoritative DNS zones, nameservers, and glue records (personal nameservers). - Batch domain availability checks for generative naming algorithms. - Automating domain brokerage, SellerHub marketplace listings, and SafePay escrow transactions. - Continuous deployment, scaling, and observability for Hyperlift applications. ## Exit Codes and Error Envelopes Every error response on stderr conforms to the standard envelope structure: ```json { "code": "error_code_string", "message": "Human readable summary", "detail": "Extended debugging context", "remediation": "Exact command or action needed to fix" } ``` Exit code numbers match the error code contract: - `0`: Success (`ok`) - `1`: General error (`error`) - `2`: Network / transport failure (`network`) - `3`: `auth_required` — Key/secret missing, rejected, or insufficient scope - `4`: `not_found` — Domain or resource ID does not exist - `5`: `rate_limited` — API rate limit reached (HTTP 429) - `6`: `invalid_input` — Invalid arguments or validation error - `7`: `no_account` — `--account ` or credentials were not specified ## Safety Guardrails & Operational Protocols 1. **Async Operations**: Endpoints returning HTTP 202 (domain registrations, renewals, restores, transfers) return an `asyncOperationId`. Agents MUST poll `spaceship operations get ` until the status is terminal (`completed` or `failed`). 2. **DNS Zone Updates**: `spaceship dns save` adds records or updates TTLs for matching entries. It does NOT automatically overwrite values for existing names/types unless `--force` is supplied. To change a target/address, delete the previous record first or pass `--force`. 3. **Account Scoping**: Use `--account ` (`-a `) when managing multiple Spaceship accounts. Alternatively, configure `SPACESHIP_API_KEY` and `SPACESHIP_API_SECRET` in environment variables. 4. **Secrets Isolation**: API keys and secrets are stored in the host operating system's hardware-backed credential vault (macOS Keychain, Windows DPAPI, Linux Secret Service). ## Complete Command Reference ### Domains - `spaceship domains list [--take <1-100>] [--skip ] [--order-by ]`: List registered domains. - `spaceship domains get `: Retrieve domain details (status, dates, privacy). - `spaceship domains check `: Query domain availability. - `spaceship domains check-batch `: Comma-separated list of up to 20 domains. - `spaceship domains register --registrant [--years <1-10>] [--auto-renew] [--privacy public|high]`: Register domain. - `spaceship domains renew --expiration-date [--years <1-10>]`: Renew domain. - `spaceship domains restore `: Restore deleted domain. - `spaceship domains autorenew --enable|--disable`: Toggle auto-renewal. - `spaceship domains nameservers --provider basic|custom [--hosts ]`: Configure nameservers. - `spaceship domains contacts --registrant [--admin ] [--tech ] [--billing ]`: Update domain contacts. - `spaceship domains privacy --level public|high`: Update privacy settings. - `spaceship domains email-protection --enable|--disable`: Toggle contact form email protection. - `spaceship domains auth-code `: Retrieve transfer authorization code. - `spaceship domains transfer --registrant [--auth-code ]`: Initiate domain transfer. - `spaceship domains transfer-status `: Check transfer status. - `spaceship domains transfer-lock --lock|--unlock`: Update transfer lock. - `spaceship domains personal-ns list `: List glue records. - `spaceship domains personal-ns save --ips [--rename ]`: Create or update glue record. - `spaceship domains personal-ns delete `: Remove glue record. ### DNS Records - `spaceship dns list [--take <1-500>] [--skip ] [--all] [--type ] [--name ]`: Query zone records. - `spaceship dns save [--file ] [--force]`: Add or update records. JSON format: ```json [ {"name": "@", "type": "A", "address": "192.0.2.1", "ttl": 300}, {"name": "www", "type": "CNAME", "cname": "example.com", "ttl": 300} ] ``` - `spaceship dns delete [--file ]`: Delete records by exact match. ### Contacts - `spaceship contacts save --first-name --last-name --email --address --city --country --phone

`: Save contact. - `spaceship contacts get `: Get contact details. - `spaceship contacts attributes save [--file ]`: Save registry-specific attributes. - `spaceship contacts attributes get `: Retrieve attributes. ### SellerHub & SafePay - `spaceship sellerhub list [--take ] [--skip ]`: List marketplace domains. - `spaceship sellerhub get `: Get listing details. - `spaceship sellerhub create [--file ]`: Create domain listing. - `spaceship sellerhub update [--file ]`: Update listing. - `spaceship sellerhub delete `: Remove listing. - `spaceship sellerhub checkout [--file ]`: Create checkout link. - `spaceship sellerhub verification`: Query TXT/CNAME ownership verification options. - `spaceship sellerhub sold [--take ] [--cursor ] [--from

] [--to
]`: Query sales reports. - `spaceship sellerhub safepay list [--take ] [--skip ]`: List escrow transactions. - `spaceship sellerhub safepay get `: Inspect transaction. - `spaceship sellerhub safepay create [--file ]`: Initiate SafePay transaction. ### Hyperlift - `spaceship hyperlift list [--take ] [--skip ]`: List applications. - `spaceship hyperlift get `: Inspect application. - `spaceship hyperlift build `: Trigger build. - `spaceship hyperlift build-logs [--take ] [--cursor ]`: Stream build logs. - `spaceship hyperlift logs [--take ] [--cursor ]`: Stream container runtime logs. - `spaceship hyperlift metrics --start
--end
--interval --metrics `: Query compute metrics. - `spaceship hyperlift restart `: Restart app. - `spaceship hyperlift scale --scale 0|1`: Stop (0) or start (1) app. - `spaceship hyperlift env get `: Inspect environment variables. - `spaceship hyperlift env set [--file ]`: Atomically replace environment variables. ### Operations - `spaceship operations get `: Poll status of an async operation.