gh-user-manager
Version:
A CLI tool that lets you juggle multiple GitHub identities like a pro (or wizard)
126 lines (78 loc) β’ 3.09 kB
Markdown
## π§ββοΈ gh-user-manager [](https://www.npmjs.com/package/gh-user-manager) [](https://npmjs.org/package/gh-user-manager)
> *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.
## π Installation
```bash
npm install -g gh-user-manager
```
β¨ Boom! You now have `gh-user-manager` available globally.
## π§° Features
* β
Add multiple GitHub profiles (work, personal, secret villain account, etc.)
* β
Switch between them instantly
* π§Ή Auto-clears Keychain access to prevent weird Git behavior
* β¨ No need to manually edit `.gitconfig` ever again
* π₯ Ships like a native CLI
## π‘ Why tho?
Git doesn't like confusion. If you're using multiple accounts on the same machine, it often:
* Pushes with the wrong user/email
* Prompts for wrong credentials
* Uses cached Keychain tokens
* Breaks your commit history
**This tool fixes all of that.**
Set your Git profile **once**, switch between them like a breeze, and **focus on your actual code**.
## π οΈ Usage
### β Add a profile
```bash
gh-user-manager add \
--name work \
--email dev@company.com \
--username work-dev \
--auth https \
--token ghp_xxxxxx
```
> Adds a new profile to gh-user-manager config
### π Switch profiles
```bash
gh-user-manager switch work
```
This will:
* switch to the profile you mention
* Clean up old GitHub credentials
### β Delete a profile
```bash
gh-user-manager delete work
```
This will:
* Remove the profile from gh-user-manager config
### π List profiles
```bash
gh-user-manager list
```
See all your saved profiles and the currently active one.
## π¦ What This Tool Doesnβt Do (Yet)
* Wash your dishes
## π€ΉββοΈ Final Words
Managing multiple GitHub users shouldn't be harder than managing your personal life.
Let `gh-user-manager` do the juggling β **you just commit**.
## βοΈ About the Author
Built with β, π, and a healthy dose of **"Why isn't this easier?"**,
**`gh-user-manager`** was crafted by [cinfinit](https://github.com/cinfinit) β a developer who got tired of Git forgetting who they were.
When not switching identities like a GitHub secret agent, theyβre probably:
* Refactoring code that was "just fine yesterday"
* Naming things (the hardest part of programming)
* Avoiding merge conflicts like landmines
> *"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