Inspiration

Every developer knows the pain of writing commit messages. We either spend too much time crafting the perfect message, or we give up and write "fix bug" or "update". Looking at my own git history, I realized most commits were poorly documented - making code review and debugging a nightmare.

I wanted a tool that could analyze code changes and generate meaningful, standardized commit messages automatically.

What it does

AI Commit is a developer tool that:

  • Analyzes git diffs and generates Conventional Commits formatted messages
  • Scores commit message quality (0-100) with actionable feedback
  • Analyzes entire GitHub repositories to visualize commit quality trends
  • Supports multiple AI providers: OpenAI, Anthropic Claude, and local Ollama
  • Works as both a CLI tool and a web application

How we built it

  • CLI Tool: Node.js with Commander.js for argument parsing, Inquirer for interactive prompts
  • Web App: Next.js 14 with App Router, deployed on Vercel
  • Visualization: Recharts for interactive charts and graphs
  • AI Integration: OpenAI API, Anthropic API, and Ollama for local inference
  • Styling: Tailwind CSS with custom glassmorphism design

Challenges we ran into

  • Designing a scoring algorithm that accurately reflects commit message quality
  • Handling large diffs without exceeding API token limits
  • Making the tool work offline with Ollama while maintaining feature parity
  • GitHub API rate limiting when analyzing repositories

Accomplishments that we're proud of

  • The scoring system actually works - it catches vague messages and rewards specific ones
  • Beautiful visualization that makes commit quality tangible
  • Multi-provider support means anyone can use it, even without API keys (via Ollama)
  • The tool dogfoods itself - we used it to write commits for this project

What we learned

  • Conventional Commits specification and why it matters for maintainability
  • Building CLI tools with great developer experience
  • Integrating multiple AI providers with a unified interface

What's next for AI Commit

  • VS Code extension for in-editor commit message generation
  • GitHub Action for automated PR commit quality checks
  • Team analytics dashboard
  • Learning from repository history to match team's commit style

Built With

  • anthropic-api
  • next.js
  • node.js
  • ollama
  • openai-api
  • react
  • recharts
  • tailwind-css
Share this project:

Updates