AI generated commit messages.
Project description
gmuse
AI generated git commit messages in the shell using LLMs.
Highlights
- AI-powered shell completions (zsh, experimental) — context-aware suggestions for
git commit -mthat help you generate commit messages faster. - Fast, configurable message generation — generate high‑quality commit messages via the CLI with customizable prompts, models, and provider settings.
Quickstart
- Install gmuse (see Installation below).
- Ensure your LLM provider API key is set (e.g.,
OPENAI_API_KEY). - Load completions:
eval "$(gmuse git-completions zsh)" - Stage changes:
git add . - Test:
git commit -m <TAB>— gmuse will suggest a message; confirm to use it. - Alternatively, generate a commit message directly:
gmuse msg - Preview the prompt without calling LLM:
gmuse msg --dry-run
See Completions docs for configuration and how to persist the completion across sessions.
Installation
# Basic installation
pip install gmuse
# With clipboard support
pip install gmuse[clipboard]
Provider Setup
gmuse supports 100+ LLM providers via LiteLLM. Set your API key:
export OPENAI_API_KEY="sk-..." # For OpenAI
export ANTHROPIC_API_KEY="sk-ant-..." # For Anthropic
export GOOGLE_API_KEY="..." # For Google
# Or configure in ~/.config/gmuse/config.toml
Provider selection is auto-detected from API keys (e.g., OPENAI_API_KEY, ANTHROPIC_API_KEY).
Default model choices (cost-efficient variants):
openai:gpt-4o-minianthropic:claude-haiku-4-5cohere:command-lightazure:gpt-4o-minigemini:gemini/gemini-flash-lite-latest
These defaults are chosen to prioritize lower cost and latency for short, high-throughput tasks like commit-message generation. You can override via GMUSE_MODEL env var or the --model CLI option.
Zsh completions (experimental)
Generate a Zsh completion script that provides AI-powered commit message
suggestions for git commit -m.
Quick install:
# Add to your ~/.zshrc so the completion is loaded on shell startup
eval "$(gmuse git-completions zsh)"
Configuration:
GMUSE_COMPLETIONS_ENABLED(defaulttrue) — enable/disable completionsGMUSE_COMPLETIONS_TIMEOUT(default3.0) — generation timeout in secondsGMUSE_COMPLETIONS_CACHE_TTL(default30) — cache TTL in seconds
See the documentation for details: https://gmuse.readthedocs.io/en/latest/how_to/completions.html
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gmuse-0.2.1.tar.gz.
File metadata
- Download URL: gmuse-0.2.1.tar.gz
- Upload date:
- Size: 3.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c5e1c259ef552e70e32c762cce176c08736ecea29e9406b53816572a62c5f25
|
|
| MD5 |
d5220bb4d48940d28e84a1a85fb96837
|
|
| BLAKE2b-256 |
870adca9175a9d08e2084e67acfb0665f376caf9c41735b906d1ef87ff8c5c8c
|
File details
Details for the file gmuse-0.2.1-py3-none-any.whl.
File metadata
- Download URL: gmuse-0.2.1-py3-none-any.whl
- Upload date:
- Size: 45.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6ff912a34afeadc0b4bf4dbb263ac658ce74dfeaf26fca4145c94ceb38c7968
|
|
| MD5 |
b90fdd0233c10a113cb2452b10539639
|
|
| BLAKE2b-256 |
f8a064df6c0419de7e34e8a87952dd65f5fcfc4911409ea447a8b0334a316752
|