Gcm
LLM-powered Git commit message generator using Ollama.
Install / Use
/learn @umutkavakli/GcmREADME
gcm - Git Commit Message Generator
gcm is a lightweight function that automatically generates commit messages using an LLM models with ollama. It provides an interactive prompt to accept, edit, regenerate, or cancel the commit message. You can also specify a different model for message generation. Inspired by Andrej Karpathy's gist snippet.
📥 Installation
1. Install Ollama
gcm requires Ollama to generate commit messages. Install it by following the instructions on the official website:
curl -fsSL https://ollama.ai/install.sh | sh
2. Install gcm
Run the following script to install gcm:
# Clone the repository
git clone https://github.com/umutkavakli/gcm.git
cd gcm
# Run the install script
chmod +x install.sh
./install.sh
This will:
- Copy required files to
/usr/local/share/gcm/ - Set up an alias in
~/.bashrcfor easy access
📌 Usage
Basic Commit Message Generation
Simply stage your changes and run:
gcm
This will:
- Generate a commit message based on staged changes
- Show an interactive prompt with options:
(a)ccept: Use the generated commit message(e)dit: Enter a custom message(r)egenerate: Generate a new message(c)ancel: Exit without committing
Using a Custom Model
To use a different model for commit message generation:
gcm -m model_name
This will:
- Update
Modelfileto use the specified model - Recreate the AI model with
ollama create
Help Command
To see available options, run:
gcm -h
🛠️ Troubleshooting
1. gcm: command not found?
Ensure that your shell is sourcing the alias. Run:
source ~/.bashrc
2. AI model fails to generate messages?
Check if ollama is installed and working properly:
ollama list
Related Skills
apple-reminders
354.2kManage Apple Reminders via remindctl CLI (list, add, edit, complete, delete). Supports lists, date filters, and JSON/plain output.
gh-issues
354.2kFetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments. Usage: /gh-issues [owner/repo] [--label bug] [--limit 5] [--milestone v1.0] [--assignee @me] [--fork user/repo] [--watch] [--interval 5] [--reviews-only] [--cron] [--dry-run] [--model glm-5] [--notify-channel -1002381931352]
healthcheck
354.2kHost security hardening and risk-tolerance configuration for OpenClaw deployments
node-connect
354.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
