Your first protected run
Install Leash, put a cap on an agent, and see its first request in your local ledger.
On this page
1. Install the CLI
You need Node.js 22.13 or later (24 recommended), npm, and Claude Code or Codex already installed. Customer machines do not need Docker, this repository, or database credentials.
Install the versioned CLI archive supplied by Leash and verify it against the trusted checksum file. Public package download hosting is not published yet; contact hello@useleash.dev for release access.
shasum -a 256 -c SHA256SUMS
npm install --global --ignore-scripts --prefix "$HOME/.local" ./leash-cli-0.2.0.tgz
export PATH="$HOME/.local/bin:$PATH"
leash --version
leash init2. Give the run a $5 boundary
Keep your provider API key in your shell or secret manager. Leash starts a proxy if needed, creates a fresh session, and points the child process at that proxy.
# With ANTHROPIC_API_KEY already in your shell:
leash run --cap 5 -- claude
# Or, with OPENAI_API_KEY set for Codex API-key mode:
leash run --cap 5 -- codex3. Check your protection
Keep the agent running and open another terminal with the same LEASH_HOME. Status shows spend, outstanding reservations and killed sessions. Doctor checks that the proxy is reachable.
leash status
leash doctor
# Immediate local panic:
leash kill --allRunning the full stack locally
Operators with access to the closed-source checkout can run the web app, API, proxy, gateway and Postgres together. Use pnpm 10 and Docker Compose v2. No provider key is needed for signup, documentation or fixture reports.
cp .env.example .env
docker compose up -d
pnpm install
pnpm db:migrate
pnpm build
pnpm dev