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

gitmap

v1.0.0

Published

Visualize git commands, flags, and their relationships in your terminal

Downloads

106

Readme

GitMap

A CLI tool and web app that visualizes git commands, their flags, relationships, conflicts, and common usage patterns — right in your terminal or browser.

Features

CLI

  • Command Explorer - View detailed info about any git command with flags, examples, and tips
  • Interactive Mode - Browse all commands by category with keyboard navigation
  • Search - Fuzzy search across all commands, flags, and descriptions
  • Compare - Side-by-side comparison of similar commands (rebase vs merge, etc.)
  • Cheatsheets - Quick reference guides for common workflows (13 topics)

Web Interface

  • Visual Graph - Interactive D3 visualization of command relationships
  • Flag Builder - Build git commands by selecting flags interactively
  • Workflow Guides - Step-by-step guides with progress tracking
  • Quiz Mode - Test your git knowledge with auto-generated questions
  • State Diagram - Visualize how commands affect working dir, staging, repo, and remote
  • Pitfalls & Tips - Learn common mistakes and how to avoid them

Installation

From npm (Recommended)

# Install globally
npm install -g gitmap

# Now use anywhere
gitmap commit
gitmap web

From Source

# Clone and install
git clone https://github.com/vsthakur101/gitmap.git
cd gitmap
npm install

# Link for global usage
npm link

# Or run directly
node bin/gitmap.js <command>

Usage

Explore a Command

gitmap commit
gitmap rebase
gitmap stash

Output:

╭─────────────────────────────────────────────────╮
│  git commit                                     │
│  Record changes to the repository               │
├─────────────────────────────────────────────────┤
│  FLAGS                                          │
│  -m, --message <msg> ★                          │
│    Use the given message as the commit message  │
│  --amend ★                                      │
│    Replace the tip of the current branch...    │
│  ...                                            │
│                                                 │
│  COMMON COMBINATIONS                            │
│  git commit -am "msg"     Stage + commit        │
│  git commit --amend --no-edit  Quick amend      │
│                                                 │
│  RELATED COMMANDS                               │
│  git add → git commit → git push                │
╰─────────────────────────────────────────────────╯

Interactive Mode

gitmap

Navigate with arrow keys, Enter to select, Escape to go back, q to quit.

Search

gitmap search "undo"
gitmap search "branch delete"
gitmap search --natural "how to undo last commit"

Compare Commands

gitmap compare rebase merge
gitmap compare reset revert
gitmap compare fetch pull
gitmap compare checkout switch

Cheatsheets

gitmap cheat              # List available cheatsheets
gitmap cheat quick        # Quick reference
gitmap cheat branching    # Branching commands
gitmap cheat undo         # Undo operations
gitmap cheat remote       # Remote commands
gitmap cheat stash        # Stash commands
gitmap cheat log          # Log and history
gitmap cheat rebase       # Interactive rebase
gitmap cheat cicd         # CI/CD workflows
gitmap cheat monorepo     # Monorepo operations
gitmap cheat submodules   # Git submodules
gitmap cheat hooks        # Git hooks
gitmap cheat recovery     # Recovery operations
gitmap cheat security     # Security best practices

List Commands

gitmap list                    # All categories
gitmap list branching          # Commands in category
gitmap list remote             # Remote commands

Related Commands

gitmap related commit          # Commands related to commit
gitmap related branch          # Commands related to branch

CLI Options

gitmap <command>              # View command details
gitmap <command> --flags-only      # Show only flags
gitmap <command> --examples-only   # Show only examples
gitmap <command> --json           # Output as JSON
gitmap --no-color                 # Disable colors

Available Cheatsheets

| Name | Description | |------|-------------| | quick | Most common commands | | branching | Branch operations | | undo | Undo and recovery | | remote | Remote operations | | stash | Stash management | | log | Log and history | | rebase | Interactive rebase | | cicd | CI/CD workflows (shallow clones, tags, PRs) | | monorepo | Monorepo operations (sparse checkout, subtree) | | submodules | Git submodules management | | hooks | Git hooks setup and usage | | recovery | Recovering lost commits and files | | security | Signing commits, removing secrets |

Pre-written Comparisons

| Commands | Key Differences | |----------|----------------| | rebase vs merge | History rewriting vs preserving | | reset vs revert | Local vs pushed commits | | fetch vs pull | Download only vs download + merge | | checkout vs switch | Multi-purpose vs branch-only | | merge vs cherry-pick | Whole branch vs specific commits | | stash vs commit | Temporary vs permanent | | reset --soft vs --hard | Keep vs discard changes |

Web Interface

Launch the interactive web visualizer:

# Start the web UI (uses pre-built static files)
gitmap web

# Custom port
gitmap web --port 4000

# Development mode (if you cloned from source)
gitmap web --dev

Views

| View | Description | |------|-------------| | Explorer | Browse commands by category with full details | | Graph | Interactive D3 visualization of command relationships | | Compare | Side-by-side command comparisons | | Cheatsheets | Quick reference guides | | Flag Builder | Build commands by selecting flags | | Workflows | Step-by-step workflow guides | | State Diagram | Visualize git areas (working dir, staging, repo) | | Quiz | Test your git knowledge |

Workflow Guides

  • Feature Branch Workflow
  • Hotfix Workflow
  • Code Review Process
  • Release Workflow
  • Conflict Resolution
  • Undoing Common Mistakes
  • Working in Monorepos
  • Finding Bugs with Bisect

Command Coverage

GitMap includes detailed information for 30+ git commands across categories:

  • Getting Started: init, clone, config
  • Staging: add, commit, status, diff, stash, reset, restore, rm, mv
  • Branching: branch, checkout, switch, merge, rebase
  • Remote: remote, fetch, pull, push
  • History: log, show, blame, bisect, reflog
  • Advanced: cherry-pick, tag, revert, clean, submodule, worktree

Data Files

GitMap includes rich data for learning git:

| File | Contents | |------|----------| | commands.json | 30+ commands with flags, examples, tips | | comparisons.json | 8 pre-written command comparisons | | cheatsheets.json | 13 topic-specific cheatsheets | | workflows.json | 8 step-by-step workflow guides | | pitfalls.json | Common mistakes for 15+ commands | | aliases.json | 50+ recommended git aliases | | categories.json | Command categorization |

Requirements

  • Node.js 18+

License

MIT