brig README

The project's README from github.com/brig-sh/brig. As one markdown file: README.md.

brig

Release CI Coverage Go License: Apache 2.0

Brig runs a coding agent, such as Claude Code, inside a microVM on your own machine.

The agent gets a kernel and a home directory of its own, and works on the one project you name. It does not see the rest of your disk, your keychain or your SSH agent. So you can let it work without approving each command, and the only host files it can change are that project and its own home.

Terminal recording. brig run opens Claude Code in a sandbox, in /work/demo. Asked to write hello.py and run it, Claude writes the file, runs it and lists the directory. After exit, ls on the host shows hello.py in the project.

Install

Host Supported
Mac, Apple silicon, macOS 15 or newer Yes
Mac, Apple silicon, macOS 14 Yes, with BRIG_HYPERVISOR=vz BRIG_NETWORK=shared set for each run
Intel Mac No
Linux, x86-64 or arm64, with KVM Yes

On macOS, install with Homebrew:

brew tap brig-sh/brig
brew trust brig-sh/brig
brew install --cask brig

On Linux, install Brig and its runtime for the whole machine. This needs root:

curl -fsSL https://raw.githubusercontent.com/brig-sh/brig/main/install.sh | sudo sh

After this install, run every brig command as root, for example sudo brig doctor. Install covers a Mac without Homebrew, a Linux install for one user without root, and a build from source.

First run

Use a new, empty directory as the project, because the agent can change any file in it.

brig doctor                      # check the host
mkdir -p ~/code/demo
brig run claude ~/code/demo      # start a sandbox and run Claude Code in it

The first run downloads the guest image and the boot assets. Claude Code then asks you to log in inside the sandbox, so you need an Anthropic account. With no account, run brig run ubuntu ~/code/demo instead. It opens a root shell in the sandbox and needs no login.

The agent starts in /work/demo, which is ~/code/demo on the host. Ask it to create a file there, then exit the agent. The file is in ~/code/demo on the host.

The sandbox keeps running after the agent exits, so the next brig run claude starts at once. When you are done:

brig stop claude                 # stop the sandbox, keep its guest home
brig rm claude                   # remove the sandbox and its guest home

brig stop and brig rm do not touch ~/code/demo. Delete it yourself when you no longer need it. Quickstart shows the same steps with the output of each.

What the sandbox can reach

Security states each limit in full.

Next steps

The documentation index lists every page. The site brig.sh/docs has the same documentation, edited for the web.

Project

Brig has not reached 1.0, and a minor release can make breaking changes. Stability lists what you can script against, and Non-goals lists what Brig will not do.

NOFire AI

brig (brig-sh/brig)

Searching Database…

What is this?Brig is a Go CLI (brig) with a session daemon (brigd) that runs coding agents inside a microVM sandbox on your own machine, so an unattended agent can only damage the one project you hand it.
So what am I actually running — a CLI, a service, a VM?Both a CLI and a daemon: one command starts a microVM sandbox and runs the agent in it, and every command works on a session ref like claude or claude@refactor.
How do I install it, and what does the first run look like?Install the Homebrew cask — it brings the hull runtime and cosign with it; install.sh, Linux and source builds are covered in docs/install.md. The first run pulls the guest image and boot assets, so it is slow.
Will it run on my machine, or does it need special hardware?Apple Silicon Macs on macOS 15 or newer; macOS 14 works with BRIGHYPERVISOR=vz, and Intel Macs are not supported. Linux on x86-64 or arm64 also works, but needs nerdctl, containerd and the urunc shim.
How locked down is the agent, really?The project directory is mounted read-write and holds your real files, so the agent can change anything under it. On the default shared network it also reaches the internet — anything it can read, it can send out.
Can the agent peek at my other files, passwords or SSH keys?No: the sandbox boots with no credentials, and you deliver them only when the agent asks you to log in. It never gets your other host directories, your keychain or your SSH agent.
Why run a coding agent in a sandbox at all?An unattended agent can only damage what you hand it: point it at one project and a bad edit or a bad command reaches no further than that project. When you are done, you throw the sandbox away and start clean.
Which coding agents does it support out of the box?Claude Code is built in: the session name claude resolves to the claude-code agent, which asks you to log in inside the sandbox on first run. docs/profiles.md covers running your own agent, and docs/guest-image.md your own guest image.
What are similar projects?coop, nvx, smolvm, box, devvm, arcbox, CubeSandbox, agentbox
Creator
brig-sh
Size
26.9 MB
Stars
270
Age
3mo
Commits · 90 Days