SkillAgentSearch skills...

Gommit

gommit is a fast, zero-dependency, cross-platform Commitizen-style assistant written in Go. It launches an interactive wizard on git commit and outputs pure Conventional Commits (no emojis in the final message, just in the prompt), so your pipelines and changelog tools recognize everything out of the box.

Install / Use

/learn @Hangell/Gommit

README

Gommit Go Report Card GitHub tag Build License Contributing Go Reference

pt-BR ru hi zh-CN es en

gommit is a fast, zero-dependency command-line assistant for Conventional Commits, written in Go.
It opens an interactive wizard (similar to Commitizen/cz) and executes git commit with the properly formatted message.

💡 By default, commit type emojis are included in the header (e.g., feat 💡: ...) to make them visible in GitHub's file/folder listings. Emojis are only added to the title, not to the body or footer.


✨ Features

  • ✅ Interactive wizard with search/shortcuts (numbers, keywords, q to quit)
  • ✅ Standard Conventional Commits types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
    Plus extras: WIP, prune
  • ✅ Emojis in menu (with automatic ASCII fallback) and emoji in commit header
  • ✅ Git pre-checks:
    • Repository validation (not a git repository… if not in one)
    • Auto-stage (git add -A) when nothing is staged (toggleable)
    • List staged changes before committing (toggleable)
    • --amend mode with last commit banner
  • ✅ Full Commitizen-style fields:
    • scope (optional)
    • subject (required, <=72 characters)
    • body multiline (end with single dot on a line or press Enter twice)
    • BREAKING CHANGE (prompts and asks for description)
    • Issues: Closes #123 / Refs #45 (if desired)
  • ✅ Built-in --install mode that installs/updates the binary in user PATH
    • Windows: %LOCALAPPDATA%\Programs\gommit\bin
    • Linux/macOS: ~/.local/bin (adds to PATH if missing)

🚀 Installation

Method 1: One-liner Installation Scripts (Recommended)

Windows:

powershell -ExecutionPolicy Bypass -NoProfile -Command "irm https://raw.githubusercontent.com/Hangell/gommit/main/scripts/install.ps1 | iex"

Linux/macOS:

curl -fsSL https://raw.githubusercontent.com/Hangell/gommit/main/scripts/install.sh | bash

Method 2: Download Release Binary

  1. Download the artifact for your OS/architecture from the Releases page
  2. Extract the package (.zip on Windows / .tar.gz on Linux/macOS)
  3. Run the extracted binary with the --install flag:

Windows (PowerShell):

.\gommit.exe --install
# Close and reopen terminal
gommit --version

Linux/macOS:

chmod +x ./gommit
./gommit --install
# Restart shell
gommit --version

Running --install again will update the installation.


💻 Quick Usage

Inside a Git repository with changes:

gommit

Typical wizard flow:

  1. Select type (number, name, or search)
  2. Enter scope (optional)
  3. Write subject (imperative mood, <=72 chars)
  4. Add body (optional, multiline) – end with . on a line or press Enter twice
  5. Breaking changes? (if "yes", describe the change)
  6. Issues? (Closes/Refs)

At the end, gommit executes git commit (or shows preview with --dry-run).

Examples

Normal commit (with auto-stage):

gommit

Allow empty commit:

gommit --allow-empty

Amend last commit:

gommit --amend

