Skip to content

Cloud terminal

The Capgo cloud terminal is a short-lived Linux workspace that runs next to your Capgo account. An AI assistant connected to the hosted MCP server can start one, run shell commands in it, read and write files, and ship the result as a live update or a native build.

You do not need a computer, a terminal, Node.js or Xcode. A chat app such as Claude, ChatGPT or Cursor is enough.

Cloud terminal
SystemDebian Linux container with Node.js 24, npm, npx, git and curl. 1/4 vCPU, 1 GiB memory, 4 GB disk.
Working folder/workspace/project. Paths in tool calls are relative to it.
Networknpm registry, GitHub, and the signed Capgo upload URLs only. Everything else is blocked.
Session lengthEnds after 10 minutes without a call, or at your plan’s longest session (30 to 120 minutes).
FilesDeleted when the session ends. Push to GitHub or upload a bundle to keep the work.
Commandssh -c as an unprivileged user, 120 seconds each, 256 KiB of output each. sudo, su, mount and similar are blocked.
Concurrency1 to 10 running sessions per organization, depending on the plan.
BillingWhole minutes per session (rounded down, at least 1), from start until it ends. Counted against the plan, then credits.
Accessapp.build_native on the app, the same permission as native builds and the cloud simulator.

Each session belongs to one app. Anyone in the organization with build access to that app can use it.

PlanMinutes included each monthSessions at onceLongest session
Free trial60130 minutes
Solo300160 minutes
Maker1,000260 minutes
Team5,0005120 minutes
Enterprise20,00010120 minutes
  • Minutes past the included amount cost $0.01 per minute, paid from usage credits. Buy credits in the console under Settings > Organization > Credits.
  • With no credits left, running sessions finish, but new ones are refused (terminal_time_exceeded) until the next billing cycle, a plan upgrade or a credit purchase.
  • An organization with credits and no plan can use 1 session of up to 30 minutes, and every minute is paid from credits.
  • Terminal minutes are separate from native build minutes. Your usage is on the console Usage page.
  1. Connect the hosted MCP server at https://api.capgo.app/mcp in your chat app. See Connect your client.

  2. Ask for what you want, for example:

    Create a Capgo app called Tip Calculator with app ID com.example.tips, build it as a Vite web app in the Capgo cloud terminal, add Capacitor and the Capgo updater, then upload it to the production channel.

  3. The assistant calls these tools:

    ToolWhat it does
    capgo_start_terminalStarts a session for an app and returns session_id.
    capgo_terminal_run_commandRuns one shell command and returns exitCode, stdout and truncated.
    capgo_terminal_write_fileCreates or replaces a text file (up to 1 MiB).
    capgo_terminal_read_fileReads a text file.
    capgo_stop_terminalEnds the session, stops billing and deletes its files.
  4. The assistant stops the session when it is done. If it forgets, the session ends by itself after 10 idle minutes.

The sandbox holds no Capgo API key. The assistant uses the hosted MCP to get a signed upload URL, then sends the file from the terminal with curl. The URL works once, for that one upload.

  1. In the terminal, build the web app and package it:

    Terminal window
    npm run build
    npx @capgo/cli@latest bundle zip com.example.tips --path dist --for-upload --json
  2. Pass the JSON it prints to capgo_prepare_bundle_upload. It returns a signed PUT URL and an upload_token. If it returns skipped: true instead (for example VERSION_EXISTS), stop here: nothing is uploaded or completed.

  3. In the terminal, upload the zip:

    Terminal window
    curl -fsS -X PUT -H "Content-Type: application/zip" --upload-file <zip> "<signed url>"
  4. Call capgo_complete_bundle_upload with the upload_token. The bundle goes to the channel.

To try the app on a device without installing anything, start a cloud simulator on the finished native build.

The same actions are REST endpoints on https://api.capgo.app. Send a Capgo API key in the capgkey header (or Authorization: Bearer). Every body takes app_id.

Method and pathBodyReturns
POST /build/terminalapp_iddata.session_id, status, workspace, started_at, expires_at, idle_timeout_minutes
POST /build/terminal/:id/commandapp_id, commanddata.exitCode, data.stdout, data.truncated
POST /build/terminal/:id/readapp_id, pathdata.content, data.truncated
POST /build/terminal/:id/writeapp_id, path, contentdata.ok, data.path
POST /build/terminal/:id/stopapp_iddata.status: "ended"
Terminal window
curl -s https://api.capgo.app/build/terminal \
-H "capgkey: $CAPGO_API_KEY" -H "Content-Type: application/json" \
-d '{"app_id":"com.example.tips"}'
curl -s https://api.capgo.app/build/terminal/<session_id>/command \
-H "capgkey: $CAPGO_API_KEY" -H "Content-Type: application/json" \
-d '{"app_id":"com.example.tips","command":"node -v && npm -v"}'
ErrorStatusMeaning
terminal_not_entitled403The organization has no plan, no running trial and no usage credits.
terminal_time_exceeded402The plan’s terminal minutes for this cycle are used and there are no usage credits. Buy credits or upgrade.
concurrency_limit429The plan’s maximum number of sessions is already running. Stop one.
session_ended410The session was stopped, idled out or reached the plan’s longest session. Start a new one.
terminal_unavailable503The terminal could not start the session or did not answer. Try again in a moment. A command or write may already have run: check its result (for example ls or git status) before you repeat it.
command_denied400The command uses sudo, su, mount, chroot or another blocked privilege change.
command_too_long400The command is over 8 KiB. Write a script with the write tool and run it.
path_outside_workspace400The path is absolute outside the workspace or contains ...
file_error400The file does not exist, is a folder, or cannot be read.
  • Each session runs in its own container. Nothing is shared between sessions or organizations.
  • Outbound traffic goes through an allowlist: registry.npmjs.org, github.com, codeload.github.com, objects.githubusercontent.com, and the Capgo storage and builder hosts that serve signed upload URLs.
  • The sandbox never receives your Capgo API key or OAuth token. Upload URLs are signed for one file and expire.
  • Permission checks, rate limits and audit logs are the same as for the public API with your key.
  • The container is destroyed when the session ends. If the destroy fails, Capgo retries until it succeeds.