--option VALUE or --option=VALUE.
Policy Scope Options
—enable
Comma-separated list of optional features to enable.Format: See Integrations for the complete list of available features.
--enable FEATURES or --enable=FEATURESExamples:—workdir
Main directory to grant read/write access. The sandbox automatically grants full access to this directory and its contents.Special value: Empty string (Priority order:
--workdir="") disables automatic workdir grants entirely.Examples:--workdirflag (highest)SAFEHOUSE_WORKDIRenvironment variable- Current working directory (default)
—add-dirs-ro
Colon-separated file/directory paths to grant read-only access.Format: Paths from the flag are combined with
--add-dirs-ro PATHS or --add-dirs-ro=PATHSExamples:SAFEHOUSE_ADD_DIRS_RO environment variable.—add-dirs
Colon-separated file/directory paths to grant read/write access.Format: Paths from the flag are combined with
--add-dirs PATHS or --add-dirs=PATHSExamples:SAFEHOUSE_ADD_DIRS environment variable.—env
Controls environment variable passing to the sandboxed command.Mode 1: Full passthrough (Mode 2: Load from file (The file is sourced by Bash, not parsed as dotenv. File values override sanitized defaults.Default: Sanitized environment with safe variables only (PATH, HOME, USER, etc.)
--env)--env=FILE)--env (passthrough) cannot be combined with --env=FILE or --env-pass.—env-pass
Comma-separated environment variable names to pass through on top of sanitized defaults.Format: Compatible with default sanitized mode and
--env-pass NAMES or --env-pass=NAMESCan be specified multiple times; names are deduplicated.Examples:--env=FILE. Incompatible with --env (passthrough).—trust-workdir-config
Trust and load configuration from Supported config file keys:
<workdir>/.safehouse file.Format: --trust-workdir-config or --trust-workdir-config=BOOLAccepted boolean values: 1, 0, true, false, yes, no, on, offExamples:add-dirs-ro=PATHSadd-dirs=PATHS
—append-profile
Append an additional sandbox profile file after generated rules. Can be specified multiple times.Format:
--append-profile PATH or --append-profile=PATHFiles are appended in argument order. Later rules override earlier ones.Examples:This is the most powerful customization option. Use it to:
- Add custom allow rules
- Override default denials
- Create project-specific policies
—output
Write policy to a specific file path instead of a temporary file.Format:
--output PATH or --output=PATHWhen specified, the policy file persists after execution (not automatically cleaned up).Examples:Output Options
—stdout
Print policy text to stdout instead of executing a command.Forces policy mode even if a command is provided.Examples:
—explain
Print detailed policy decision summary to stderr.Shows:
- Effective workdir and source
- All path grants (read-only and read-write)
- Selected agent profiles and reasons
- Optional integration selections
- Config file status (found/trusted/loaded)
Use
--explain to understand:- Why files are accessible or blocked
- Which profiles are active
- Where configuration values originate
General Options
—help
Show help message and exit.Aliases:
-h, --helpEnvironment Variables
All major options have environment variable equivalents:CLI flags take precedence over environment variables when both are specified.
Priority & Precedence
Path Grants Assembly Order
- Core system profiles (base, runtime, network, toolchains)
- Shared profiles and core integrations (git, scm-clis)
- Optional integrations from
--enable - Agent/app profiles (auto-detected from command)
--add-dirs-ropaths (CLI + environment variable)--add-dirspaths (CLI + environment variable)- Workdir grant (if not disabled)
--append-profileoverlays (in argument order)
--append-profile take precedence over all earlier allows.
Configuration Sources Priority
For--workdir:
--workdirflag (highest)SAFEHOUSE_WORKDIRenvironment variable- Current working directory (default)
--trust-workdir-config:
--trust-workdir-configflag (highest)SAFEHOUSE_TRUST_WORKDIR_CONFIGenvironment variablefalse(default)
Path Combination Rules
--add-dirs-roflag +SAFEHOUSE_ADD_DIRS_RO→ combined (both applied)--add-dirsflag +SAFEHOUSE_ADD_DIRS→ combined (both applied).safehouseconfig file paths → combined with CLI/env (if trusted)