leancommit is a small Go CLI that extracts the latest Codex <proposed_plan> title and uses it as a git commit message without making another model call.
Run the same checks used by CI:
go test ./...
go vet ./...
go build ./...Build a local binary when needed:
go build -o leancommit .- Keep Codex session parsing logic in
internal/codexcovered by table-style unit tests or focused test cases. - Keep git command behavior in
internal/gitxtestable through dry-run and output assertions. - Prefer
--printand--dry-runwhen manually validating behavior. Normal execution stages files, commits, and may push. - Do not commit generated local artifacts such as
.cache/or theleancommitbinary.
- Treat code paths that run
git add,git commit, orgit pushas side-effectful. - Avoid tests that mutate the real working tree. Use temporary directories and dry-run runners.