Skip to content

GUM is a command-line tool that makes switching between different git users quick and intuitive. Perfect for developers who work with multiple git accounts (work, personal, clients) on the same machine.

Notifications You must be signed in to change notification settings

enescanguven/gum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🍬 GUM - Git User Manager

Switch between git users effortlessly!

Python License Version

GUM is a command-line tool that makes switching between different git users quick and intuitive. Perfect for developers who work with multiple git accounts (work, personal, clients) on the same machine.

🎬 Demo

Demo

✨ Features

  • πŸ”„ Interactive User Switching - Visual menu for quick switching
  • πŸ“§ Email-based Indexing - Support multiple users with same name
  • 🌍 Local & Global Switching - Repository-specific or system-wide
  • βž• Easy User Management - Add, delete, list users effortlessly
  • 🎨 Beautiful UI - Colorful terminal interface with emojis
  • ⚑ Fast & Lightweight - No dependencies on external services
  • πŸ”§ Simple Configuration - Stored in ~/.config/gum/config.json

πŸš€ Installation

Prerequisites

  • Python 3.7+
  • Git

Install

# Clone the repository
git clone https://github.com/enescanguven/gum.git
cd gum

# Install dependencies
pip install -e .

# Or install dependencies manually
pip install pick termcolor pyfiglet

πŸ“– Usage

Quick Start

# First run - add your first user
gum

# Switch between users interactively
gum

# Add more users via config menu
gum config

Commands

Help

Basic Commands

Command Description
gum Interactive user switcher
gum config Configuration menu
gum --help Show help information

Direct Commands

Command Description
gum save <user> <email> Save a new user
gum delete <email> Delete a user by email
gum list List all saved users
gum <user> Switch to user (by name or email)
gum --global <user> Switch to user globally

Examples

# Save users
gum save john john@work.com
gum save john john@personal.com

# Switch locally (current repo only)
gum john@work.com

# Switch globally (all repos)
gum --global john@personal.com

# Interactive switching
gum
# β†’ Select from menu with arrow keys

# List all users
gum list
#   john (john@work.com)
#   john (john@personal.com)

# Delete user
gum delete john@work.com

🎯 Interactive Menus

Main Menu (gum)

Select user to switch to:
β†’ πŸ”„ john (john@work.com)
  πŸ”„ john (john@personal.com)
  βž• Add new user

Configuration Menu (gum config)

Select configuration option:
β†’ βž• Save new user
  🌍 Switch globally
  πŸ“‹ List all users
  πŸ—‘οΈ  Delete user

πŸ”§ Configuration

GUM stores its configuration in ~/.config/gum/config.json:

{
  "users": {
    "john@work.com": {
      "username": "john"
    },
    "john@personal.com": {
      "username": "john"
    },
    "alice@company.com": {
      "username": "alice"
    }
  }
}

Why Email-based Indexing?

  • Unique identification: Email addresses are naturally unique
  • Multiple accounts: Same name, different emails (work vs personal)
  • Flexibility: Search by username or email
  • Real-world usage: Matches how git actually works

πŸ” Local vs Global Switching

Type Scope Command Use Case
Local Current repository only gum <user> Project-specific identity
Global All repositories gum --global <user> System-wide default

🎨 Features in Detail

πŸš€ Smart User Detection

  • Search by username or email
  • Fuzzy matching for convenience
  • Clear disambiguation when multiple matches

🎭 Beautiful Interface

  • Colorful terminal output
  • Emoji icons for actions
  • Progress indicators
  • Error handling with helpful messages

πŸ”„ Seamless Integration

  • Uses native git config commands
  • No modification to existing repos
  • Works with any git hosting service

πŸ› οΈ Development

Building from Source

# Clone and setup
git clone https://github.com/enescanguven/gum.git
cd gum

# Install in development mode
pip install -e .

# Run tests
python -m pytest

Creating Demo GIFs

# Install VHS
go install github.com/charmbracelet/vhs@latest

# Generate demo
vhs demo.tape

# Generate help
vhs help.tape

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“§ Contact


⭐ Star this repository if you find it useful!

About

GUM is a command-line tool that makes switching between different git users quick and intuitive. Perfect for developers who work with multiple git accounts (work, personal, clients) on the same machine.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages