Goal
Find the command for a task and its main flags.Prerequisites
- The StackShift CLI, signed in with
stackshift auth login, or STACKSHIFT_TOKEN set to a computers key. - Nothing else. Without
--projector a project in your CLI profile, the CLI uses your latest project, or makes one named Computers if you have none yet.
Workflow
1
Run
stackshift computers sh to create a computer and open a terminal on it. When the shell ends the computer pauses; run stackshift computers sh NAME to carry on.2
Run
stackshift computers list to see computers and their state.3
Use
exec, files, port, fork, pause, snapshot and restore as needed.4
Run
stackshift computers COMMAND --help for the full flags of any command.Commands
sh [COMPUTER]: open a terminal, creating a computer when none is named. Pauses it on exit. It signs you in if needed and installs the StackShift skills into~/.claude/skills,~/.agents/skillsand~/.gemini/config/skills;--no-skillsskips them.stackshift shis the same command.stackshift skills install -y: install only the skills, with no sign-in.stackshift login --agentandstackshift claim CODE: an agent asks for a computers key, and you approve it with the scopes you choose.create NAME,list,get COMPUTER,delete COMPUTER: manage computers.--waitwaits until the change is finished.exec [FLAGS] COMPUTER [COMMAND...]: run a command.--shellruns a shell line,--backgroundreturns a process ID, and--cwd,--env KEY=VALUE,--userand--exec-timeoutset how it runs.run [FLAGS] -- COMMAND: create a fresh computer, copy a folder into it with--push, run one command and delete the computer, unless--keep. The exit code is the command’s own.history,outputandjobs ls|logs|wait|kill: read past commands and their output, and follow or stop background commands, also while the computer is paused.ssh [FLAGS] COMPUTER [SSH-ARGS...]: SSH through the StackShift gateway atssh.stackshift.cloudport 2222 with a short-lived certificate.ssh-token COMPUTERprints a shareable SSH line that works without the CLI.files ls|cat|get|put|mkdir|rm: work with files under/workspace.cp,pushandpullcopy files and folders in parallel, checked chunks, scp style (COMPUTER:PATH).setup COMPUTERandimport IMAGE --name NAME: show or run a setup script or devcontainer, and import a Docker or OCI image as a snapshot.agent prompt|ls|events|steer|interrupt|providers|models|login|result|fanout|keep: run Claude Code, Codex, Gemini CLI, OpenCode, Cursor, GitHub Copilot, Amp or Qwen Code inside a computer, and follow, redirect or stop it.prompttakes--attach FILE,--forks Nand--prompts FILE;providersshows who is signed in,modelslists the models an agent can use (--provider, and--secret BINDING_IDfor a key’s models),loginsigns an agent in,resultprints the summary (add--jsonfor scripts), andfanoutandkeeplist and choose among copies.secrets set NAMEkeeps a model key that computers can use without seeing it.port publish|unpublish COMPUTER PORT: give a port an HTTPS address.--privatelimits it to signed-in owners.pause,resume,fork,snapshot,snapshots,restore: lifecycle.watch COMPUTER: stream events until interrupted.keys create|list|revokeandmcp: keys for agents, and the MCP server address with ready-to-paste settings.mcp --create-key NAMEalso creates a key.
Create and shell flags
--template agent-desktop|coding|android|ci-runner(the default isagent-desktopforcreateandcodingforsh),--vcpus,--memory-gib,--disk-gib,--region. The vCPU and memory pair must be one the template offers; leave both out for its first size.--repo URL(or--source),--revisionand--source-pathstart from a repository and apply its devcontainer.json or.stackshift/setup.sh.--from-snapshot IDstarts from a snapshot.--setup-fileruns a script once the computer is up,--devcontainerpushes your folder and applies its devcontainer.json, and--wait-setupwaits for the setup and exits with its code.--max-run 8h,--archive-after 7dand--delete-after 30dpause or delete the computer for you.--internet open|allowlistwith--allow-domainfor each allowed domain.--pause-after 30mand--pause-mode memory|diskset the idle policy.--pause-after 0never pauses.--login NAMEallows a saved login,--approvalslets the computer ask you,--no-keysstops keys driving it and--no-recordingturns screen recording off.
Examples
Expected result
You can run every computer workflow from a terminal or a CI job without calling the API by hand.
Common failures
Related guides
Create and manage computers
Create a computer from a template, a snapshot or a repository, open it, run commands, move files, publish ports and delete it.
Pause, snapshot and fork
Pause a computer to stop paying for running time, snapshot it to keep a copy, and fork it up to 20 times to try many things from one starting point.
Computers REST API
Every computer action is an endpoint under /api/v1/computers, with idempotent mutations, a typed error format, live sessions and an event stream.