Commiat uses the OpenRouter API with Google Gemini Flash 1.5 to generate perfect commit messages based on your staged changes.
$ commiat -a # stage all changes
✨ Analyzing staged changes with Gemini...
Generated commit message:
✨ Add user profile page with avatar upload
# Press enter to confirm, edit to adjust, or Ctrl+C to cancel
$ git log -1
commit 1a2b3c4d...
Author: Your Name
Date: Thu Jun 1 14:00:00 2023 +0000
✨ Add user profile page with avatar upload
This is a short 5-minute excerpt (cutoff) from our podcast discussing the Commiat CLI.
You can listen to the
full podcast here
.
Commiat makes your git workflow smarter and more productive
Uses OpenRouter API with Google Gemini Flash to analyze your diffs and generate clear, descriptive commit messages.
Optionally stage all changes with the -a
flag or stage manually before running.
Support for both global and project-specific configuration via .env
files or the global config.
Review, edit, or cancel the suggested commit before it's finalized to maintain full control.
Choose your preferred AI model with the OPENROUTER_MODEL
setting (defaults to Gemini Flash).
Guided configuration when first run, securely saving your OpenRouter API key to the global config.
A simple CLI workflow that fits right into your existing git habits
Run commiat
after staging changes, or use commiat -a
to stage all changes automatically.
Commiat analyzes your staged changes using OpenRouter with Gemini Flash (or your configured model).
Confirm, edit, or cancel the suggested commit message before it's finalized.
# Install and set up Commiat
$ git clone https://github.com/javimosch/commiat.git
$ cd commiat
$ npm install
$ npm link
# First run - will prompt for OpenRouter API key
$ commiat -a
🔑 Enter your OpenRouter API key: [hidden input]
# Subsequent usage
$ commiat -a
✨ Analyzing staged changes with Gemini...
Generated commit message:
✨ Update README with complete installation instructions
# Press enter to confirm, edit to adjust, or Ctrl+C to cancel
Get started with Commiat in a few simple steps
# Clone the repository
$ git clone https://github.com/javimosch/commiat.git
$ cd commiat
# Install dependencies
$ npm install
# Link for global access
$ npm link
Commiat looks for configuration in this order of precedence:
.env
file:
OPENROUTER_API_KEY=your_key_here
OPENROUTER_MODEL=google/gemini-flash-1.5
~/.commiat/config
):
Edit with commiat config
First-run setup will securely save your API key
You'll need an OpenRouter API key. Commiat uses google/gemini-flash-1.5
by default, but you can configure any supported model.
Basic commands to get started:
# Option 1: Stage changes manually
$ git add file1.js file2.css
$ commiat
# Option 2: Stage all changes automatically
$ commiat -a
# Edit global configuration
$ commiat config
Open source, easy to install, and powered by cutting-edge AI.