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

repo-ninja

v2.7.2

Published

A CLI tool to streamline repo management tasks.

Readme

🚀 repo-ninja

A CLI tool to automate repo management tasks.

📌 Features:

  • 📦 Automates versioning (patch, minor, major)
  • 🏷 Creates & cleans beta tags
  • 🛠 Manages local branches
  • 🔍 Ensures repo cleanliness before key actions
  • Easily integrates into package.json scripts

📌 Installation

You can install repo-ninja either globally or as a dev dependency.

Option 1: Global Installation

npm install -g repo-ninja

📌 This allows you to run repo-ninja from anywhere:

repo-ninja version-bump patch
repo-ninja beta-tag

Option 2: Install as Dev Dependency

npm install --save-dev repo-ninja

📌 Then, add repo-ninja to your package.json scripts (see below).


📌 Usage

Run repo-ninja --help to see available commands:

repo-ninja --help

Available Commands

repo-ninja link                   # Ensure repo-ninja is properly linked
repo-ninja reinstall              # Remove node_modules and reinstall dependencies
repo-ninja version-bump <type>     # Bump version (patch, minor, major)
repo-ninja tag-release            # Tag and push the latest version
repo-ninja beta-tag               # Create a beta tag
repo-ninja beta-check-tag          # Check if the last commit has a beta tag
repo-ninja clean-beta             # Remove obsolete beta tags
repo-ninja clean-local-branches   # Remove local branches that no longer exist on remote
repo-ninja branch-guard <mode>    # Ensure the correct branch is checked out
                                  # Modes:
                                  #   require-default  (Fail if NOT on default branch)
                                  #   block-default    (Fail if ON default branch)
repo-ninja check-clean-workspace  # Ensure no uncommitted changes

Options

repo-ninja <command> --dry-run   # Simulate the command without making changes
repo-ninja --help                # Show this help message

📌 Package.json Integration Example

{
  "scripts": {
    "reinstall": "repo-ninja reinstall",
    "beta": "repo-ninja beta-tag",
    "patch": "repo-ninja version-bump patch",
    "minor": "repo-ninja version-bump minor",
    "major": "repo-ninja version-bump major",
    "check": "repo-ninja version -c -e -s -v ./src/version.ts",
    "prepublishOnly": "npm run check && npm run reinstall && npm run test",
    "branchCheck:main": "repo-ninja branch-guard require-default",
    "branchCheck:dev": "repo-ninja branch-guard block-default",
    "cleanBranches:dry": "repo-ninja clean-local-branches --dry-run",
    "cleanBranches": "repo-ninja clean-local-branches"
  }
}

Then, run them like this:

npm run patch
npm run beta
npm run reinstall

📌 Examples

Bump a Patch Version

repo-ninja version-bump patch

🔼 This will:

  1. Check for uncommitted changes
  2. Ensure you're on the default branch
  3. Update package.json.version
  4. Generate version.ts
  5. Commit & tag the new version

Check If the Last Commit Has a Beta Tag

repo-ninja beta-check-tag

🔍 This will:

  • Check if the last commit is tagged with a beta version
  • Exit with success if a beta tag exists
  • Fail if no beta tag is found

To run in dry-run mode (only warn, no failure):

repo-ninja beta-check-tag --dry-run

Clean Old Local Branches

repo-ninja clean-local-branches --dry-run

🔍 This will:

  • List local branches that no longer exist on the remote
  • Warn if uncommitted changes exist
  • No branches will be deleted in dry-run mode

Run without --dry-run to actually delete them:

repo-ninja clean-local-branches

📌 Contributing

Want to improve repo-ninja? Check out our contribution guide! 🚀