Jurnal: An AI-Powered Git Commit Assistant Written in Go
Every developer has been there: you've done the work, git add . is done, and then you stare at the commit message prompt like it owes you money. For small changes it's fine. For a sprawling diff touching six files across three packages? Less fine.
Jurnal is a CLI tool that solves exactly this. It reads your staged diff, sends it to an LLM, and comes back with a structured commit plan — message, type, scope, and an optional branch name suggestion. No context-switching, no tab-juggling. Just your terminal and a single command.
How It Works
The flow is deliberately simple:
- Stage your changes as usual with
git add. - Run
jurnalin the repo root. - The tool grabs the output of
git diff --cached, sends it to the configured LLM, and gets back a structured response. - It walks you through the plan — you review, tweak if needed, and confirm.
- Jurnal runs
git commitwith the generated message. Done.
No magic. No hidden state. It's a thin, opinionated wrapper around tools you already use.
Why Go
The previous version was Python. It worked, but distributing a Python CLI means asking users to deal with pip, virtual environments, or pipx — which is friction nobody wants for a dev tool.
Go compiles to a single static binary. Cross-compile once, ship to Windows, macOS, and Linux via GitHub Releases. Users chmod +x and go. No runtime, no interpreter, no dependency hell. For a CLI tool that lives in your shell, that's the right trade-off.
# Install: grab the binary for your platform from releases
curl -L https://github.com/luckywirasakti/jurnal/releases/latest/download/jurnal-linux-amd64 \
-o jurnal && chmod +x jurnal && sudo mv jurnal /usr/local/bin/
The Commit Plan
Jurnal doesn't just spit out a one-liner. It generates a structured breakdown:
Type: feat
Scope: auth
Message: add JWT refresh token rotation
Branch: feat/auth-jwt-refresh
Staged files:
- internal/auth/token.go
- internal/auth/middleware.go
- api/routes.go
You can accept as-is, edit the message inline, or bail out entirely. The LLM only sees your diff — never your actual code history or secrets.
Step-by-Step Mode
For larger changesets, Jurnal has a --step flag that groups your staged files by logical concern and walks you through committing them one chunk at a time. It's the difference between one noisy commit and a clean, reviewable history.
jurnal --step
Useful when you've been heads-down for a few hours and your staging area looks like a yard sale.
Configuration
A minimal .jurnal.yaml in your home or project directory is all it takes:
provider: openai # or "gemini", "anthropic"
model: gpt-4o-mini
language: english
conventional: true # enforce Conventional Commits format
Swap providers without changing your workflow. The prompt template is the same regardless of backend.
Lessons from the Rewrite
Moving from Python to Go wasn't just about distribution. A few things got noticeably better:
- Startup time. Python tools have a cold-start cost that accumulates over a day. Go binaries start in milliseconds — you don't notice it, which is exactly the point.
- Error handling. Go forces you to handle errors explicitly. The CLI is more predictable and easier to debug when something goes wrong with the API call or git invocation.
- Cross-platform consistency. One binary behaves the same on every OS. No more "works on my machine" issues with Python path resolution.
The trade-off is verbosity — Go code is longer than equivalent Python. For a CLI this small, it's worth it.
TL;DR
Jurnal is a terminal-first, AI-assisted git commit tool. It reads your diff, generates a commit plan, and gets out of the way. Written in Go for zero-friction installation. If you spend more than 10 seconds per day thinking about commit messages, it will pay for itself immediately.
Source: github.com/luckywirasakti/jurnal