npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dev-utils-cli

v1.0.7

Published

A collection of useful development utility commands for git operations and project cleanup

Readme

Dev Utils CLI

A collection of useful development utility commands for git operations and project cleanup.

🚀 Quick Start

You can use these tools directly with npx without installing them globally:

# Git branch sync
npx git-sync-branches [remote-name]

# Delete node_modules folders
npx delete-node-modules [path]

# Or use the main CLI
npx dev-utils-cli --help

📦 Available Commands

1. Git Branch Sync (git-sync-branches)

Syncs all branches from the origin remote to another remote repository.

# Sync all branches from origin to 'bu' remote (default)
npx git-sync-branches

# Sync all branches from origin to a custom remote
npx git-sync-branches backup
npx git-sync-branches upstream

What it does: Replicates this bash command with enhanced features:

git branch -r | grep "origin/" | grep -v "origin/HEAD" | sed 's/origin\///' | while read branch; do
    echo "Pushing branch: $branch"
    git push bu origin/$branch:$branch
done

Features:

  • ✅ Error handling and validation
  • ✅ Progress reporting
  • ✅ Summary statistics
  • ✅ Cross-platform compatibility
  • ✅ Customizable target remote
  • ✅ Help documentation

2. Delete Node Modules (delete-node-modules)

Recursively finds and deletes all node_modules folders in a directory tree.

# Interactive mode - will ask for path
npx delete-node-modules

# Delete from specific path
npx delete-node-modules /path/to/project

# Delete from current directory
npx delete-node-modules .

Features:

  • ✅ Recursive directory scanning
  • ✅ Safety confirmation before deletion
  • ✅ Progress reporting
  • ✅ Error handling for permission issues
  • ✅ Summary statistics

🛠️ Usage Examples

Git Branch Sync

# Basic usage - sync to 'bu' remote
npx git-sync-branches

# Sync to a different remote
npx git-sync-branches backup

# Show help
npx git-sync-branches --help

Delete Node Modules

# Interactive mode
npx delete-node-modules

# Clean specific directory
npx delete-node-modules ~/projects

# Clean current directory
npx delete-node-modules .

# Show help
npx delete-node-modules --help

Main CLI

# Show all available commands
npx dev-utils-cli --help

# Show version
npx dev-utils-cli --version

📋 Requirements

  • Node.js 12.0.0 or higher
  • For git commands: Git repository with configured remotes
  • For delete-node-modules: Appropriate file system permissions

🏗️ Project Structure

dev-utils-cli/
├── package.json              # NPM package configuration
├── cli.js                    # Main CLI entry point
├── commands/                 # Individual command modules
│   ├── sync-branches.js      # Git branch sync command
│   └── delete-node-modules.js # Node modules cleanup command
├── lib/                      # Shared utilities
│   ├── git-utils.js          # Git-related helper functions
│   └── fs-utils.js           # File system helper functions
└── README.md                 # This file

🔧 Local Development

If you want to modify or contribute to these tools:

# Clone/download the files
# No dependencies required for basic functionality

# Test individual commands
node commands/sync-branches.js --help
node commands/delete-node-modules.js --help

# Test main CLI
node cli.js --help

🚀 Publishing

To publish this as an npm package:

# Publish to npm (requires npm account)
npm publish

# Then anyone can use the commands
npx dev-utils-cli --help
npx git-sync-branches
npx delete-node-modules

🤝 Adding New Commands

To add a new command:

  1. Create a new file in commands/your-command.js
  2. Add the shebang: #!/usr/bin/env node
  3. Export a function that handles the command logic
  4. Add the command to package.json bin section
  5. Update the main CLI help text

Example:

#!/usr/bin/env node

function showHelp() {
  console.log("Your command help text");
}

module.exports = function (args) {
  if (args.includes("-h") || args.includes("--help")) {
    showHelp();
    process.exit(0);
  }

  // Your command logic here
};

📝 License

MIT