safe-chain binary
The safe-chain binary is the main CLI for managing Safe Chain’s shell integration and checking the installed version.
safe-chain setup
Installs shell integration for all supported shells detected on your system.
- Copies startup scripts to
~/.safe-chain/scripts/ - Detects all supported shells (Bash, Zsh, Fish, PowerShell, PowerShell Core)
- Adds Safe Chain wrapper functions for
npm,npx,yarn,pnpm,pnpx,bun,bunx,pip,pip3,uv,poetry, andpipxto each shell’s startup file - Adds interceptors so
python -m pip[...]andpython3 -m pip[...]route through Safe Chain
safe-chain teardown
Removes Safe Chain shell integration from all detected shells.
- Detects all supported shells on your system
- Removes the Safe Chain scripts from each shell’s startup file, restoring the original commands
safe-chain setup-ci
Installs Safe Chain for CI/CD environments by creating executable shims in ~/.safe-chain/shims and adding that directory to PATH. Use this instead of safe-chain setup in any non-interactive CI shell.
--ci flag:
safe-chain --version
Prints the currently installed version of Safe Chain. The -v short form is also accepted.
safe-chain help
Prints a summary of available commands. --help and -h are also accepted.
Package manager wrappers
Safe Chain providesaikido-* wrapper binaries for each supported package manager. These are the underlying executables that the shell integration aliases route through — you can also invoke them directly.
| Binary | Wraps |
|---|---|
aikido-npm | npm |
aikido-npx | npx |
aikido-yarn | yarn |
aikido-pnpm | pnpm |
aikido-pnpx | pnpx |
aikido-bun | bun |
aikido-bunx | bunx |
aikido-pip | pip |
aikido-pip3 | pip3 |
aikido-uv | uv |
aikido-poetry | poetry |
aikido-pipx | pipx |
aikido-python | python |
aikido-python3 | python3 |
safe-chain-verify subcommand
Pass safe-chain-verify as the first argument to any wrapped package manager to confirm that Safe Chain is active and working correctly.
OK: Safe-chain works!
Safe Chain flags
These flags can be appended to any package manager command. They are stripped from the arguments before the underlying package manager is invoked.Controls the verbosity of Safe Chain’s output.Values:
silent— suppresses all Safe Chain output except malware-blocked notificationsnormal— standard output (default)verbose— detailed diagnostic output, useful for troubleshooting
Sets the minimum age (in hours) a package must have before Safe Chain allows its installation. Must be an integer of 0 or greater.Default:
48Boolean flag that skips the minimum package age check entirely for the current invocation. No value is required.
Priority order
When the same setting is specified in multiple places, the order of precedence is:- CLI flags (highest priority)
- Environment variables
- Config file (
~/.safe-chain/config.json)