Claude Code Nix Sandbox banner
jhhuh jhhuh

Claude Code Nix Sandbox

Development community

Description

Pure Nix machinery for sandboxed Claude Code sessions with Chromium — bubblewrap, systemd-nspawn, and QEMU VM backends

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

claude-code-nix-sandbox

**Warning:** This project is under active development and should be considered unstable. Features may be incomplete, broken, or change without notice. If you choose to run it, you do so at your own risk. There are no guarantees of correctness, security, or fitness for any particular purpose.

**[Documentation](https://jhhuh.github.io/claude-code-nix-sandbox/)**

Launch sandboxed [Claude Code](https://docs.anthropic.com/en/docs/agents-and-tools/claude-code) sessions with Chromium using Nix.

Claude Code (from [sadjow/claude-code-nix](https://github.com/sadjow/claude-code-nix)) runs inside an isolated sandbox with filesystem isolation, display forwarding, and a Chromium browser. Three backends available with increasing isolation: [bubblewrap](https://github.com/containers/bubblewrap) (unprivileged), [systemd-nspawn](https://www.freedesktop.org/software/systemd/man/latest/systemd-nspawn.html) (root), and QEMU VM (strongest).

Web Dashboard

![Dashboard — sandbox list with live screenshots and system metrics](docs/src/images/dashboard.png)

![Sandbox detail — live screenshot, Claude metrics, and WebSocket log viewer](docs/src/images/sandbox-detail.png)

Quick Start

Install (both sandboxed and un-sandboxed)

# Install both claude-sandbox and claude-code
nix profile install github:jhhuh/claude-code-nix-sandbox

# Update to latest
nix profile upgrade claude-code-nix-sandbox --refresh

This gives you both `claude-sandbox` (bubblewrap isolation) and `claude` (un-sandboxed) on your PATH, pinned to the same version.

Bubblewrap (unprivileged)

# Run Claude Code in a sandbox
nix run github:jhhuh/claude-code-nix-sandbox#sandbox -- /path/to/project

# Run inside tmux (needed for agent teams)
nix run github:jhhuh/claude-code-nix-sandbox#sandbox -- --tmux /path/to/project

# Drop into a shell inside the sandbox
nix run github:jhhuh/claude-code-nix-sandbox#sandbox -- --shell /path/to/project

systemd-nspawn cont