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

gitrole

v0.7.5

Published

Switch your full git identity in one command.

Readme

gitrole is a focused CLI for developers who move between multiple Git identities on one machine. Save named roles like work, personal, or client-acme, switch to the right one, and check the repo before you commit or push.

gitrole is strongest when it answers:

  • who will this commit say it is from?
  • who will GitHub think I am when I push?

New features should reinforce that boundary rather than expanding into general account management.

Install

npm install -g gitrole

Quickstart

gitrole add work \
  --name "Alex Developer" \
  --email "[email protected]"

gitrole use work --local
gitrole status

That is the fastest path to first success:

  • add saves a role
  • use --local applies it only to this repository
  • status checks whether the repo looks ready to commit or push

Run gitrole doctor when something looks wrong.

Common next steps

If Git is already configured correctly and you just want to save that identity as a role:

gitrole import current --name work

If a repository should prefer exactly one saved role, pin a strict repo-local policy:

gitrole pin work
gitrole resolve

Learn more

Start with the docs if you want the full workflow, setup guides, and use cases:

Commands

| Command | Purpose | | --------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | | gitrole add <name> --name "..." --email "..." [--ssh ...] [--github-user ...] [--github-host ...] | Create or update a saved role profile | | gitrole import current --name <role> | Save the effective current commit identity as a named role | | gitrole use <name> [--global \| --local] | Switch git identity at global or repository-local scope and optionally load SSH key | | gitrole pin <role> | Create a strict repo-local .gitrole policy for a single saved role | | gitrole resolve | Print the repo-local default role from .gitrole | | gitrole resolve --json | Emit the repo-local policy as structured JSON | | gitrole current | Show which saved role matches the active commit identity | | gitrole list | List all saved roles and mark the active one | | gitrole status | Check whether the current repo is aligned for commit and push | | gitrole status --short | Machine-friendly alignment fields for scripts and prompts | | gitrole doctor | Diagnose commit identity, remote config, and SSH push identity | | gitrole doctor --json | Emit the full diagnosis as structured JSON | | gitrole remote set <name> | Rewrite origin to the role's GitHub SSH host alias | | gitrole remove <name> | Remove a saved role profile |

Diagnosis policy

gitrole warns on violated expectations, not assumptions.

  • githubUser checks the resolved SSH auth user
  • githubHost checks the remote host alias
  • remote owner and repository are context by default
  • overall=warning only happens when at least one actionable check is warn

What it does not do

  • No GitHub browser or session switching
  • No gh auth, HTTPS credentials, or token management
  • No hooks, auto-switching, or workflow enforcement
  • No interactive prompts

License

MIT