Skip to main content

AI generated commit messages.

Project description

gmuse Logo

gmuse

GitHub Read the Docs

Checks codecov

PyPI Python Versions

License: MIT

AI generated git commit messages in the shell using LLMs.

Highlights

  • AI-powered shell completions (zsh, experimental) — context-aware suggestions for git commit -m that 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

  1. Install gmuse (see Installation below).
  2. Ensure your LLM provider API key is set (e.g., OPENAI_API_KEY).
  3. Load completions: eval "$(gmuse git-completions zsh)"
  4. Stage changes: git add .
  5. Test: git commit -m <TAB> — gmuse will suggest a message; confirm to use it.
  6. Alternatively, generate a commit message directly: gmuse msg
  7. 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-mini
  • anthropic: claude-haiku-4-5
  • cohere: command-light
  • azure: gpt-4o-mini
  • gemini: 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 (default true) — enable/disable completions
  • GMUSE_COMPLETIONS_TIMEOUT (default 3.0) — generation timeout in seconds
  • GMUSE_COMPLETIONS_CACHE_TTL (default 30) — cache TTL in seconds

See the documentation for details: https://gmuse.readthedocs.io/en/latest/how_to/completions.html

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gmuse-0.2.1.tar.gz (3.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gmuse-0.2.1-py3-none-any.whl (45.4 kB view details)

Uploaded Python 3

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

Hashes for gmuse-0.2.1.tar.gz
Algorithm Hash digest
SHA256 6c5e1c259ef552e70e32c762cce176c08736ecea29e9406b53816572a62c5f25
MD5 d5220bb4d48940d28e84a1a85fb96837
BLAKE2b-256 870adca9175a9d08e2084e67acfb0665f376caf9c41735b906d1ef87ff8c5c8c

See more details on using hashes here.

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

Hashes for gmuse-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f6ff912a34afeadc0b4bf4dbb263ac658ce74dfeaf26fca4145c94ceb38c7968
MD5 b90fdd0233c10a113cb2452b10539639
BLAKE2b-256 f8a064df6c0419de7e34e8a87952dd65f5fcfc4911409ea447a8b0334a316752

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page