I have just published my first CLI, and I am excited to share it because I believe it solves a problem ubiquitous to all developers. Writing commit messages is not hard, but it does take time. I have created a CLI that handles committing and pushing via a single command.
commait reads your staged diff, sends it to an AI provider of your choice (OpenAI or Anthropic), and generates a clean commit message. You can configure it to stage, commit, and push all in one go without prompting, or keep it interactive and prompt for approval before anything happens.
The part I'm most proud of is the enforceable token budget. When the diff exceeds the user-defined token budget, commait runs the diff through a compression pipeline first, stripping unchanged context lines, removing git headers, stripping noise files, and trimming less information-dense files. In my testing, your diff has to be extremely large or your token budget extremely small for the compression to fail to reduce the diff below the budget.
It's fully configurable, supports model switching without touching any code, and has automatic provider fallback as well. As far as alternatives, I found one (commitai on npm). It is a much simpler CLI with much less functionality. Essentially just generating a message based on your diff, and that's it.
If you have ever committed with a 4-word commit message at 2 am, you should give it a try :)
https://www.npmjs.com/package/commait-clihttps://github.com/benS-03/commait
I have just published my first CLI, and I am excited to share it because I believe it solves a problem ubiquitous to all developers. Writing commit messages is not hard, but it does take time. I have created a CLI that handles committing and pushing via a single command. commait reads your staged diff, sends it to an AI provider of your choice (OpenAI or Anthropic), and generates a clean commit message. You can configure it to stage, commit, and push all in one go without prompting, or keep it interactive and prompt for approval before anything happens. The part I'm most proud of is the enforceable token budget. When the diff exceeds the user-defined token budget, commait runs the diff through a compression pipeline first, stripping unchanged context lines, removing git headers, stripping noise files, and trimming less information-dense files. In my testing, your diff has to be extremely large or your token budget extremely small for the compression to fail to reduce the diff below the budget. It's fully configurable, supports model switching without touching any code, and has automatic provider fallback as well. As far as alternatives, I found one (commitai on npm). It is a much simpler CLI with much less functionality. Essentially just generating a message based on your diff, and that's it. If you have ever committed with a 4-word commit message at 2 am, you should give it a try :) https://www.npmjs.com/package/commait-cli https://github.com/benS-03/commait