quikcommit
v1.0.3
Published
A CLI tool to automatically generate git commit messages based on last file changes using AI.
Downloads
37
Maintainers
Readme
QuikCommit
QuikCommit is a command-line tool that automatically generates concise commit messages based on your git changes. You can use either a default non-AI message or integrate with Google's Generative AI to generate smarter commit messages.
Table of Contents
Introduction
QuikCommit streamlines your Git workflow by auto-generating commit messages based on your recent file changes. You can either use a default message or, for more intelligent suggestions, leverage Google's Generative AI.
Features
- Auto-generates commit messages based on the recent git
diff
. - Optional integration with Google's Generative AI for smarter, context-aware commit messages.
- Supports a fallback to non-AI commit messages if no API key is provided.
- Simple and easy to integrate into your workflow.
Installation
Install as a Dependency
Install globally via npm:
npm install -g quikcommit
Initialize a Git repository (if not already done):
git init
Optional: Add your Google Generative AI API key for smarter commit messages:
- Create a
.env
file in your project’s root folder and add:GEMINI_API_KEY=your_google_ai_api_key
- Create a
Run
quikcommit
in your Git repository to auto-generate commit messages.
Clone the Repository
Alternatively, you can clone and run the project directly:
Clone the repository:
git clone https://github.com/your-username/quikcommit.git
Navigate to the project directory:
cd quikcommit
Install dependencies:
npm install
Optional: Set up the AI API key in a
.env
file as described earlier for smarter commit messages.Run the script:
node index.js
Usage
Without AI Key
If you do not set an API key, QuikCommit will use a fallback commit message. Simply run:
quikcommit
The tool will:
- Check for changes using
git diff
. - Generate a default message like "Changes made" if no AI key is provided.
- Stage and commit the changes automatically.
With AI Key
For AI-powered commit messages, ensure your API key is set in the environment variables:
Add your
GEMINI_API_KEY
in a.env
file.Run:
quikcommit
With the API key, QuikCommit will:
- Use Google's Generative AI to analyze the
git diff
. - Generate an AI-suggested commit message based on the changes.
- Stage and commit the changes with the AI-generated message.
CLI Commands
Generate Commit and Push Changes:
quikcommit
If you are not in a Git repository, initialize it first:
git init
Environment Variables
If you want AI-generated commit messages, set up your environment variables:
Create a
.env
file in your project’s root directory.Add your API key:
GEMINI_API_KEY=your_google_ai_api_key
Without this key, QuikCommit will fall back to using default non-AI commit messages.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Summary
- Option 1: Use default commit messages (no API key needed).
- Option 2: Set up a
GEMINI_API_KEY
for AI-powered commit messages.