gitnote
is a CLI tool that uses AI to automatically generate meaningful Git commit messages based on staged changes.
gitnote
is an intelligent CLI tool designed for automatically generating commit messages with the help of artificial intelligence. This tool analyzes the staged changes in your Git repository to assist you in writing more relevant and optimized commit messages, improving your Git workflow.
- Smart Commit Message Suggestion: Powered by Hugging Face Hub, this tool suggest commit messages tailored to your staged changes.
- Clear and Enhanced Display: Uses the
rich
package to beautifully render staged changes in the CLI. - User-Friendly CLI Interface: Built with
typer
,gitnote
offers an intuitive and easy-to-use command-line interface.
To install gitnote
, use pip:
pip install gitnote
Before using gitnote
, take your token from Hugging Face API token (Recommended first!) and run the following command to set the token :
gitnote set-token
You can also set the token like this :
gitnote set-token "<token>"
Note: Don't forget put token inside double quotes on second way!
-
gitnote diff
Displays the staged changes in a visually enhanced format. If no changes are staged, the following message is displayed:No changes to display.
-
gitnote generate
Takes the staged changes (if any) and sends them to the Hugging Face Hub to generate an AI-driven commit message. If there are no staged changes, you’ll see:⚠️ No staged changes found! Please make sure you've staged your changes using 'git add' and try again.
For a full list of commands and usage information, use:
gitnote --help
This project is built with the following key packages:
typer
: For creating a command-line interface (CLI)huggingface-hub
: For connecting to Hugging Face AI models to generate intelligent commit messagesrich
: For beautifully rendering the staged changes in the CLI
The complete list of dependencies can be found in the
requirements.txt
file.
This project is licensed under the MIT License.