DEV Community

z z
z z

Posted on

I Built a CLI Tool That Writes Better Git Commits Than I Do

Every developer knows the feeling: you just fixed a nasty bug, you git add . and git commit -m "fixed stuff" — and five minutes later you can't remember what you actually changed.

I got tired of this. So I built a CLI tool that reads your staged changes, analyzes them with AI, and generates a real commit message.

Meet ai-commit

# Stage your changes
git add .

# Let AI handle the message
ai-commit

# 💡 Suggested: fix(auth): handle token refresh race condition on 401
# Confirm? [Y/n/edit]: Y
Enter fullscreen mode Exit fullscreen mode

It runs locally in your terminal. Zero config required.

How it works

  1. Reads what you changed from git diff
  2. Sends the diff to your chosen AI provider
  3. Returns a single, meaningful commit message in Conventional Commits format
  4. You review, edit if needed, and confirm

AI providers supported

Provider How Cost
OpenAI (default) gpt-4o-mini via API key ~$0.001/commit
DeepSeek deepseek-chat via API key Even cheaper
Local model Any OpenAI-compatible endpoint Free
ai-commit setup
Enter fullscreen mode Exit fullscreen mode

Bonus: ai-context

Same install, second tool. Run it inside any project:

ai-context
Enter fullscreen mode Exit fullscreen mode

It outputs your project file tree, key source files, and config — perfect for pasting into Claude Code, Cursor, or any AI agent. Gives the AI full context in one shot.

Install

pip install https://d9bl.com/downloads/ai-dev-tools-1.0.0.tar.gz
ai-commit setup
Enter fullscreen mode Exit fullscreen mode

Open source on GitHub — stars welcome!

Top comments (0)