
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
A tool to reuse Node.js packages across projects by linking instead of reinstalling
A CLI tool to reuse Node.js packages across multiple projects by creating symlinks instead of duplicating them. This saves disk space and speeds up project setup by sharing common dependencies.
# Install globally from npm
npm install -g reusepkg
# Verify installation
reusepkg --version
# Use directly without installation
npx reusepkg --help
# Run commands directly
npx reusepkg link
npx reusepkg doctor
# Install in a specific project
npm install reusepkg
# Use via npx
npx reusepkg link
# Install packages (reuses existing installations when possible)
reusepkg install <package-name> [version]
reusepkg i <package-name> [version]
# Link project dependencies from global store
reusepkg link
# Check project dependencies for issues
reusepkg doctor
# List all packages in global store
reusepkg list
# Search for a package in global store and npm
reusepkg search <package-name>
# Clean up unused packages
reusepkg clean
# Uninstall reusepkg and clean global store
reusepkg uninstall
reusepkg install / reusepkg iInstall packages by reusing existing installations when possible.
# Install latest version
reusepkg install express
reusepkg i express
# Install specific version
reusepkg install lodash@4.17.21
reusepkg i lodash@4.17.21
How it works:
Smart Reuse Strategy:
~/projects, ~/workspace, etc.)reusepkg linkReads package.json in the current directory and processes dependencies intelligently. If a dependency is already available in the global registry, it creates a symlink. If not found, it adds the current project's package address to the registry.
# In your project directory
reusepkg link
What it does:
dependencies, devDependencies, and peerDependencies from package.jsonreusepkg doctorChecks project dependencies for issues like missing or broken symlinks.
reusepkg doctor
What it checks:
node_modules/reusepkg listShows all package addresses tracked in the global registry with their locations and status.
reusepkg list
Output example:
📦 Global registry contains 2 package addresses:
📦 express:
✅ 5.1.0 (C:\Users\username\project-a\node_modules\express)
Source: current-project
📦 axios:
✅ latest (C:\Users\username\project-b\node_modules\axios)
Source: existing-installation
reusepkg searchSearch for a package in both the global store and npm registry.
reusepkg search <package-name>
What it does:
Example:
reusepkg search express
Output example:
🔍 Searching for express...
✅ Found 2 package(s) in global store:
✅ express@4.18.2 (C:\Users\username\.reusepkg\store\express\4.18.2)
✅ express@5.0.0 (C:\Users\username\.reusepkg\store\express\5.0.0)
🌐 Checking npm registry for express...
✅ Package "express" is available on npm:
📦 Name: express
📝 Description: Fast, unopinionated, minimalist web framework
🏷️ Latest Version: 5.1.0
📊 Downloads: 25,000,000
🏷️ Keywords: express, framework, sinatra, web, http
reusepkg cleanRemoves broken package addresses from the global registry.
reusepkg clean
What it does:
reusepkg uninstallUninstalls reusepkg and optionally removes the global store.
reusepkg uninstall
What it does:
~/.reusepkg)~/.reusepkg/
└── registry.json # Package address registry
The registry.json file maps package names and versions to their actual installation locations:
{
"express@5.1.0": {
"name": "express",
"version": "5.1.0",
"storePath": "/Users/username/project-a/node_modules/express",
"addedAt": "2024-01-15T10:30:00.000Z",
"source": "current-project"
}
}
fs.symlinkSync)# Project A
cd project-a
npm install express # Install express normally
reusepkg link # Adds express address to global registry
# Project B
cd project-b
reusepkg link # Finds express in registry, creates symlink!
# Project A
cd project-a
npm install express@4.18.2 # Install specific version
reusepkg link # Adds address to registry
# Project B
cd project-b
npm install express@5.0.0 # Install different version
reusepkg link # Adds different address to registry
# After deleting projects
reusepkg doctor # Detects broken symlinks
reusepkg clean # Removes broken addresses from registry
HOME (Linux/macOS) or USERPROFILE (Windows): Determines global registry location~/.reusepkg/The tool reads from standard package.json fields:
dependenciesdevDependenciespeerDependenciesreusepkg is now officially available on npm! 🚀
The tool has been tested and verified to work across all major platforms and use cases:
"No package.json found"
reusepkg link in a directory with package.json"Symlink creation failed"
"Permission denied"
"Broken symlinks detected"
reusepkg doctor to identify and fix broken linksreusepkg clean to remove broken addresses from registryWe welcome contributions! Here's how you can help:
git clone https://github.com/yourusername/reusepkg.git
cd reusepkg
git checkout -b feature/amazing-feature
node reusepkg.js --help
git commit -m 'Add amazing feature'
git push origin feature/amazing-feature
# Clone the repository
git clone https://github.com/yourusername/reusepkg.git
cd reusepkg
# Install dependencies
npm install
# Test the tool
node reusepkg.js --help
To completely remove reusepkg from your system:
# Remove the global package
npm uninstall -g reusepkg
# Clean up global registry (optional)
rm -rf ~/.reusepkg # Linux/macOS
rmdir /s ~/.reusepkg # Windows
# Check if reusepkg is removed
reusepkg --version # Should show "command not found"
# Check if global registry is removed
ls ~/.reusepkg # Should show "No such file or directory"
This project is licensed under the MIT License - see the LICENSE file for details.
pnpm and yarn for efficient package managementMade with ❤️ for the Node.js community
FAQs
A tool to reuse Node.js packages across projects by linking instead of reinstalling
The npm package reusepkg receives a total of 0 weekly downloads. As such, reusepkg popularity was classified as not popular.
We found that reusepkg demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.