# AI use cases for Brig (brig-sh/brig)

Repo: [brig-sh/brig](https://github.com/brig-sh/brig) | Use cases: 3 | Page: https://dedupedai.com/use-cases/brig-sh-brig/

Brig is a Go command line tool and session daemon that runs a coding agent inside a microVM sandbox on your own machine.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Run Claude Code on one project inside a sandbox: https://dedupedai.com/use-cases/brig-sh-brig/run-claude-code-in-sandbox/
- Try unfamiliar code in a disposable sandbox: https://dedupedai.com/use-cases/brig-sh-brig/test-unfamiliar-code-in-throwaway-sandbox/
- Check what a sandbox forwards before an agent runs: https://dedupedai.com/use-cases/brig-sh-brig/audit-credentials-before-agent-run/

## How to run Claude Code on one project inside a sandbox with Brig

Repo: [brig-sh/brig](https://github.com/brig-sh/brig) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Start Claude Code in a microVM that can only see the project folder you name.

**Who it is for:** A developer who wants Claude Code to edit a project, but does not want it to reach the rest of their disk or keychain.

**The problem:** A coding agent running directly on your laptop can read anything your user account can read, including credentials and other repositories.

**The outcome:** Claude Code runs in its own sandbox against one project folder, and you can stop it or delete the sandbox when you finish.

### Steps

1. `brew tap brig-sh/brig`
2. `brew trust brig-sh/brig`
3. `brew install --cask brig`
4. `brig doctor`
5. `brig run claude ~/code/demo`

### Prompt to paste into your agent

```text
Using the brig-sh/brig repository, install Brig on this Mac and run `brig doctor` to check the host. Then start a sandbox with `brig run claude <project path>` and report the output of brig doctor and whether the sandbox started. Verify that the project path is the only folder the README says is mounted at /work.
```

### Caveat

The project you name is mounted read-write, so the agent can change or delete any file under it, and Claude Code asks you to log in inside the sandbox.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/brig-sh-brig/run-claude-code-in-sandbox/

## How to try unfamiliar code in a disposable sandbox with Brig

Repo: [brig-sh/brig](https://github.com/brig-sh/brig) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Open a root shell in a throwaway sandbox, then delete it when the test is done.

**Who it is for:** A developer who wants to run an unfamiliar script, package or tool before trusting it on their own machine.

**The problem:** Running untested code directly on your laptop gives it the same access you have to your files, keychain and SSH agent.

**The outcome:** The code runs in a sandbox with its own kernel and home directory, and deleting the sandbox removes its guest home.

### Steps

1. `brig doctor`
2. `mkdir -p ~/code/demo`
3. `brig run ubuntu ~/code/demo`
4. `brig stop ubuntu` (inferred, check the README)
5. `brig rm ubuntu` (inferred, check the README)

### Prompt to paste into your agent

```text
Using the brig-sh/brig repository, run `brig run ubuntu <project path>` to open a root shell in a sandbox, then run the test command the user gives you inside it. Report the output and then run `brig rm ubuntu`. Verify that the README says `brig rm` removes the sandbox and deletes its guest home.
```

### Caveat

The project folder is still mounted read-write at /work, so code run in the sandbox can change files under that folder.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/brig-sh-brig/test-unfamiliar-code-in-throwaway-sandbox/

## How to check what a sandbox forwards before an agent runs with Brig

Repo: [brig-sh/brig](https://github.com/brig-sh/brig) | Difficulty: Advanced | Time: 45 minutes | Basis: From the README

List the credentials a run forwards by name, and restrict egress if needed.

**Who it is for:** A security-minded developer or team lead who must approve which secrets and network paths an agent can reach.

**The problem:** It is hard to know which credentials an agent inherits and what the sandbox can send over the network.

**The outcome:** You see the forwarded credential names for a run and understand the network mode before approving the agent.

### Steps

1. `brig doctor`
2. `brig info <sandbox name>` (inferred, check the README)
3. Read the network section of Brig.sh/docs/policies to confirm the egress policy you need is supported on your backend.
4. Run `brig run claude <project path>` only after the forwarded names match what you approved. (inferred, check the README)

### Prompt to paste into your agent

```text
Using the brig-sh/brig repository, check the host with `brig doctor`, then run `brig info <sandbox name>` for the sandbox you plan to use. Report the credential names it forwards and whether the network is isolated. Verify that the README says a new sandbox on hvi or Linux gets an isolated network and that Brig refuses a policy-bound run on unsupported backends.
```

### Caveat

The sandbox still reaches the internet by default, so anything the agent can read it can also send unless you bind an egress policy on a supported backend.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/brig-sh-brig/audit-credentials-before-agent-run/
