AxeForge/aigate
OS-level sandbox for AI coding agents

A trust boundary the AI can't argue its way out of.

Claude Code, Cursor, Copilot, and Aider all rely on application-level permission systems (ignore files, allow/deny lists) that can be bypassed. aigate moves that boundary into the OS kernel: POSIX ACLs, Linux namespaces, and egress allowlists physically block what the agent can read, execute, and reach on the network, regardless of what the model decides to try.

The most-starred tool in the AxeForge portfolio. See it on GitHub.

Live demo — simulated syscalls crossing the sandbox boundary, not a real sandbox
Diagram of an AI agent process enclosed by a kernel-enforced sandbox boundary. Three gates control what may cross: FILE, EXEC, and NETWORK. Allowed syscalls pass through their gate; blocked syscalls bounce back inside the boundary. AI agent process claude · cursor · aider allowed host api.anthropic.com File Exec Net

Every file read, command, and network call the agent makes is checked against your rules before it runs.

Blocked — kernel refuses, the process physically cannot cross Allowed — matches an explicit rule
How it works

The kernel is the trust boundary, not the app

Four enforcement layers, each backed by an OS primitive the sandboxed process cannot negotiate with.

File isolation

Persistent POSIX ACLs (setfacl) on Linux, extended ACLs (chmod +a) on macOS, deny read access at rest. At run time, mount namespaces overmount denied directories with empty tmpfs and files with /dev/null: two layers of defense-in-depth.

Filesystem scope

allowed_paths hides everything in $HOME except the working directory and paths you allow. Non-scoped files are invisible: reads fail, listings don't leak names, writes land in a discarded overlay.

Network isolation

Bubblewrap's --unshare-net plus slirp4netns and iptables/ip6tables restrict egress to your allow_net allowlist on Linux; Seatbelt network-outbound rules do the same on macOS.

Process isolation

User and PID namespaces (--unshare-user --unshare-pid) mean the sandboxed process can't see or signal anything on the host, and needs no real root to set up mounts and networking.

Cross-platform

Real isolation on every supported OS

aigate prefers bwrap when it's installed and falls back cleanly when it isn't; run aigate doctor to see which mode is active.

LayerLinux (bwrap)Linux (unshare fallback)macOS
FileDeclarative bind-mount overridesShell-script mount overridesSeatbelt file-read* deny rules
Network--unshare-net + slirp4netns + iptablesNested unshare + slirp4netns + iptablessandbox-exec network-outbound rules
Process--unshare-user --unshare-pid, sandboxed PID 1unshare --user --map-root-userEnforced by Sandbox.kext
Command execmount --bind deny stubs + arg-checking wrappersSame bind-mount stubs(deny process-exec) rules
Commands

From zero to sandboxed in five commands

01

setup

One-time, needs sudo. Creates the ai-agents OS group and ai-runner user that ACL rules attach to.

02

init

Writes ~/.aigate/config.yaml with sensible defaults: .env, secrets/, ~/.ssh/, and friends, denied out of the box.

03

deny / allow

Add or remove file, exec, and network rules, globally or per-project, via .aigate.yaml, which extends the global config.

04

run

Launches any AI tool inside the sandbox and prints exactly which restrictions are active to stderr before it starts.

05

doctor

Checks bwrap/slirp4netns/namespaces and prints a READY/DEGRADED/BLOCKED verdict, and exits non-zero so CI can gate on it.

Use cases

Why people reach for aigate

Regulated environments

GDPR/ISO/security teams need a trust boundary that isn't "the model chose not to read the file." ACLs and namespaces don't have that failure mode.

sudo aigate setup && aigate init

Stop credential exfiltration

Deny read on .env, secrets/, and SSH keys, then mask API keys and tokens that still make it into stdout.

aigate deny read .env secrets/ *.pem

Lock down egress

An agent that can only resolve the hosts you named can't phone home to anywhere else, curl an attacker's server, or exfiltrate over DNS.

aigate deny net --except api.anthropic.com

Gate it in CI

doctor exits non-zero when full isolation isn't available, so a pipeline can refuse to run an agent unsandboxed.

aigate doctor || exit 1
Install

Three commands to a sandboxed agent

Install the binary

curl -L https://github.com/AxeForging/aigate/releases/latest/download/aigate-linux-amd64.tar.gz | tar xz
sudo mv aigate-linux-amd64 /usr/local/bin/aigate

One-time system setup: sudo aigate setup && aigate init

Run any AI tool sandboxed: aigate run -- claude

Full instructions on GitHub