Package Exports
- @mr_kaakyire/autogit
- @mr_kaakyire/autogit/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@mr_kaakyire/autogit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
autogit
Generate smart Git commit messages using the Gemini API (now using the gemini-2.0-flash model).
Features
- Reads your staged Git diff
- Sends it to Gemini (Google AI) for a commit message (using the
gemini-2.0-flashmodel) - Outputs a Markdown bullet list
- Optional: Auto-commit with generated message
- Shows a loading spinner during message generation
- Displays a success message when commit message is generated
- Displays a failure message if generation fails
Installation
- Clone this repo
- Install dependencies:
npm install
- Set up your API key:
- Copy
.env.exampleto.env - Add your Gemini API key to
.env
- Copy
Usage
Stage your changes with git add as usual, then run:
npx autogitOr, to auto-commit with the generated message:
npx autogit --commitYou can also install globally:
npm install -g .Then use:
autogit [--commit]Environment Variables
GEMINI_API_KEY— Your Gemini API key (see.env.example)
Dependencies
ora— for the loading spinner
Notes
- Only staged changes are used (like
git commit) - Handles API and Git errors gracefully
- Requires Node.js 16+
MIT License