# Stashbase

> Run coding agents such as Claude Code and Codex without the babysitting.

Stashbase lets coding agents do more without approving every command or letting them run unchecked. Agents run in a sandbox on your laptop, in Docker or on your own server, with rules for which files they can read, which hosts they can reach, and which APIs they can call. They get placeholders instead of secret values; the Stashbase Agent Proxy adds the real credential only to requests the profile allows. A secrets manager holds the team, personal, and agent-only secrets that profiles use.

## TL;DR

- Install: `curl -fsSL https://stashbase.dev/cli/install.sh | bash` (macOS and Linux).
- Write a profile in `.stashbase/agents/<name>.toml`, then run `stashbase agent run --profile <name> -- claude` (or `-- codex`).
- Sandboxing, the local proxy, and unlimited agent profiles are free forever.
- The CLI and agent proxy are open source: https://github.com/stashbase/cli

## What it lets you do

- **Let the agent call your real APIs.** Credentials stay outside the agent. The proxy injects them only for allowed hosts, methods, paths, and JSON request bodies.
- **Let it run without babysitting.** The sandbox blocks denied files and unapproved network destinations, so you can stop approving every command.
- **Let it work in your actual project.** Deny files such as .env, add other folders (read-only or writable), and keep secrets in a file outside the project.
- **Let it use MCP tools, minus the dangerous ones.** For HTTP MCP servers, the profile decides which tools the agent can see and call.
- **Catch what the agent gets wrong.** Optional checks scan agent commits for hard-coded secrets and check npm, Bun, pnpm, and Yarn installs for vulnerable packages.
- **Review it like code.** Profiles are TOML files committed with the repository.
- **See what it did.** Metadata-only audit logs record allowed and denied requests. Logs never include secret values.
- **Run agents on a server, not your laptop.** `stashbase ssh install`, `setup`, and `open` put the CLI on a server or VM, give it its own API key, and attach to a tmux session so agents keep running after you disconnect. Supports x86_64 Linux and Apple Silicon Macs.

## Quickstart

1. Install the CLI: `curl -fsSL https://stashbase.dev/cli/install.sh | bash`
2. Create a profile: `stashbase agent init local` (creates `.stashbase/agents/local.toml`).
3. Paste a profile, for example one that keeps the agent away from .env:

```toml
egress_hosts = ["api.anthropic.com", "platform.claude.com"]

[filesystem]
deny_read = [".env"]
deny_write = [".env"]
```

4. Run the agent: `stashbase agent run --profile local -- claude`

For Codex, use `egress_hosts = ["chatgpt.com", "*.chatgpt.com", "api.openai.com"]` and `-- codex`.

## Agent profiles

A profile is a TOML file in `.stashbase/agents/`. Main keys:

- `egress_hosts`: hosts the agent may reach without a credential (model API, package registries, docs). Wildcards such as `*.chatgpt.com` are supported.
- `file`: a dotenv file outside the project to load secrets from. Put it before any table.
- `[filesystem]` `deny_read` / `deny_write`: paths the agent cannot read or write. Supports `~`; a directory covers everything under it.
- `[secrets]` `project` / `environment`: load secrets from a Stashbase workspace. Environments are flexible groups of secrets, not only deployment stages.
- `[secrets.NAME]` with `[[secrets.NAME.rules]]`: per-credential rules with `effect`, `hosts`, `methods`, and `paths` (`*` matches across `/`). Optional `body` conditions match JSON fields (exact values, a list of allowed values, `{ min, max }`, `{ absent = true }`), and `allow_fields` limits which fields the request may send.
- `[personal_credentials.NAME]`: a team member's own credential, used through the remote proxy (`stashbase agent run --remote`).
- `[mcp_servers.NAME]`: `url`, `binding` (the credential to use), and `allow_tools` / `deny_tools`.
- `[workspace]` `extra_paths`: other folders the agent can use, optionally `read_only`.
- `[sandbox]` `backend`: `native` (OS-level sandbox, the default) or `docker`.
- `allow_hooks`: `dependency_check` and `secret_scan`.

Example rule that lets the agent open GitHub issues only with an "agent" label and only a title and body:

```toml
[[secrets.GH_TOKEN.rules]]
effect = "allow"
hosts = ["api.github.com"]
methods = ["POST"]
paths = ["/repos/OWNER/REPO/issues"]
body = { labels = ["agent"] }
allow_fields = ["title", "body"]
```

## Sandbox and proxy

Sandboxing and the proxy are separate features.

- **Sandbox:** native OS sandbox by default, or a Docker container for stronger isolation. With Docker, the agent's only route to the network is the Stashbase proxy; unsetting proxy variables or opening raw connections does not get around it, and the agent cannot change the firewall. It sees only the project directory, and denied paths such as .env appear empty. Use the default image, which includes Claude Code and Codex, or a custom image or Dockerfile. Custom images add tools, not privileges.
- **Local proxy:** runs on your machine and injects credentials from local files or your workspace.
- **Remote proxy:** resolves and injects credentials on Stashbase infrastructure, so they never reach your machine. The agent still runs on your machine or server.

## Secrets manager

One workspace for team secrets, personal credentials, and secrets only your agents use. Each agent profile picks what it needs.

- Share secrets with the team, grouped by project and environment.
- Keep your own credentials yours, and let agents use them through the remote proxy.
- Decide who can change what with roles, teams, and service accounts.
- Keep existing tools in sync: GitHub, Vercel, AWS Secrets Manager, and GCP Secret Manager.
- Repository secret scanning for hard-coded secrets.

## Plans

- **Free:** unlimited agent sandboxing, local proxy, and agent profiles; open-source CLI; code and package scans; 50 hosted secrets; 3 workspace members. No credit card required.
- **Pro ($25 per active member per month):** everything in Free, plus 1,000 hosted secrets, 25 workspace members, remote agent proxy, remote session management, up to 5 teams, 50 repository AI fixes per month.
- **Scale ($35 per active member per month):** everything in Pro, plus 2,000 hosted secrets, 25+ workspace members, 20 teams, 50 service accounts, 15 scanned repositories, 100 repository AI fixes per month.

Agents are not billed as seats.

## Site index

- [Human landing page](https://stashbase.dev/): Product overview for people.
- [Machine-readable overview](https://stashbase.dev/home-machine-version): This page.
- [How it works](https://stashbase.dev/how-it-works): The sandbox, proxy, and profiles in detail.
- [Pricing](https://stashbase.dev/pricing): Plans and product access.
- [Security](https://stashbase.dev/security): Security approach and controls.
- [Philosophy](https://stashbase.dev/philosophy): How Stashbase thinks about software, access, and agents.
- [Terms](https://stashbase.dev/terms): Terms of service.
- [Privacy](https://stashbase.dev/privacy): Privacy policy.

## Useful links

- Agent documentation: https://docs.stashbase.dev/agents
- Extra folders: https://docs.stashbase.dev/agents/extra-folders
- Docker sandbox: https://docs.stashbase.dev/agents/docker-sandbox
- Platform documentation: https://docs.stashbase.dev/platform
- Workspace roles: https://docs.stashbase.dev/platform/basics/workspace
- Secret detection: https://docs.stashbase.dev/platform/scans/basics
- Open-source CLI: https://github.com/stashbase/cli
- Create a free workspace: https://app.stashbase.dev/signup