CLI
Create and deploy projects from the command line. The CLI works from an infra.json, the declarative definition of your infrastructure, so it pairs naturally with your editor and your coding agent.
Installation
The installer picks the build for your machine, puts the spawned binary in ~/.local/bin, and adds completions for bash, zsh, or fish. macOS, Linux, and Windows under Git Bash or WSL are all supported.
$curl -fsSL https://spawned.sh/install.sh | bashSet INSTALL_DIR to install somewhere else, such as INSTALL_DIR=/usr/local/bin. If the script reports that spawned is not on your PATH, add the install directory to your shell profile and open a new shell.
Run the same command again to upgrade. It always fetches the current release and replaces the binary in place.
Signing In
spawned --version # confirm the install
spawned login # start the sign-in flowTokens live in ~/.config/spawned/ on macOS and Linux, and in %LOCALAPPDATA%\spawned\ on Windows. spawned logout clears them.
In CI, or anywhere without a browser, set SPAWNED_API_KEY to an API key rather than signing in. The CLI uses the key in place of the stored tokens.
A Typical Workflow
spawned init my-project # create a project
# Point your coding agent at the CLI to build the infra.json
spawned get my-project # view the project and its outputsapply deploys the infra.json from the current directory unless you point it elsewhere. Most commands accept a project as name, org/name, or id.
Your coding agent can drive every one of these commands. Give it the agent skill and it knows the schema, the flags, and how to read a failed build.
Draft Mode
By default spawned apply deploys immediately. Turn on Draft mode in a project’s sidebar and spawned apply stages the schema as the project’s draft instead: nothing deploys, the pending changes show up on the canvas, and you apply or discard them there. Canvas edits always go through the same draft, so an agent’s proposal and your own edits land in one place.
The agent sees Staged for review (revision N) plus a per-component summary. In draft mode spawned export <ref> returns the draft (add --deployed for the live schema), and spawned diff <ref> shows what it changes; applying or discarding happens on the canvas.
Each project has one draft. In draft mode every spawned apply replaces it with the agent’s latest file; with draft mode off, spawned apply deploys and clears any draft.
Commands
| Command | Description |
|---|---|
init | Create a new project and write a starter infra.json |
validate | Validate an infra.json without applying it |
apply | Apply an infra.json to a project to provision it |
list | List your projects |
get | Get a project and its deployment outputs |
diff | Show what the staged draft changes against the deployed schema |
logs | Stream runtime logs from a component |
builds | List a project’s builds and view build logs |
upload | Upload a file to a Bucket component |
export | Export a project’s generated files |
schema | Print the infrastructure schema as JSON |
clouds | Manage the clouds an organization can deploy to |
org | Manage organizations |
apikeys | Manage API keys |
repos | List GitHub repos available through the GitHub App |
config | Manage CLI defaults |
login, logout | Sign in and out of Spawned |
Many commands have subcommands and options. Run spawned <command> --help for details.
Flags
| Flag | Description |
|---|---|
-h, —help | Help for a command |
-v, —version | Show the CLI version |