Skip to content
GitHubOpen source
Product
Docs
Solutions
IndustriesAll industries
CompareCompare all AI data-leak tools
Benchmarks
GitHubApache-2.0

CLI

shadow [--config <path>] [--data-dir <dir>] <command>
Global flagDescription
--config <path>Path to shadow.toml. Default <data dir>/shadow.toml. Also read from SHADOW_CONFIG. An explicit path that doesn’t exist is an error
--data-dir <dir>Data directory. Default $SHADOW_HOME or the platform data directory
-h, --helpHelp for any command
-V, --versionPrint the version

Logs go to stderr. shadow run logs at info by default, every other command at warn. Override with RUST_LOG.

CommandPurpose
initCreate the persona, vault key and local CA
runRun the proxy and gateway in the foreground
install / uninstallBackground service and CA trust (dry run by default)
statusConfiguration, persona, vault and proxy health
identityShow the persona
mask / unmaskTranslate stdin to stdout
scanReport sensitive values in a file
vaultInspect, export or edit the vault
termsManage protected dictionary terms
hostsList intercepted hosts and gateway routes
topLive activity view in the terminal
activityPrint an activity summary
dashboardOpen the web activity dashboard

Create the persona, vault key and local CA. Writes a minimal shadow.toml if none exists.

Terminal window
shadow init [--region <CODE>] [--org <NAME>]... [--force]
FlagDescription
--region <CODE>Fake region: CN, JP, KR, BR, US, DE, IN, AU, MX, ZA, CA, or auto. Ignored if a persona exists (use --force)
--org <NAME>Organisation name to protect. Repeatable. The first maps to the persona company
--forceDelete the existing persona and vault and start over

Also writes ca/bundle.pem (system roots + Shadow CA). Safe to run again: existing files are kept unless --force is given.

Run the forward proxy and the /gw gateway in the foreground until Ctrl-C.

Terminal window
shadow run [--listen <ADDR>]
FlagDescription
--listen <ADDR>Listen address. Default [proxy] listen, i.e. 127.0.0.1:8877. Warns if not loopback

On start it prints the persona, the gateway URL pattern, the proxy setting and the CA path, and the upstream proxy if one is configured.

Install the background service and trust the local CA. Prints the plan; performs it only with --apply.

Terminal window
shadow install [--apply] [--listen <ADDR>]
FlagDescription
--applyPerform the steps. Without it, nothing changes
--listen <ADDR>Listen address for the service

Creates the persona, key and CA first if needed. After the plan, it prints how to point tools at Shadow (gateway URLs, the proxy environment, and the macOS PAC command). With --apply, it also writes env.sh (env.ps1 on Windows) to the data directory. See Installation for the per-OS steps.

Remove the background service and the CA trust. Same flags as install, also a dry run unless --apply. The data directory is left in place.

Terminal window
shadow status [--quiet]

Shows whether the proxy answers on the configured address, the data directory, the persona, the vault size and creation date, the CA path and SHA-256 fingerprint, the model detector, and the upstream proxy.

FlagDescription
--quietPrint nothing; exit 0 if the proxy answers, 1 otherwise. Useful for health checks
Terminal window
shadow identity [--json]

Show the persona: company and domain, primary person and email, location, timezone and locale, user id, username, hostname and colleagues. --json prints the full persona.json record.

Mask stdin to stdout. Uses and updates the same vault as the proxy.

Terminal window
echo "Mail jane@acme.com" | shadow mask
shadow mask --json < request.json
FlagDescription
--jsonParse stdin as JSON and mask string values only (protocol keys are skipped). Output is pretty-printed

Unmask stdin to stdout.

Terminal window
shadow unmask < answer.txt
shadow unmask --json < response.json
FlagDescription
--jsonParse stdin as JSON and unmask every string value

Report sensitive values in a file without changing anything or touching the vault.

Terminal window
shadow scan <FILE> [--reveal] [--json]
FlagDescription
--revealPrint full values instead of redacted previews (ja*********om)
--jsonOutput a JSON array of {kind, line, column, detector, score, value}

The table output shows KIND, AT (line:column), VALUE and DETECTOR.

Terminal window
shadow vault stats
shadow vault export --i-understand
shadow vault forget <VALUE>
SubcommandDescription
statsEntry counts by kind and the vault’s creation time
export --i-understandPrint every real↔fake pair as JSON. Contains real values in clear text, so the flag is required
forget <VALUE>Remove the mapping for a real or a fake value
Terminal window
shadow terms add <TERM>...
shadow terms list
SubcommandDescription
add <TERM>...Protect one or more terms. Prefix with person:, org:, term:, hostname:, email: or username: to set the kind. Prints the fake each term maps to. Stored in terms.json
listList all protected terms (from config, organization and terms.json) with their kinds
$ shadow terms add "Project Falcon" "person:Jane Doe"
✓ Project Falcon → Lumeth Draane
✓ person:Jane Doe → Xiu Wang

List the hosts intercepted in proxy mode (built-ins plus extra_hosts, with bypass_hosts marked) and the gateway routes (built-ins plus [proxy.routes]).

Terminal window
shadow hosts

A live, full-screen view of the running proxy’s activity: totals, a timeline, and breakdowns by data type, destination and app. --demo shows synthetic data instead.

Terminal window
shadow top [--demo]

Print the activity summary as plain tables, or as JSON with --json. --window (-w) is 1h, 24h (default), 7d, 30d or today. --demo summarises synthetic data.

Terminal window
shadow activity [--window <WINDOW>] [--json] [--demo]

Open the web dashboard (http://127.0.0.1:8877/shadow/ui) in your browser. --print prints the URL instead; --demo opens it with synthetic data.

Terminal window
shadow dashboard [--demo] [--print]
CodeMeaning
0Success
1Error (message printed to stderr as error: ...), or status --quiet with the proxy down
2Invalid command-line usage