Features / CLI and API
One command for everything, and the API under it.
Install the pols CLI with one line, log in by approving an email, and create, run, fork and publish from your terminal. Every command speaks JSON for scripts. Everything it does goes through the REST API, which you can call directly with an API key.
€10 of usage for 30 days · No credit card
curl -fsSL https://pols.so/install.sh | sh- Systems: Linux and macOS, amd64 and arm64
- 2
- On every command except pols mcp
- --json
- REST API at api.pols.so, from an OpenAPI spec
- /v1
A teleprinter on a pneumatic tube
You type a command; a request travels to the API. The keys and the type carriage are the CLI. The carrier in the glass tube is the HTTPS request with your API key as a bearer token, and the station at the end is the API at api.pols.so/v1. The answer prints on the paper, and with --json it comes out as a tape a script can read.
- --jsonEvery command except pols mcp takes --json and prints one JSON document on stdout, errors included. Use it in scripts.
- The requestEvery call is HTTPS to https://api.pols.so/v1, with an API key as a bearer token. Lifecycle calls record the desired state and return at once; pols new then waits until the sandbox runs.
- The APIThe REST API the CLI is built on, generated from an OpenAPI spec that /v1/openapi.yaml serves. Over a rate limit it answers 429 with a Retry-After header.
- API keysMade on the account page or by approving an email with pols signup --email. They expire after 30, 90 or 365 days or never, up to 25 per org. pols login stores one; POLS_API_KEY takes precedence.
- The outputpols new waits until the sandbox runs, then prints its ID and name. pols exec streams the output as it arrives and exits with the command's exit code.
- The pols commandOne command for sandboxes, files, the desktop, ports, SSH, sites, templates and billing. It installs to ~/.local/bin on Linux and macOS, amd64 and arm64, and the installer checks the download against its checksums.
- The benchEvery command, flag and example is in the CLI reference, generated from the CLI's own --help.
From install to cleanup
The install script puts pols in ~/.local/bin and checks the download against its published checksums. pols signup --email creates your account or logs you in once you approve the email; there is no password. Sandboxes are named by ID or by name everywhere.
Add --json to any command except pols mcp to get one JSON document on stdout, errors included.
$ curl -fsSL https://pols.so/install.sh | sh
$ pols signup --email you@example.com
# waits until the sandbox runs
$ pols new --name demo
# streams the output and exits with the command's exit code
$ pols exec demo -- uname -a
$ pols cp ./notes.md demo:/home/user/notes.md
# one JSON document, for scripts
$ pols ls --json
$ pols rm demoThe REST API
Every /v1 call takes an API key as a bearer token. Keys are made on the account page or by approving an email, never through the API itself, so a leaked key cannot create new ones. A key can be limited to some sandboxes.
Lifecycle calls record the desired state and return at once; poll the sandbox until its status matches. Rate limits answer 429 with a Retry-After header. A typed TypeScript client, generated from the same OpenAPI spec, is published on GitHub Packages.
# the spec needs no key
$ curl -s https://api.pols.so/v1/openapi.yaml
# list sandboxes
$ curl -s -H "Authorization: Bearer $POLS_API_KEY" https://api.pols.so/v1/sandboxes€10 of usage for 30 days · No credit card
Questions
Does the CLI run on Windows?
No. It is built for Linux and macOS on amd64 and arm64. On other systems, use the REST API.
How do I use it in CI?
Set POLS_API_KEY in the job's environment; it takes precedence over a stored key, and no pols login is needed. Give each CI system its own key and let it expire, so you can revoke it alone.
What exit code does pols exec return?
The command's own. If the --cwd directory does not exist it exits 125, and a command that is not found exits 127. With --json you get stdout, stderr and exit_code in one document.
How do I copy a directory?
pols cp copies one file, up to 1 GiB on upload. For a directory, tar it, copy the archive and unpack it, or use scp or sftp with the command pols ssh --print gives you.
What are the API's rate limits?
Each org gets 20 requests a second with bursts of 40, lifecycle calls 1 a second with bursts of 10, and 16 exec, file, computer-use and CDP calls in progress at once. Over a limit the API answers 429 rate_limited with a Retry-After header.
Is there a client for my language?
The API is described by an OpenAPI spec at api.pols.so/v1/openapi.yaml, which needs no key, so you can generate a client for any language. pols also publishes a typed TypeScript client.
Start with one machine.
Install the CLI, sign up, and give your agent somewhere to work.
curl -fsSL https://pols.so/install.sh | sh€10 of usage for 30 days · No credit card