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).
- Set credentials for your provider:
- Interactive setup:
gmuse auth set OPENAI_API_KEY - Non-interactive environments (CI, containers, automation): export environment variables (for example
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.
Interactive setup (stores credentials in your OS keyring):
gmuse auth set OPENAI_API_KEY
gmuse auth status
Auth command details: https://gmuse.readthedocs.io/en/latest/reference/cli.html#gmuse-auth
Non-interactive environments (CI, containers, automation):
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 credentials (environment variables first, then keyring when env values are unset or blank).
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.3.0.tar.gz.
File metadata
- Download URL: gmuse-0.3.0.tar.gz
- Upload date:
- Size: 3.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","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 |
f7ae874f07a37d080fd76b2addffeab9bd28e9706d871b53fc6834f9a173b0ae
|
|
| MD5 |
cfb2a93d8e7652f433a9c31e7d245d8f
|
|
| BLAKE2b-256 |
c684159f6fdcd2d6c0eea64b8cc64e85c21f93ff1f739c66da4fead835e235ca
|
File details
Details for the file gmuse-0.3.0-py3-none-any.whl.
File metadata
- Download URL: gmuse-0.3.0-py3-none-any.whl
- Upload date:
- Size: 52.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","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 |
777e34312f05be9d27f2fa118681726ae79d8792de52dccb2a23a632d16d0cb8
|
|
| MD5 |
5dbf34c5a822d84755f3bc488c51112d
|
|
| BLAKE2b-256 |
a43bbe321c5560a01653cfc75653e249c29c58dc5f89cd4b5ce30c1714f49714
|