I built nib, a Swift CLI that writes Git commit messages on your Mac
https://preview.redd.it/35pnehxt850i1.png?width=960&format=png&auto=webp&s=b1b40074dcb16192b60880151f2324ad32fe0314
Stage a change → run git nib → review the draft → commit.
I wanted help writing commit messages without sending my diffs to a cloud API, so I built nib. It drafts a message from your staged changes and lets you accept it, edit it, regenerate it, or cancel. It follows your repo’s commit style by default. No account or API key needed.
There’s also an optional Git hook if you prefer to start with git commit and edit the draft in your usual editor.
Tech Stack
Swift, Swift Argument Parser, and Apple’s Foundation Models framework.
Development Challenge
The tricky part was getting a useful message out of a diff that’s bigger than the model’s context window. On macOS 27, the on-device model has about 8K tokens to work with. nib skips the contents of lockfiles and build artifacts first.…