brig README

README проекта с github.com/brig-sh/brig. Одним файлом markdown: 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)

Ищем в базе…

Что это такое?Brig — это CLI-утилита на Go (brig) с фоновым демоном сессий (brigd), который запускает агентов для программирования внутри песочницы microVM прямо на вашем компьютере. Так автономный агент может испортить только тот один проект, который вы ему вручили.
Так что же я на самом деле запускаю — CLI, сервис или виртуальную машину?И CLI, и демон: одна команда создаёт песочницу microVM и запускает в ней агента, а все команды работают с ссылкой на сессию вроде claude или claude@refactor.
Как установить программу и как выглядит первый запуск?Установите cask из Homebrew — вместе с ним ставятся runtime hull и cosign; про install.sh, Linux и сборку из исходников написано в docs/install.md. Первый запуск скачивает образ гостевой системы и загрузочные файлы, поэтому идёт медленно.
Программа запустится на моём компьютере или ей нужно особое железо?Mac на чипах Apple Silicon с macOS 15 или новее; на macOS 14 работает с BRIGHYPERVISOR=vz, а Mac на Intel не поддерживаются. Также подходит Linux на x86-64 или arm64, но там нужны nerdctl, containerd и shim urunc.
Насколько сильно на самом деле ограничен агент?Папка проекта смонтирована в режиме чтения и записи и содержит ваши настоящие файлы, так что агент может менять в ней всё что угодно. В сети по умолчанию (shared) у него также есть доступ в интернет — всё, что он может прочитать, он может и отправить наружу.
Может ли агент подглядеть в мои другие файлы, пароли или SSH-ключи?Нет: песочница запускается без каких-либо учётных данных, а передаёте вы их только тогда, когда агент просит вас войти в систему. Он никогда не получает доступ к другим папкам вашего компьютера, к связке ключей или к вашему SSH-агенту.
Зачем вообще запускать агента для программирования в песочнице?Автономный агент может испортить только то, что вы ему вручили: укажите ему один проект, и неудачная правка или неудачная команда дальше этого проекта не дойдут. Когда закончите, просто выбросьте песочницу и начните с чистого листа.
Какие агенты для программирования поддерживаются сразу из коробки?Встроен Claude Code: имя сессии claude указывает на агента claude-code, который при первом запуске предложит вам войти в систему внутри песочницы. О запуске собственного агента рассказано в docs/profiles.md, а о собственном гостевом образе — в docs/guest-image.md.
Какие есть похожие проекты?coop, nvx, smolvm, box, devvm, arcbox, CubeSandbox, agentbox
Автор
brig-sh
Размер
26.9 MB
Звёзды
270
Возраст
3 мес
Коммиты · 90 дней