Package Exports
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 (gitfi) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Git Fixed-It
An AI powered cli to generate/automate (better) git commit messages.
gitfi
is a simple command-line tool that uses Google's Gemini to automatically generate a descriptive commit message based on your staged Git changes.
Installation
npm install -g gitfi
Configuration
Before you can use gitfi
, you need to provide your Gemini API key. The tool will look for the key in the following order:
- A
.env
file in your project's root (GEMINI_API_KEY=...
). - A global config file at
~/.config/gitfi/.gitfi.conf
(Linux) or~/Library/Preferences/gitfi/.gitfi.conf
(macOS). - A local
.gitfi.conf
file in your project's root.
Your config file can contain any of these settings:
# Your Gemini API Key (required)
GEMINI_API_KEY=your_secret_api_key_here
# Optional: Specify a different Gemini model
GEMINI_MODEL=gemini-2.0-flash
# Optional: Provide a completely custom prompt.
PROMPT=You are a pirate. Write a commit message for this treasure map:
Note: The .env
file uses the same variable names.
Usage
After staging your files with git add
, you have two ways to use gitfi
.
Interactive Mode (For when you're feeling cautious)
Run the gen
command to have the AI generate a message and present you with options to commit, edit, or cancel.
gitfi gen
# or the alias
gitfi g
Direct Commit Mode (For when you're feeling confident)
Run the commit
command to have the AI generate a message and commit the changes instantly.
gitfi commit
# or the alias
gitfi c
See How Much Time You're Saving
gitfi
can track how much time it saves you.
Collect Data: Use the
--metric
(or-m
) flag with your commands. The performance data will be automatically and discreetly added to the commit message.gitfi commit --metric gitfi g -m
View Your Report: At any time, run the
report
command to see an aggregated summary of your time savings for the current repository.gitfi report