gwho
v1.0.1
Published
Seamless Git Profile Management CLI
Readme
🎭 gwho (Gw Who?)
Seamlessly manage and switch between multiple Git profiles across different workspaces.
Ever accidentally committed to your company's repository using your anime-avatar personal email? Say no more.
Note: 🎓 This project was built from scratch as a hands-on learning journey to master Clean Architecture and CLI development in Golang. It focuses on clean separation of concerns, SOLID principles, and building beautiful, interactive terminal UIs using Cobra and Fatih/Color.
✨ Features
- 🚀 Interactive UI: Beautifully colored terminal prompts for an engaging user experience.
- 🔄 Effortless Switching: Switch your Git identity locally (per repo) or globally in seconds.
- 🗂️ Profile Management: Add, edit, list, and remove saved Git profiles with ease.
- 🔍 Active Identity Check: Instantly verify which profile you are currently using to prevent wrong commits.
- ⚡ Blazing Fast: Written purely in Go with zero bloated dependencies.
📥 Installation
Ensure you have Node.js installed on your machine. Run the following command to install gwho globally:
npm install -g gwho(Alternatively, if you prefer the Go way: go install github.com/Marchiz3D/gwho@latest)_
🎬 Quick Demo
$ gwho list
📋 List of Git Profiles:
========================
[1] personal - John Doe <[email protected]>
[2] work - John Doe <[email protected]>
$ gwho use
[1] personal
[2] work
Select a profile: 2
> Switched to local profile 'work'
Name: John Doe
Email: [email protected]🚀 Usage Guide
gwho comes with a set of intuitive commands. You can always run gwho --help to see the available options.
1. Add a Profile
Create a new Git profile by defining an alias (e.g., work, personal).
gwho add work2. List Profiles
View all your saved Git profiles in a beautifully formatted list.
gwho list3. Switch Profile
Apply a profile to the current Git repository. If you don't provide an alias, an interactive menu will pop up!
gwho use # Opens interactive selector
gwho use work # Instantly switches to 'work' locally
gwho use work -g # Switches to 'work' GLOBALLY across your entire OS4. Check Current Profile
Unsure which email is active in your current folder? Just ask:
gwho current5. Edit a Profile
Update the name or email of an existing profile interactively.
gwho edit work6. Remove a Profile
Delete a profile you no longer need.
gwho remove work🛠️ Built With
- Cobra - The backbone of modern Go CLI applications.
- Color - Bringing life to the terminal with beautiful colors.
🤝 Contributing
Since this is a learning project, I highly welcome feedback, code reviews, and pull requests! Feel free to open an issue if you find a bug or have a feature request.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
