safe-pip
is a wrapper around the standard pip
command that checks the health score of a package from Snyk Advisor before installation. It informs you about the package's health and asks for confirmation before proceeding.
Install safe-pip
using pip:
pip3 install safe-pip
Use safe-pip just like you would use pip:
safe-pip install package_name
If you want to replace the pip command with safe-pip, you can create an alias or a symbolic link.
Use this one-liner to add the following line to your shell's configuration file (e.g., .bashrc, .zshrc):
echo "alias pip3='safe-pip'" >> ~/.zshrc
source ~/.zshrc
echo "alias pip3='safe-pip'" >> ~/.bashrc
source ~/.bashrc
alias -s pip3 "safe-pip"
The original pip could still be used by running:
python3 -m pip
- Python 3.x
- The following Python packages (will be installed automatically):
requests
colorama
This project is licensed under the MIT License.
Contributions are welcome! Please open an issue or submit a pull request.