2 min read
|
Saved February 14, 2026
|
Copied!
Do you care about this?
smartcommit is a command-line tool that generates structured commit messages based on your code changes. It uses AI to analyze staged changes and asks questions to clarify the intent behind the code. You can choose between different AI providers for analysis.
If you do, here's more
smartcommit is a command-line tool designed to simplify the process of writing commit messages in accordance with the Conventional Commits specification. It uses AI to analyze your staged changes and generates structured messages based on the context of your code. The tool prompts users with specific questions to clarify the intent behind their changes, enhancing the quality of the commit history.
The tool supports two AI providers: OpenAI’s GPT-4o for high accuracy and Ollama’s Llama 3.1 for local, private use. Installation requires Go (version 1.21 or later) and Git. Users can clone the repository, build the binary, and optionally move it to their system PATH for easier access. To set up smartcommit as a default git command, you can configure it using a simple alias.
Using smartcommit involves a straightforward process. After staging changes with `git add .`, you run the command `smartcommit`. The interface guides you through selecting an AI provider, analyzing changes, answering questions for context, and reviewing the generated commit message. Users can also opt to edit the message or use their default editor if they prefer to write their own.
Configuration settings are stored in a local JSON file, allowing for user preferences, such as the OpenAI API key, to be saved. The project is open for contributions, encouraging developers to fork the repository and submit pull requests to enhance its functionality.
Questions about this article
No questions yet.