A lightweight Go CLI that uses Claude to analyze your uncommitted git changes and automatically execute a series of logical, atomic commits with Conventional Commit messages.
- Runs
git diff -U0to capture all uncommitted changes - Sends the diff to Claude with a strict JSON-only system prompt
- Claude returns a structured array of
CommitTaskobjects — each a logical atomic commit - You confirm (or skip) each proposed commit interactively
- ez-commit stages the relevant files and commits them one by one
go install github.com/tolgazorlu/ez-commit@latestOr build from source:
git clone https://github.com/tolgazorlu/ez-commit
cd ez-commit
go build -o ez-commit .# Preview proposed commits without committing anything
ez-commit --dry-run
# Interactive mode: confirm each commit before it's applied
ez-commitSet your Anthropic API key:
export ANTHROPIC_API_KEY=sk-ant-...Found 3 hunk(s). Consulting Claude...
Claude proposed 2 commit(s):
─────────────────────────────────────────
Commit 1 / 2
Message : feat: add user authentication handler
Rationale: Auth logic is independent from the API refactor
Files :
internal/auth/handler.go
Hunks : 2 hunk(s)
Stage and commit this? [Y/n]:
✓ Committed: feat: add user authentication handler
─────────────────────────────────────────
Commit 2 / 2
Message : refactor: extract database query helpers
Rationale: DB helper extraction is a separate concern from auth
Files :
internal/db/queries.go
Hunks : 1 hunk(s)
Stage and commit this? [Y/n]:
✓ Committed: refactor: extract database query helpers
Done.