Skip to main content
Agent Safehouse is a single self-contained Bash script with no dependencies beyond macOS built-ins.

Prerequisites

Agent Safehouse requires macOS with sandbox-exec (available on all modern macOS versions).
  • macOS (tested on macOS 11+)
  • Bash or Zsh shell
  • curl for downloading the script

Install the CLI

1

Create local bin directory

Create a directory for local executables if it doesn’t exist:
2

Download safehouse

Download the self-contained script from GitHub:
The dist/safehouse.sh file is a single executable containing assembled policies and runtime logic.
3

Make executable

Set execute permissions:
4

Add to PATH

Ensure ~/.local/bin is in your PATH. Add to ~/.zshrc or ~/.bashrc:
Reload your shell:
5

Verify installation

Confirm safehouse is accessible:

Verify Sandbox Works

Test that the sandbox denies access to sensitive paths:
If you see “Operation not permitted”, the sandbox is working correctly!
Shell functions provide convenient shortcuts and machine-specific defaults. Add to ~/.zshrc or ~/.bashrc:
Reload your shell:
With shell functions, you can type claude instead of safehouse claude --dangerously-skip-permissions.

Bypass Shell Functions

To run the unsandboxed version when needed:

Optional: Local Overrides

For machine-specific policy exceptions (e.g., shared folders, team mounts), create a local override file:
1

Create config directory

2

Create local overrides file

Create ~/.config/agent-safehouse/local-overrides.sb:
Use Sandbox Profile Language (.sb) syntax for custom rules. See Policy Architecture for details.
3

Reference in shell function

Your shell function (from above) should include:
For single files, use --add-dirs-ro instead of creating a profile:

Optional: Claude Desktop Launcher

For sandboxing the Claude Desktop app (not CLI), use the pre-built launcher:
1

Download launcher

2

Launch from Finder

Double-click the .command file in Finder to launch Claude.app sandboxed.The launcher runs:
The --no-sandbox flag is required because Electron apps cannot be double-sandboxed. The outer Safehouse sandbox provides the protection.

Update Safehouse

To update to the latest version, re-download the script:
No uninstall needed - just delete ~/.local/bin/safehouse and remove shell functions from your .zshrc/.bashrc.

Next Steps

Quick Start

Get your first sandboxed agent running in 5 minutes

Usage Guide

Learn common patterns and CLI options