Show message only (don't commit):

gommit --dry-run

Pass everything via flags (no wizard):

gommit --type feat --scope ui --subject "add type picker" --body "Implementation details..."

Non-interactive mode with all parameters:

gommit --type fix --scope api --subject "resolve authentication issue" --body "Fixed JWT token validation\n\nThis resolves the issue where expired tokens\nwere not being properly handled." --footer "Closes #42"

📝 Commit Header Format

<type>[(!)][(scope)] <emoji>: <subject>

Examples:

feat 💡: add install command
fix(api) 🐛: correct nil pointer on config load
refactor(core)! 🎨: unify message builder

The ! appears only in the header; internal validation uses the "pure" type (feat, fix, etc.) to maintain compatibility with Conventional Commits tools.


⚙️ Command Line Flags

| Flag | Description | |---|---| | --version | Show version and exit | | --install | Install/update binary to user PATH and exit | | --dry-run | Only print the generated message (don't call git commit) | | --type | Commit type (feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert, WIP, prune) | | --scope | Optional scope (e.g., ui, api) | | --subject | Subject line (imperative mood, <=72 chars) | | --body | Body text (use \n for new lines) | | --footer | Manual footer (e.g., Closes #123) | | --as-editor | Run as Git editor (COMMIT_EDITMSG mode) | | --allow-empty | Allow empty commit | | --amend | Amend the last commit | | --no-verify | Skip hooks (pre-commit, commit-msg) | | --signoff | Add Signed-off-by trailer | | --auto-stage | Auto git add -A when nothing is staged (default: true) | | --show-status | Show staged changes summary before commit (default: true) |


📋 Supported Commit Types

| Type | Emoji | Description | |---|---|---| | WIP | 🚧 | Work in progress | | feat | 💡 | A new feature | | fix | 🐛 | Fixing a bug | | chore | 📦 | Updating dependencies, deployments, configuration files | | refactor | 🎨 | Improving structure/format of the code | | prune | 🔥 | Removing code or files | | docs | 📝 | Writing documentation | | perf | ⚡ | Improving performance | | test | ✅ | Adding tests | | build | 🔧 | Changes to build system or dependencies | | ci | 🤖 | Changes to CI/CD configuration | | style | 💅 | Changes that do not affect the meaning of the code | | revert | ⏪ | Revert to a commit |


🔧 Git Editor Mode

You can configure gommit as your Git editor for consistent commit messages:

git config --global core.editor "gommit --as-editor"

This will open the gommit wizard whenever Git needs a commit message (including during git commit, git merge, git rebase, etc.).


🛠️ Development

Building from Source

Requirements: Go 1.22+

# Clone the repository
git clone https://github.com/Hangell/gommit.git
cd gommit

# Build
go build -o gommit ./cmd/gommit

# Run tests
go test ./...

# Install locally
./gommit --install

Building with Version Information

For releases with version injection:

go build -ldflags "-s -w -X main.version=0.2.0" -o gommit ./cmd/gommit

🎨 Environment Variables

| Variable | Description | |---|---| | NO_COLOR=1 | Disable ANSI colors in menu | | NO_EMOJI=1 | Force ASCII fallback in menu (header still uses unicode emojis) |


🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes using gommit 😉
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

GPL-3.0-only — see LICENSE file for details.


❓ FAQ

Does gommit replace Commitizen? It's an alternative. If your environment already depends on Node/npm and you're comfortable with cz adapters, stick with it. If you want fewer dependencies, single installation, and consistent usage across multiple repositories/servers, gommit is probably simpler.

Is it faster? We don't publish benchmarks here, but as a native binary, gommit tends to start faster and use less memory than traditional Node CLI tools — especially in cold environments (CI, containers) where starting the Node runtime adds latency.

Does it work offline? Yes. Once installed, it doesn't need network access to run the wizard or commit.

Why was gommit created? The idea was born from frustration with nvm environments where we had to install git-cz for each nvm version or directly in each project. gommit is much simpler and provides a single, unified solution.


🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes using gommit 😉
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

👨‍💻 Author

<div align="center"> <img src="https://avatars.githubusercontent.com/u/53544561?v=4" width="150" style="border-radius: 50%;" />

Rodrigo Rangel

<div> <a href="https://hangell.org" target="_blank"> <img src="https://img.shields.io/badge/website-000000?style=for-the-badge&logo=About.me&logoColor=white" alt="Website" /> </a> <a href="https://play.google.com/store/apps/dev?id=5606456325281613718" target="_blank"> <img src="https://img.shields.io/badge/Google_Play-414141?style=for-the-badge&logo=google-play&logoColor=white" alt="Google Play" /> </a> <a href="https://www.youtube.com/channel/UC8_zG7RFM2aMhI-p-6zmixw" target="_blank"> <img src="https://img.shields.io/badge/YouTube-FF0000?style=for-the-badge&logo=youtube&logoColor=white

Related Skills

View on GitHub
GitHub Stars6
CategoryDevelopment
Updated21d ago
Forks0

Languages

Go

Security Score

90/100

Audited on Mar 7, 2026

No findings