
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
gh-user-manager
Advanced tools
A CLI tool that lets you juggle multiple GitHub identities like a pro (or wizard)
A CLI tool that lets you juggle multiple GitHub identities like a pro (or wizard)
Tired of Git yelling at you for using the wrong credentials? Switching between your personal and work GitHub accounts shouldn't feel like hacking the matrix.
gh-user-manager is your command-line sidekick that helps you add, switch, and manage multiple GitHub profiles instantly — securely, with minimal setup, and full control.
npm install -g gh-user-manager
✨ Boom! You now have gh-user-manager available globally.
Now if you want the pre-commit hook to show the current identity and confirm the commit, run:
gh-user-manager init
.gitconfig ever againGit doesn't like confusion. If you're using multiple accounts on the same machine, it often:
This tool fixes all of that. Set your Git profile once, switch between them like a breeze, and focus on your actual code.
gh-user-manager add \
--name work \
--email dev@company.com \
--username work-dev \
--platform github \
--auth https \
--token ghp_xxxxxx
Adds a new profile to gh-user-manager config
gh-user-manager switch work
This will:
gh-user-manager delete work
This will:
gh-user-manager list
See all your saved profiles and the currently active one.
A platform defines the Git hosting service (like GitHub, GitLab, Bitbucket, etc.) and how authentication is handled — especially for HTTPS-based personal access tokens (PATs).
Each platform has:
A domain (e.g., github.com)
An authFormat (e.g., https://{username}:{token}@{domain}) used to construct the credential string saved to .git-credentials
Your profiles use these platforms when switching Git identities on your system.
gh-user-manager add-platform \
--name myhost \
--domain git.mycompany.com \
--auth-format "https://{username}:{token}@{domain}"
Option Description Required Default --name Name/key of the platform (e.g., github, gitea) ✅ Yes — --domain Git domain used by this platform ✅ Yes — --auth-format Credential format (with {username}, {token}, {domain}) No https://{username}:{token}@{domain}
ℹ️ If --auth-format is not provided, a sensible default will be used.
gh-user-manager list-platforms
Displays all registered Git platforms along with their domains and auth formats.
gh-user-manager update-platform \
--name gitlab \
--domain gitlab.company.com \
--auth-format "https://{username}:{token}@{domain}"
Option Description Required --name Platform name to update ✅ Yes --domain New domain (optional) No --auth-format New auth format string (optional) No
You can update just the domain, just the auth format, or both.
gh-user-manager delete-platform \
--name myhost
Removes a custom platform by name. Built-in platforms (like github) can also be deleted, though it's not recommended unless you plan to override them.
gh-user-manager reset-platforms
Restores the default platforms:
github.com
gitlab.com
bitbucket.org
A backup of the current platform file will be saved as:
~/.gh-user-manager-platforms.json.bak
gh-user-manager restore-platforms
Restores the platform config from the last .bak backup (if available).
You can define custom Git providers (e.g., Gitea, Azure DevOps) using add-platform
Every profile is linked to a platform using the --platform flag (defaults to github if omitted)
HTTPS authentication only works if authFormat is valid and includes {username}, {token}, and {domain} placeholders
gh-user-manager add-platform \
--name gitea \
--domain gitea.dev.local \
--auth-format "https://{username}:{token}@{domain}"
gh-user-manager add \
--name dev \
--email dev@gitea.dev.local \
--username dev-user \
--platform gitea \
--auth https \
--token your_token_here
Now, switching to dev will use your custom Gitea host and its credentials.
Managing multiple GitHub users shouldn't be harder than managing your personal life.
Let gh-user-manager do the juggling — you just commit.
Built with ☕, 🚀, and a healthy dose of "Why isn't this easier?",
gh-user-manager was crafted by cinfinit — a developer who got tired of Git forgetting who they were.
When not switching identities like a GitHub secret agent, they’re probably:
"I built this tool because I felt we all have been at that place once where we really needed it. You’re welcome to use it, break it, improve it, or just stare at it in awe." — You, probably
FAQs
A CLI tool that lets you juggle multiple GitHub identities like a pro (or wizard)
We found that gh-user-manager demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.