Writing commit messages is not hard, but it does take time. It may not be a lot of time but saving any amount of time is always good.commait is a CLI tool that reads your staged diff and generates a properly formatted conventional commit message in seconds. It also allows for token budgeting and is packaged with diff compression pipeline to enforce said budget.
Install
$npm install -g commait-cli
Key features
Multi-provider: OpenAI or Anthropic, swap with a config change
Fully configurable automation: auto-stage, auto-commit, auto-push, or keep every step interactive
Token budget control: cap max diff tokens so costs stay predictable on large diffs
Diff compression pipeline: if the diff exceeds your budget, a staged pipeline kicks in: strips noise files → strips headers → strips context lines → strips lines. Checks token count after each stage to minimize information loss
Custom prompts: override the default to match your team's conventions
Optional context flag: prefix the prompt with extra context via
-cInteractive model picker: browse models without memorizing name strings

Top comments (0)