mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
Publish pmg to npm (#50)
* feat: pmg publish to npm * feat: add github action for publishing to npm * Update publish/npm/install.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Sahil Bansal <bansalsahil315@gmail.com> * Update .github/workflows/publish-npm.yml Co-authored-by: Omkar Phansopkar <omkarphansopkar@gmail.com> Signed-off-by: Sahil Bansal <bansalsahil315@gmail.com> * refactor: define constants * refactor: improve npm package reliability with removing dynamic handlers and better error handling and validation * fix: publish-npm workflow * Update publish/npm/test.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Sahil Bansal <bansalsahil315@gmail.com> * refactor(npm-workflow): use a more portable loop construct * refactor: remove version field from package.json * feat: use os.tmpdir() with mkdtempSync for cleaner temp directory handling * fix: add redirect limit and cleanup to prevent infinite redirects and resource leaks * remove test.js for npm publisher pack * chore: test cmd cleanup --------- Signed-off-by: Sahil Bansal <bansalsahil315@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Omkar Phansopkar <omkarphansopkar@gmail.com>
This commit is contained in:
co-authored by
Copilot
Omkar Phansopkar
parent
ca752edf79
commit
74248cd74a
@@ -0,0 +1,60 @@
|
||||
# PMG - Package Manager Guard
|
||||
|
||||
|
||||
🤖 PMG protects developers from getting compromised by malicious open source packages.
|
||||
|
||||
This is the npm distribution of PMG, a tool that wraps your favorite package manager (e.g., `npm`) and blocks malicious packages at install time.
|
||||
|
||||
## Installation
|
||||
|
||||
Install PMG globally via npm:
|
||||
|
||||
```bash
|
||||
npm install -g @safedep/pmg
|
||||
```
|
||||
|
||||
Or using Homebrew:
|
||||
|
||||
```bash
|
||||
brew tap safedep/tap
|
||||
brew install safedep/tap/pmg
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Set up PMG to automatically protect your package installations:
|
||||
|
||||
```bash
|
||||
# Recommended: Set up automatic protection
|
||||
pmg setup install
|
||||
```
|
||||
|
||||
After setup, use your package managers normally:
|
||||
|
||||
```bash
|
||||
# Your regular commands are now protected
|
||||
npm install express
|
||||
pnpm add react
|
||||
pip install requests
|
||||
```
|
||||
|
||||
Or use PMG manually without setup:
|
||||
|
||||
```bash
|
||||
# Manual protection (alternative)
|
||||
pmg npm install express
|
||||
pmg pnpm add react
|
||||
pmg pip install requests
|
||||
```
|
||||
|
||||
## Platform Support
|
||||
|
||||
- ✅ **macOS** (Intel & Apple Silicon)
|
||||
- ✅ **Linux** (x86_64, ARM64, i386)
|
||||
- ✅ **Windows** (x86_64, ARM64, i386)
|
||||
|
||||
Requires Node.js 14 or higher.
|
||||
|
||||
---
|
||||
|
||||
For complete documentation, advanced usage, troubleshooting, and more information, please visit: **[github.com/safedep/pmg](https://github.com/safedep/pmg)**
|
||||
Reference in New Issue
Block a user