| Crates.io | gh-sparkle |
| lib.rs | gh-sparkle |
| version | 0.1.0 |
| created_at | 2026-01-23 07:30:08.635603+00 |
| updated_at | 2026-01-23 07:30:08.635603+00 |
| description | Generate AI-powered commit messages |
| homepage | |
| repository | https://github.com/dyxushuai/gh-sparkle |
| max_upload_size | |
| id | 2063726 |
| size | 105,169 |
A GitHub CLI extension that brings VS Code's "Generate Commit Message" flow to your terminal. It reads staged changes, asks GitHub Models for a Conventional Commit message, and commits it automatically.
The name comes from the ✨/sparkle icon in VS Code's "Generate Commit Message"
action. I wanted the same flow inside gh: stage, generate, commit.
auto with safe input trimming for large changes--language, --examples, and --modelgh extension install dyxushuai/gh-sparkle
Stage your changes and run:
git add .
gh sparkle
-l, --language <LANGUAGE>: Output language for the commit message.
Default: english.-e, --examples[=<N>]: Include recent commit messages as examples.
If provided without a value, it uses 3. Valid range: 1..=20.-m, --model <MODEL>: GitHub Models model to use.
Default: auto (resolved via modelPolicy.autoModels in the prompt config,
tried in order until a request succeeds).# Generate commit message in a different language
gh sparkle --language chinese
# Add previous commit messages as examples (default 3 when flag is present)
gh sparkle --examples
# Or specify the number of examples (max 20)
gh sparkle --examples 5
# Use a different GitHub Models model
gh sparkle --model xai/grok-3-mini
gh auth login)If you use GitHub Enterprise, make sure your host is authenticated:
gh auth login --hostname <your-host>
gh extension upgrade sparkle
For big diffs, it summarizes and trims input, then retries with a smaller budget when
needed. Input budgets and model policy are defined in
assets/commitmsg.prompt.yml.