Sandboxes · shells · files

Remote code execution, with the containment as the product.

It creates isolated workspaces, runs shells in them, reports what is running, and lets an assistant kill or wait on it. This service executes arbitrary commands for remote callers, so the sandbox is the feature, not polish.

Python 3.12+ Serves on :8008 Tokens from keyring MIT licensed
POST /v1/environments   {"name": "scratch"}
POST /v1/exec           {"environment_id": "env_…", "command": "uname -a"}

GET  /ready             the active sandbox tier, and whether tokens verify

# tiers, strongest the host allows:
directory -> user -> namespace
Layered sandboxDirectory, user, namespace: the strongest the host allows, and reported.
No symlink followedPaths are resolved, then checked; a stale edit is refused.
Signals check ownershipA process is signalled only if it belongs to the environment by ancestry.
Everything auditedEvery command and privileged action is logged.

How it works

Environments survive restarts. Shells do not, and the API says so.

It authenticates against keyring. Read the security guide before deploying it.

01

Environments

Several per account and profile, bounded by quotas; a 409 names the limit. Each is a folder that survives a restart.

02

Shells and commands

Concurrent persistent shells per environment. Commands are framed with a random nonce so exit codes can be trusted, and exec with wait_ms returns fast results in one call.

03

A reaper

It closes idle shells, archives idle environments and prunes logs. With settings-api configured, each person's idle lifetimes are honoured.

The API

Workspaces, shells, processes and files.

The reference, with every error code, is docs/api.md.

/v1/environments

Environments

Create, list, inspect, reset and delete isolated workspaces, with usage against their limits.

POST /v1/exec

Run a command

One call that runs a command and waits up to wait_ms for it.

shells

Persistent shells

Open several per environment, write to them, read their output, and wait on a command.

processes

What is running

Live PIDs with state, memory and CPU; signals are checked for ownership.

files

The files API

List, read, search, write, exact edit, patch, mkdir, delete, copy and move, with ETag and If-Match.

GET /ready

Readiness

The active sandbox tier, and whether tokens verify; 503 until keyring's keys can be fetched.

Run it

Four commands.

You need Python 3.12 or newer and uv. make run listens on every interface; bind it to 127.0.0.1 on a shared network.

  1. Install.
    make install
  2. Point it at keyring.
    cp .env.example .env
  3. Serve it on :8008.
    make run
  4. Ask which sandbox tier is active.
    curl localhost:8008/ready

Without a keyring to hand, uv run python scripts/dev_keyring.py serves a stand-in that mints tokens, and make smoke drives the whole API against it.

Read before deploying

Read this before deploying it.

What is this, in security terms?

Remote code execution as a product. The sandbox tiers, path containment and PID-ownership checks are the feature. Read the security guide before deploying it.

How strong is the sandbox?

As strong as the host allows, found by real probes rather than trusted configuration: directory, then user, then namespace. The active tier is reported on /ready, and ENVAPI_MIN_SANDBOX_TIER refuses to start below the one you require.

Can a command reach the network?

Only where the deployment allows it. With ENVAPI_ALLOW_NETWORK=false, asking for the network is refused.

What happens to credentials a command needs?

Keyring credentials are injected per command and redacted from its output.

Docs

Written for the person who has to run it.