Sign in

CLI

The spawn CLI

Run Claude Code in a sandbox from your terminal: spawn uploads the project you’re in, starts Claude there, and brings its changes back when it’s done.

Claude works in its own VM, not on your machine. It can install anything, run your tests and servers, and keep going after you close the terminal. You stay in charge of what comes back: the agent’s changes reach your folder only when you pull them.

What you need

  • macOS or Linux. Interactive sessions don’t run on Windows yet.
  • git, to upload a repository and to bring changes back.
  • Your Anthropic API key on the dashboard’s Secrets page. Claude runs on your own key; see how the key is used.

Sign in

Terminal
spawn login

The CLI opens the dashboard in your browser and shows a short code. Check that the code matches, approve it, and the terminal finishes on its own. On a machine without a browser, run spawn login --no-browser and open the printed link anywhere you’re signed in.

Signing in creates an API key named Spawn CLI · <your hostname>, which you’ll see on the API keys page, and stores it in your OS keychain (macOS Keychain, or the Secret Service on Linux). Where neither is available, it falls back to ~/.spawn/credentials, readable only by you.

  • spawn whoami shows the account, the key (masked) and where it came from.
  • spawn logout forgets the stored key. The key itself stays valid until you revoke it on the API keys page.

Your first session

Terminal
cd my-project
spawn claude
  1. The first time in a folder, spawn shows what it’s about to upload (files, size, what’s left out) and asks you to trust the folder. Nothing leaves your machine until you say yes.
  2. It creates a sandbox, uploads the project and opens Claude in it, in this terminal. Work with Claude as you would locally.
  3. Press Ctrl+\ to detach. Claude keeps working in the sandbox; come back with spawn attach.
  4. When it’s done, bring the changes into your folder with spawn pull, or open a pull request from the session page with spawn pr.

Run spawn claude in the same folder again and it offers to resume that session. Run plain spawn for a live view of every session.

The terminal dashboard

spawn on its own opens a full-screen view: this folder’s session, your interactive sessions and your background ones, each with its sandbox state and, while Claude is working, a live preview of its screen. Select one and press Enter to attach.

Useful keys: n new session here, p pull, o open the session page, c open the browser editor, f fix an issue, r review a PR, s pause, x remove, / filter, ? all keys, q quit. Live previews stop after 10 minutes without a key press, and they never wake a paused sandbox.

Next

  • Claude sessions: what gets uploaded, detaching, pulling changes, pull requests and background agents.
  • CLI reference: every command and flag, settings files and environment variables.
Ctrl I