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

git-branch-master

v0.1.0

Published

Smart CLI tool for efficient Git branch management with interactive TUI

Readme

🌿 Git Branch Master

A smart CLI tool for efficient Git branch management. Find recent branches instantly and clean up old ones safely.

npm version license

🎯 Why Git Branch Master?

Ever struggled to remember which branch you were working on yesterday? Or accumulated dozens of old branches that clutter your repository? Git Branch Master solves these daily frustrations with an intuitive TUI.

Key Features

  • 🔍 Recent Branches - Instantly find and switch to recently used branches
  • 🧹 Smart Cleanup - Safely identify and remove merged/old branches
  • 🔄 Rollback Protection - Restore accidentally deleted branches
  • ⚙️ Configurable Base - Set your own base branch for comparisons
  • ✨ Beautiful TUI - Interactive interface built with Ink

📦 Installation

npm install -g git-branch-master
# or
pnpm add -g git-branch-master

🚀 Quick Start

# Interactive menu
gbm

# Show recent branches
gbm recent

# Clean up old branches
gbm clean

# Configure base branch
gbm config

📖 Commands

gbm recent

Shows your recently accessed branches with activity indicators:

  • Unmerged branches are prioritized
  • Shows ahead/behind counts relative to base
  • Quick branch switching with arrow keys

gbm clean

Analyzes branches for safe cleanup:

  • Safe: Merged branches older than 30 days
  • Review: Unmerged branches older than 90 days
  • Protected: Never deletes main/master branches
  • Full branch list (no hiding with "more")

gbm rollback [branch-name]

Recover deleted branches:

  • List all recently deleted branches
  • Restore specific branch by name
  • Backups kept for 30 days

gbm config

Configure base branch:

  • Auto-detects default branch from origin
  • Set custom base branch for comparisons
  • Reset to auto-detected default

⚡ Options

-b, --base <branch>    Use specific branch as base (default: auto-detect)
-h, --help            Show help

🎨 Branch Categories

Branches are categorized by activity:

  • Recent: < 7 days
  • Stale: 7-30 days
  • Old: 30-90 days
  • Ancient: > 90 days

And by type:

  • Local-only: No remote tracking
  • Not-merged: Has remote but not merged
  • Merged: Fully merged into base
  • Protected: Default branches (main/master)

⚙️ Configuration

Settings are stored in ~/.git-branch-master/config.json:

{
  "baseBranch": "develop"  // Optional, defaults to auto-detect
}

🛡️ Safety Features

  • Never deletes current branch
  • Protects default branches (main/master)
  • Local-only branches clearly marked
  • Rollback system for recovery
  • Confirmation before bulk operations

🤝 Contributing

Contributions are welcome! Please read our Contributing Guide first.

# Clone the repository
git clone https://github.com/kangju2000/git-branch-master.git

# Install dependencies
pnpm install

# Run development
pnpm dev

# Run tests
pnpm test

# Build
pnpm build

📄 License

MIT © kangju2000