Verification & diagnostics
Use these steps to confirm Safe Chain is installed and working before investigating further.Check installed version
Verify shell integration
Run the verification command for your package manager:OK: Safe-chain works!
Test malware blocking
Verify that malware detection is active by attempting to install a test package that is flagged as malware:- JavaScript / Node.js
- Python
Enable verbose logging
Get detailed diagnostic output for any package manager command:Common issues
Malware not being blocked
Malware not being blocked
Symptom: Test malware packages (e.g.
safe-chain-test) install successfully when they should be blocked.Most common cause: The package is already cached in your package manager’s local store. Safe Chain intercepts network requests to the registry through its proxy. When a package is cached locally, the package manager skips the network request and bypasses the proxy.Resolution:Shell aliases not working after installation
Shell aliases not working after installation
Symptom: Running Expected output:
npm (or another wrapped command) shows the original tool instead of the Safe Chain-wrapped version.First step: Restart your terminal. This is the most common fix.Verify the alias is active:npm is a functionIf still not working, check that your shell’s startup file sources Safe Chain scripts from ~/.safe-chain/scripts/:| Shell | Startup file |
|---|---|
| Bash | ~/.bashrc |
| Zsh | ~/.zshrc |
| Fish | ~/.config/fish/config.fish |
| PowerShell / PowerShell Core | $PROFILE |
"Command not found: safe-chain"
"Command not found: safe-chain"
Symptom: The The output should contain
safe-chain binary is not found after installation.First step: Restart your terminal.Check that ~/.safe-chain/bin is in your PATH:~/.safe-chain/bin.If the issue persists, re-run the installation script.PowerShell execution policy blocks scripts (Windows)
PowerShell execution policy blocks scripts (Windows)
Symptom: When opening PowerShell you see an error similar to:Cause: Windows PowerShell’s default execution policy (
Restricted) blocks all script execution, including Safe Chain’s initialization script that is sourced from your PowerShell profile.Resolution:Set the execution policy to allow local scripts
Open PowerShell as Administrator and run:
RemoteSigned allows local scripts (like Safe Chain’s) to run without signing, while requiring downloaded scripts to be signed by a trusted publisher. This is Microsoft’s recommended execution policy for client computers.Shell aliases persist after uninstallation
Shell aliases persist after uninstallation
Symptom: Safe Chain commands are still active after running the uninstall script.Resolution:
Manually edit your shell config file if aliases persist
Open the relevant startup file and remove any lines that source scripts from
~/.safe-chain/scripts/:| Shell | Startup file |
|---|---|
| Bash | ~/.bashrc |
| Zsh | ~/.zshrc |
| Fish | ~/.config/fish/config.fish |
| PowerShell / PowerShell Core | $PROFILE |
Manual cleanup
The install and uninstall scripts handle these steps automatically. Use the commands below only if automatic cleanup fails.
Remove npm global installation
Remove installation directory
Clean shell configuration files
Manually remove Safe Chain entries from your shell’s startup file:| Shell | Startup file |
|---|---|
| Bash | ~/.bashrc |
| Zsh | ~/.zshrc |
| Fish | ~/.config/fish/config.fish |
| PowerShell / PowerShell Core | $PROFILE |
~/.safe-chain/scripts/ or define Safe Chain wrapper functions.
Reporting issues
If you are still experiencing problems after following this guide:- Visit GitHub Issues
- Include the following information:
- Operating system and version
- Shell type and version
- Output of
safe-chain --version - Output of the relevant
safe-chain-verifycommand - Verbose logs from the failing command (append
--safe-chain-logging=verbose)