We've all written terrible commit messages.
git commit -m "fix"
git commit -m "stuff"
git commit -m "changes pls work"
I got tired of it. So I built claude-autocommit — a CLI tool that reads your staged git diff and automatically generates a meaningful commit message using Claude AI.
How it works
git add .
claude-autocommit
# ✅ feat: add user authentication with JWT tokens
That's it. One command. Done.
Tech Stack
- TypeScript
- Claude API (Anthropic)
- Node.js CLI
Installation
npm install -g @lakshitsharma1/claude-autocommit
Set your API key:
# Windows
$env:ANTHROPIC_API_KEY="your-key"
# Mac/Linux
export ANTHROPIC_API_KEY="your-key"
Then just run:
git add .
claude-autocommit
What I learned
Building a CLI tool from scratch taught me a lot about how npm packages work, how to structure TypeScript projects, and how easy it is to integrate Claude API into real tools.
The whole project is open source — contributions welcome!
Links
- GitHub: https://github.com/LakshitSharma1/claude-autocommit
- npm: https://www.npmjs.com/package/@lakshitsharma1/claude-autocommit
If this seems useful, drop a ⭐ on GitHub!
Top comments (0)