A Git plugin that generates descriptive commit messages using kiro-cli AI assistance.
- Automatically generates commit messages based on your staged changes
- Supports multiple prompt styles (conventional, detailed, emoji, pirate, and more!)
- Interactive confirmation before committing
- Customizable prompt templates
- Git
- kiro-cli - The AI-powered CLI tool
- Bash shell
- Clone or download this repository
- Make the script executable:
chmod +x git-qcommit
- Copy the script to a directory in your PATH:
sudo cp git-qcommit /usr/local/bin/
- Copy the commit prompts file to your home directory:
cp commitprompts ~/.commitprompts
Stage your changes and run:
git qcommitThis will use a random prompt style from your ~/.commitprompts file to generate a commit message.
You can specify a prompt style by name:
git qcommit conventional
git qcommit emoji
git qcommit pirateYou can also provide a custom prompt directly:
git qcommit "Write a commit message that focuses on the business value"The default ~/.commitprompts file includes these styles:
- conventional: Conventional commit format
- detailed: Detailed with bullet points
- headline: Newspaper headline style
- why: Explains the why, not just the what
- angular: Angular commit convention
- solution: Problem and solution
- future: Easy for future developers
- emoji: With representative emojis
- fifty: 50/72 rule compliance
- ticket: References issue numbers
- breaking: Separates breaking changes
- debt: Technical debt implications
- performance: Performance optimizations
- security: Security implications
- ux: UI/UX changes from user perspective
- pirate: Pirate speak (arrr!)
- leet: L33t Sp34k
- rhyme: Rhyming poem
- riddle: Riddle format
- hero: Superhero style
- 10x: Overconfident 10X developer
Edit ~/.commitprompts to add your own prompt styles. The format is:
name,prompt description
For example:
haiku,Write a commit message in haiku format with 5-7-5 syllables
This project has been updated to use the new kiro-cli command structure instead of the deprecated q command.
- Command invocation:
q chat -a→kiro-cli chat --no-interactive --trust-all-tools - The
-aflag has been replaced with explicit--no-interactiveand--trust-all-toolsflags - Updated documentation to reflect kiro-cli usage
If you're upgrading from a version that used the q command:
- Install kiro-cli following the official installation instructions
- Update your git-qcommit script to the latest version (this version)
- No configuration changes needed - the script works the same way from a user perspective
The user-facing interface remains unchanged. The migration is transparent to users - just ensure kiro-cli is installed and available in your PATH.
- Checks for staged changes in your Git repository
- Selects a prompt style (random, named, or custom)
- Analyzes your staged changes using
kiro-cli chat - Generates a commit message based on the prompt style
- Shows you the message and asks for confirmation
- Commits with the generated message if approved
The script uses kiro-cli chat with the following flags:
--no-interactive: Runs in non-interactive mode--trust-all-tools: Automatically trusts all tools without prompting
The input is piped to kiro-cli, which includes:
- Your staged changes (via Git context)
- Instructions to write the message to a temporary file
- The selected prompt style
Make sure kiro-cli is installed and available in your PATH. Install it following the official documentation.
Stage your changes first with:
git add <files>Ensure kiro-cli is properly configured and authenticated. Try running a simple command first:
kiro-cli chat "Hello"See LICENSE file for details.