DEV Community

Alex Kyoto
Alex Kyoto

Posted on

I got tired of writing "fix" and "wip" — so I built a CLI that does it for me

I had 47 commits named "fix" last month.

I knew about Conventional Commits. I wanted to use them. But writing feat(auth): add OAuth2 login flow manually every single time felt like too much friction.

So I built CommitMsg — a CLI that reads your staged git diff and generates 3 conventional commit options. You pick with arrow keys. Done.

How it works

1. Stage your files as usual

git add .
Enter fullscreen mode Exit fullscreen mode

2. Run cm

cm
Enter fullscreen mode Exit fullscreen mode

3. Pick from 3 options with arrow keys

❯ feat(auth): add OAuth2 login with Google
  feat: implement social authentication
  feat(auth): integrate Google sign-in flow
Enter fullscreen mode Exit fullscreen mode

4. Commit applied automatically

That's it. No config files. No API keys. Just install and run.

Install

npm install -g commitmsg-ai
Enter fullscreen mode Exit fullscreen mode

Why I built it this way

I wanted zero friction. The biggest problem with existing tools is they ask you to configure everything before you can use them.

CommitMsg works out of the box. First run — already generating commits.

What's next

  • VS Code extension
  • Team style guide via .commitmsg.yml
  • JetBrains plugin

If you try it, let me know what you think in the comments.

And if your git log looks anything like mine did — you're welcome 😄

npm: npmjs.com/package/commitmsg-ai

Top comments (0)