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.
- β
Interactive wizard with search/shortcuts (numbers, keywords,
qto 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)
--amendmode with last commit banner
- Repository validation (
- β
Full Commitizen-style fields:
scope(optional)subject(required,<=72characters)bodymultiline (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
--installmode that installs/updates the binary in user PATH- Windows:
%LOCALAPPDATA%\Programs\gommit\bin - Linux/macOS:
~/.local/bin(adds to PATH if missing)
- Windows:
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- Download the artifact for your OS/architecture from the Releases page
- Extract the package (
.zipon Windows /.tar.gzon Linux/macOS) - Run the extracted binary with the
--installflag:
Windows (PowerShell):
.\gommit.exe --install
# Close and reopen terminal
gommit --versionLinux/macOS:
chmod +x ./gommit
./gommit --install
# Restart shell
gommit --versionRunning
--installagain will update the installation.
Inside a Git repository with changes:
gommitTypical wizard flow:
- Select type (number, name, or search)
- Enter scope (optional)
- Write subject (imperative mood,
<=72chars) - Add body (optional, multiline) β end with
.on a line or press Enter twice - Breaking changes? (if "yes", describe the change)
- Issues? (Closes/Refs)
At the end, gommit executes git commit (or shows preview with --dry-run).
Normal commit (with auto-stage):
gommitAllow empty commit:
gommit --allow-emptyAmend last commit:
gommit --amendShow message only (don't commit):
gommit --dry-runPass 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"<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.
| 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) |
| 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 |
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.).
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 --installFor releases with version injection:
go build -ldflags "-s -w -X main.version=0.2.0" -o gommit ./cmd/gommit| Variable | Description |
|---|---|
NO_COLOR=1 |
Disable ANSI colors in menu |
NO_EMOJI=1 |
Force ASCII fallback in menu (header still uses unicode emojis) |
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes using
gommitπ - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
GPL-3.0-only β see LICENSE file for details.
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.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes using
gommitπ - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
GPL-3.0-only β see LICENSE file for details.
- Inspired by Commitizen
- Built with the Conventional Commits specification
- Emojis help make commit history more visual and fun! π