Quickstart Guide
Get started with SafeDep PMG - Package Manager Guard that protects against malicious open source packages
PMG Repository
View the PMG source code and contribute on GitHub
Package Manager Guard (PMG) protects developers from getting compromised by malicious packages by wrapping your favorite package manager and blocking malicious packages at install time.
PMG requires no configuration - just install and use it as you normally would with your package managers.
What is PMG?
PMG is a security wrapper for package managers that:
- Blocks malicious packages at install time using SafeDep Cloud
- Performs deep dependency analysis and transitive dependency resolution
- Works seamlessly with existing package managers
- Requires zero configuration - just install and use
- Protects in real-time without slowing down your workflow
Installation
Using Homebrew (Recommended)
Using Go Install
Download Binary
Download the latest release from our GitHub releases page and add it to your PATH.
Quick Setup
Automated Setup (Recommended)
The easiest way to get started is with pmg’s automated setup:
This command will:
- Create a
~/.pmg.rc
file containing package manager aliases - Add a source line to your shell configuration files
- Support bash, zsh, and fish shells
After running pmg setup install
, restart your terminal or run source ~/.zshrc
(or your shell’s config file) to activate the aliases.
Manual Usage (Alternative)
You can also run pmg manually without aliases:
If pmg detects a malicious package, it will block the installation and show you a warning.
Supported Package Managers
PMG currently supports the following package managers:
Package Manager | Status | Command Example |
---|---|---|
npm | Active | npm install <package> |
pnpm | Active | pnpm add <package> |
pip | Active | pip install <package> |
yarn | Planned | Coming soon |
poetry | Planned | Coming soon |
uv | Planned | Coming soon |
Troubleshooting
If pmg isn’t working after setup:
- Restart your terminal
- Check that aliases were created:
which npm
should point to pmg - Verify pmg installation:
pmg version
If packages are incorrectly blocked:
- Run with
--verbose
to see detection details - Check the SafeDep community for known issues
- Report false positives on GitHub Issues
Next Steps
- See the pmg repository for complete documentation and examples
- Learn why PMG is needed for modern development
- Understand how PMG works in detail
- Join our Discord community for support
- Check out other SafeDep tools like vet and SafeDep Cloud
Run pmg --help
to see all available commands and options. PMG is designed to be transparent - you should barely notice it’s there until it protects you from a malicious package!