A modern, interactive command-line tool that creates beautiful, standardized Git commit messages following the Conventional Commits specification. Built with Gum for a delightful user experience.
This tool transforms your commit workflow with:
- 🎯 Interactive commit type selection with numbered options
- 🎨 Beautiful UI powered by Gum's styling capabilities
- 📝 Comprehensive commit building with optional scope, breaking changes, and issue references
- 🔄 Smart amend support that reuses previous commit values
- 📋 Live preview of your commit message before creation
- 🚫 Bypass option when you need standard Git behavior
- Seamless Integration: Intercepts
git commitcommands automatically - Interactive Selection: Choose commit types by number (1-11) for speed
- Rich Formatting: Support for scopes, breaking changes, extended descriptions, and issue references
- Beautiful Preview: See exactly how your commit will look before confirming
- Editor Support: Open your editor for final tweaks with
-eflag - Amend Intelligence: Extracts and reuses values from previous commits when amending
- Flexible Usage: Works with all standard git commit flags
This tool requires Gum to be installed:
macOS:
brew install gumLinux:*
go install github.com/charmbracelet/gum@latestVisit the Gum installation guide
Download both files and run the installer:
# Download the files
curl -O https://raw.githubusercontent.com/pergatore/gum-commit-tool/main/gum-commit.sh
curl -O https://raw.githubusercontent.com/pergatore/gum-commit-tool/main/gum-commit-installer.sh
# Make the installer executable
chmod +x gum-commit-installer.sh
# Run the installer
./gum-commit-installer.sh
# Apply changes to your current session
source ~/.bashrc # or ~/.zshrc for Zsh users-
Download the script:
mkdir -p ~/.git-scripts curl -o ~/.git-scripts/gum-commit.sh https://raw.githubusercontent.com/pergatore/gum-commit-tool/main/gum-commit.sh chmod +x ~/.git-scripts/gum-commit.sh
-
Set up Git alias:
git config --global alias.commit '!~/.git-scripts/gum-commit.sh' -
Add shell integration: Add to your
~/.bashrcor~/.zshrc:# Gum commit wrapper function git() { if [[ $1 == "commit" ]]; then shift 1 command ~/.git-scripts/gum-commit.sh "$@" else command git "$@" fi }
-
Reload your shell:
source ~/.bashrc # or ~/.zshrc
Simply use Git as normal - the interactive wizard starts automatically:
git commitYou'll be guided through:
- Type selection (numbered 1-11 for quick selection)
- Optional scope (e.g., auth, api, ui)
- Breaking change confirmation
- Commit description
- Extended description (optional)
- Issue references (optional)
- Beautiful preview before confirming
Provide a message and let the wizard handle type/scope:
git commit -m "add user authentication"The wizard will still prompt for type and scope, but use your provided message.
Open your editor after the wizard creates the message:
git commit -eWhen amending, the tool extracts values from your previous commit:
git commit --amendYou can choose to reuse the previous type, scope, and breaking change settings.
For standard Git commit behavior:
git commit --no-wizard -m "your message"The tool supports all standard git commit options:
git commit -a # Stage and commit all changes
git commit -v # Show diff in editor
git commit --amend # Amend previous commit
git commit -e # Open editor after wizard
git commit --no-wizard # Skip wizard entirely| # | Type | Description |
|---|---|---|
| 1 | feat | A new feature |
| 2 | fix | A bug fix |
| 3 | docs | Documentation only changes |
| 4 | style | Changes that do not affect the meaning of the code |
| 5 | refactor | A code change that neither fixes a bug nor adds a feature |
| 6 | test | Adding missing tests or correcting existing tests |
| 7 | chore | Other changes that don't modify src or test files |
| 8 | perf | A code change that improves performance |
| 9 | ci | Changes to CI configuration files and scripts |
| 10 | build | Changes that affect the build system or external dependencies |
| 11 | revert | Reverts a previous commit |
The tool creates properly formatted conventional commits:
feat(auth): add user login validation
Add comprehensive validation for user login including:
- Email format verification
- Password strength requirements
- Rate limiting for failed attempts
BREAKING CHANGE: Login endpoint now requires email instead of username
Closes: #123, #456
If you see "gum is not installed":
- Install Gum following the installation guide
- Restart your terminal
- Try the command again
If git commit doesn't trigger the wizard:
- Reload your shell:
source ~/.bashrc(or~/.zshrc) - Start a new terminal session
- Check if the function exists:
type git
If you need to temporarily disable the wizard:
git commit --no-wizard -m "emergency fix"# Remove git alias
git config --global --unset alias.commit
# Remove the script
rm ~/.git-scripts/gum-commit.sh
# Remove function from shell config
# Edit ~/.bashrc or ~/.zshrc and remove the git() functionContributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details.
- Conventional Commits for the specification
- Gum by Charm for the beautiful CLI components
- The Git community for making version control awesome