didvc/ai-bwrap
34 stars · Last commit 2026-10-20
Better agentic security inside a sandbox; one wrapper, any agent.
README preview
# ai-bwrap Run AI coding agents inside a [bubblewrap](https://github.com/containers/bubblewrap) sandbox. One wrapper, any agent. [](https://github.com/didvc/ai-bwrap/actions/workflows/ci.yml) [](LICENSE) [](ai-bwrap) [](#requirements) `ai-bwrap` launches an AI coding agent (Claude Code, opencode, Grok, or a plain shell) inside a `bwrap` namespace. The agent gets read-write access only to your current working directory; the rest of `$HOME` stays hidden. Just the config, cache, and state directories an agent actually needs are passed through. Agents are declared as small shell functions, so the registry is extensible without touching the wrapper.  ## Why AI coding agents run shell commands, edit files, and fetch from the network on your behalf. Run directly, they can read anything you can: `~/.ssh`, `~/.aws`, browser profiles, every other project on disk. `ai-bwrap` confines them to the directory you're actually working in, while still passing through the toolchains and credentials they legitimately need (git, `gh`, Node/NVM, Cargo, …). 