Cloud terminal
Copy a setup prompt with the install steps and the full markdown guide for this plugin.
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.
What you get
Section titled “What you get”| Cloud terminal | |
|---|---|
| System | Debian 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. |
| Network | npm registry, GitHub, and the signed Capgo upload URLs only. Everything else is blocked. |
| Session length | Ends after 10 minutes without a call, or at your plan’s longest session (30 to 120 minutes). |
| Files | Deleted when the session ends. Push to GitHub or upload a bundle to keep the work. |
| Commands | sh -c as an unprivileged user, 120 seconds each, 256 KiB of output each. sudo, su, mount and similar are blocked. |
| Concurrency | 1 to 10 running sessions per organization, depending on the plan. |
| Billing | Whole minutes per session (rounded down, at least 1), from start until it ends. Counted against the plan, then credits. |
| Access | app.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.
Plans and pricing
Section titled “Plans and pricing”| Plan | Minutes included each month | Sessions at once | Longest session |
|---|---|---|---|
| Free trial | 60 | 1 | 30 minutes |
| Solo | 300 | 1 | 60 minutes |
| Maker | 1,000 | 2 | 60 minutes |
| Team | 5,000 | 5 | 120 minutes |
| Enterprise | 20,000 | 10 | 120 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.
Use it from a chat
Section titled “Use it from a chat”-
Connect the hosted MCP server at
https://api.capgo.app/mcpin your chat app. See Connect your client. -
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. -
The assistant calls these tools:
Tool What it does capgo_start_terminalStarts a session for an app and returns session_id.capgo_terminal_run_commandRuns one shell command and returns exitCode,stdoutandtruncated.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. -
The assistant stops the session when it is done. If it forgets, the session ends by itself after 10 idle minutes.
Ship from the terminal
Section titled “Ship from the terminal”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.
-
In the terminal, build the web app and package it:
Terminal window npm run buildnpx @capgo/cli@latest bundle zip com.example.tips --path dist --for-upload --json -
Pass the JSON it prints to
capgo_prepare_bundle_upload. It returns a signedPUTURL and anupload_token. If it returnsskipped: trueinstead (for exampleVERSION_EXISTS), stop here: nothing is uploaded or completed. -
In the terminal, upload the zip:
Terminal window curl -fsS -X PUT -H "Content-Type: application/zip" --upload-file <zip> "<signed url>" -
Call
capgo_complete_bundle_uploadwith theupload_token. The bundle goes to the channel.
-
In the terminal, build the web app, add the native platform, sync it and package the project:
Terminal window npm run build[ -d ios ] || npx cap add iosnpx cap sync iosnpx @capgo/cli@latest build zip com.example.tips --platform ios --json -
Call
capgo_request_build, thencapgo_get_build_upload_urlfor the returnedjob_id. -
In the terminal, upload the archive to that URL with
curl -T. -
Call
capgo_start_build, then follow it withcapgo_get_build_statusandcapgo_get_build_logs.
Signing credentials are not uploaded from the terminal. Add them once in the console or with capgo_prepare_build_credentials_upload. See iOS and Android.
To try the app on a device without installing anything, start a cloud simulator on the finished native build.
Public API
Section titled “Public API”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 path | Body | Returns |
|---|---|---|
POST /build/terminal | app_id | data.session_id, status, workspace, started_at, expires_at, idle_timeout_minutes |
POST /build/terminal/:id/command | app_id, command | data.exitCode, data.stdout, data.truncated |
POST /build/terminal/:id/read | app_id, path | data.content, data.truncated |
POST /build/terminal/:id/write | app_id, path, content | data.ok, data.path |
POST /build/terminal/:id/stop | app_id | data.status: "ended" |
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"}'Errors
Section titled “Errors”| Error | Status | Meaning |
|---|---|---|
terminal_not_entitled | 403 | The organization has no plan, no running trial and no usage credits. |
terminal_time_exceeded | 402 | The plan’s terminal minutes for this cycle are used and there are no usage credits. Buy credits or upgrade. |
concurrency_limit | 429 | The plan’s maximum number of sessions is already running. Stop one. |
session_ended | 410 | The session was stopped, idled out or reached the plan’s longest session. Start a new one. |
terminal_unavailable | 503 | The 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_denied | 400 | The command uses sudo, su, mount, chroot or another blocked privilege change. |
command_too_long | 400 | The command is over 8 KiB. Write a script with the write tool and run it. |
path_outside_workspace | 400 | The path is absolute outside the workspace or contains ... |
file_error | 400 | The file does not exist, is a folder, or cannot be read. |
Security
Section titled “Security”- 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.