Generates a sandbox policy file without executing a command. Use this mode when you want to inspect the policy or pass it to your own sandbox-exec invocation.
Generates a temporary policy file and prints its path to stdout.Example:
# Generate policy and capture pathpolicy_path=$(safehouse --enable=docker)# Use with your own sandbox-exec commandsandbox-exec -f "$policy_path" -- /usr/bin/true
Prints the generated policy content directly to stdout instead of creating a file.Example:
# View the policy textsafehouse --stdout# View policy with integrations enabledsafehouse --stdout --enable=docker,kubectl# Save policy to a filesafehouse --stdout > my-policy.sb
The -- separator is recommended to clearly distinguish policy options from command arguments.Examples:
# Run Claude CLI in sandboxsafehouse -- claude --dangerously-skip-permissions# Run with Docker integrationsafehouse --enable=docker -- docker ps# Run with custom workdirsafehouse --workdir=/path/to/project -- npm test
Safehouse automatically detects the command being executed and loads appropriate agent profiles:
# Loads Claude profile automaticallysafehouse -- claude# Detects npx wrapper and loads profile for actual commandsafehouse -- npx aider# Works with .app bundlessafehouse -- /Applications/Claude.app/Contents/MacOS/Claude