Skip to content

tombenner/leancommit

Repository files navigation

leancommit

Get instant, free git commit messages from the latest Codex plan titles. No tokens needed.

Demo

Install

With Homebrew

With Homebrew on macOS or Linux:

brew install --cask tombenner/tap/leancommit

Note

If macOS shows Apple could not verify "leancommit" is free of malware [...], then the installed binary may have been quarantined by Gatekeeper. You can remove the quarantine attribute with:

xattr -dr com.apple.quarantine "$(which leancommit)"

From a release

Download the archive for your OS/CPU from GitHub Releases.

Linux users can get the .deb, .rpm, or .apk package from a release and install it with the system package manager:

sudo dpkg -i leancommit_*.deb
sudo rpm -i leancommit_*.rpm
sudo apk add --allow-untrusted leancommit_*.apk

From source with Go

go install github.com/tombenner/leancommit@latest

Usage

leancommit
leancommit --no-push
leancommit --dry-run
leancommit --print
leancommit --session-files 10
leancommit --version

leancommit searches your recent local Codex sessions for plan titles and lets you choose which plan title to use. It then runs:

git add -A
git commit -m "<selected title>"
git push

Use --sessions-dir <path> to point at a different Codex sessions directory, --session-files <n> to control how many recent session files are scanned, --limit <n> to control how many unique titles are shown, --no-push to skip pushing, and --dry-run to print the git commands without executing them.

You can also configure defaults with environment variables:

export LEANCOMMIT_SESSIONS_DIR="$HOME/.codex/sessions"
export LEANCOMMIT_SESSION_FILES=10

CLI flags override LEANCOMMIT_ environment variables.

Development

Clone the repo, install Go, then download dependencies:

go mod download

Run the local checks:

go test ./...
go vet ./...
go build ./...

Build a local binary:

go build -o leancommit .

Run the local binary from the repo:

./leancommit --print
./leancommit --dry-run
./leancommit --no-push
./leancommit --version

During development, --print is the safest way to confirm session parsing because it does not run any git commands. --dry-run shows the git commands leancommit would execute without running them.

Locally built binaries can also run an opt-in demo with LEANCOMMIT_DEMO=1 ./leancommit, which shows fake plan titles and exits without running git commands.

Releasing

Releases are published by GoReleaser from pushed version tags.

  1. Confirm the release workflow secret exists.

    The repository must have a GH_PAT secret that can create releases in tombenner/leancommit and push cask updates to tombenner/homebrew-tap under Casks/.

  2. Run the local checks.

    go test ./...
    go vet ./...
    go build ./...
  3. Validate the GoReleaser configuration without publishing.

    goreleaser check
    goreleaser release --snapshot --clean
  4. Create and push a SemVer tag.

    git tag v0.1.0
    git push origin v0.1.0
  5. Verify the GitHub Actions release run.

    The workflow publishes GitHub Release archives, checksums, Linux packages, and the Homebrew cask.

About

Get instant, free git commit messages from the latest Codex plan titles. No tokens needed.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages