CLI flags take precedence over environment variables, which in turn take precedence over the config file. See priority order.
Controls the verbosity of Safe Chain’s output.Values:
silent, normal, verboseDefault: normalsilent— suppresses all Safe Chain output except malware-blocked notificationsnormal— standard informational outputverbose— detailed diagnostic output, useful for troubleshooting
Sets the minimum age (in hours) a package must have before Safe Chain allows its installation.Values: Integer ≥ 0Default:
48A comma-separated list of package names or scopes to exclude from the minimum package age check. Supports
@scope/* wildcards to trust all packages from an organization.Exclusions from this variable are merged with any exclusions defined in the config file.The legacy variable name
SAFE_CHAIN_NPM_MINIMUM_PACKAGE_AGE_EXCLUSIONS is also accepted for backwards compatibility.A comma-separated list of npm registry hostnames that Safe Chain should scan in addition to the default npm registry.Registries from this variable are merged with any registries defined in the config file.
A comma-separated list of PyPI registry hostnames that Safe Chain should scan in addition to the default PyPI registry.Registries from this variable are merged with any registries defined in the config file.
Maximum time in milliseconds Safe Chain will wait for the pre-install malware scan to complete. If the scan does not finish within this window, Safe Chain throws an error and the installation is aborted.Default:
10000 (10 seconds)Takes precedence over the scanTimeout value in the config file.Usage examples
Set all variables for a CI/CD environment:Priority order
When the same setting is configured in multiple places, Safe Chain applies this precedence:- CLI flags (highest priority) — e.g.
--safe-chain-logging=verbose - Environment variables — e.g.
SAFE_CHAIN_LOGGING=verbose - Config file (
~/.safe-chain/config.json) — lowest priority