GIMI is a command-line interface (CLI) tool that uses AI to automatically generate conventional commit messages from your staged git changes. It supports Ollama, OpenAI, and Google Gemini.
You can install GIMI using NPM (recommended) or Go.
This method installs the pre-compiled binary for your operating system.
npm install -g gimi-cliTroubleshooting: "Command not found"
If you run gimi and see "command not found", your NPM global bin directory is likely not in your system's PATH.
- Run
npm config get prefixto see where npm installs global packages (e.g.,/usr/localor/Users/you/.npm-global). - Add the
binfolder inside that prefix to your PATH.- Example (add to
~/.zshrcor~/.bashrc):export PATH=$PATH:$(npm config get prefix)/bin
- Example (add to
If you have Go installed, you can build and install directly from the source:
go install github.com/shivgitcode/gimi@latestEnsure your Go bin directory (usually ~/go/bin) is in your PATH:
export PATH=$PATH:$(go env GOPATH)/binRun this once to select your AI provider (Ollama, OpenAI, or Gemini) and set API keys.
gimi initStage your changes (git add .) and run:
gimi generateThe tool will analyze your diff and propose a commit message.
To change your provider or keys:
gimi resetIf you are developing GIMI, follow these steps to avoid "running the old version" issues.
Do not just run gimi if you want to test your code changes. The gimi command points to the installed binary (in /usr/local/bin or $GOPATH/bin), not your current source code.
To run the version you are working on:
# Run directly from source
go run . generate
# OR
go run main.go generateIf you want to use your modified version globally (as the gimi command):
go install .This overwrites the binary in $GOPATH/bin with your current code.
To deploy a new version to NPM so everyone gets the update:
-
Prerequisites:
- Ensure you are logged into npm:
npm login - Ensure you have
nodeandgoinstalled.
- Ensure you are logged into npm:
-
Run the Build Script: We have a helper script that cross-compiles binaries for Windows, Linux, and macOS (AMD64 & ARM64) and updates the version.
# Usage: ./build.sh <new-version> ./build.sh 0.8.0This will:
- Clean
npm/bin/. - Compile binaries for all platforms.
- Update the version in
npm/package.json.
- Clean
-
Publish to NPM:
cd npm npm publish -
Commit Changes: Don't forget to commit the version bump and the new build artifacts (if you track them).
git add . git commit -m "chore: release v0.8.0" git tag v0.8.0 git push origin v0.8.0
Config is stored in ~/.gimi/config.json.
{
"Backend": "gemini",
"apiKey": "your-api-key"
}MIT