← 返回首页
GitHub - hazadus/gh-commitmsg: A GitHub CLI extension for generating an AI-assisted commit message · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

hazadus/gh-commitmsg

Go to file
Code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
View all files

Repository files navigation

gh-commitmsg

Based on gh-standup by Sean Goedecke.

A GitHub CLI extension that generates AI-powered conventional commit messages using staged git changes from current repository. It uses free GitHub Models for inference, so you don't need to do any token setup - your existing GitHub CLI token will do fine!

If you find this utility useful, check my another tool – gh-repomon.

Installation

gh extension install hazadus/gh-commitmsg gh commitmsg

Organizations

To ensure the GitHub CLI can access your organization's data:

# Authenticate with GitHub CLI (if not already done) gh auth login # Authenticate with your organizations gh auth refresh -h github.com -s read:org

Prerequisites

Usage

Basic Usage

Generate a commit message for the staged changes:

# Stage changes in git repo git add . # Generate commit message gh commitmsg

Advanced Options

You can use and combine different options:

# Use different language gh commitmsg --language russian # Use previous commit messages as examples for LLM (default: 3, max: 20) gh commitmsg --examples # Or specify custom number of examples gh commitmsg --examples 5 # Use a different AI model gh commitmsg --model xai/grok-3-mini

Upgrading Extension to Latest Version

# Use to upgrade commitmsg to latest version gh extension upgrade commitmsg

Output examples

LLM will generate something like:

feat: add CI/CD workflows, license, and update project details - Introduced .github/workflows/ci.yml: - Added CI pipeline for testing, building, and artifact upload. - Configured matrix builds for multiple OS/architectures. - Added .github/workflows/release.yml: - Automated release process triggered by version tags. - Builds binaries for Linux, macOS, and Windows.

For more examples, see commit messages in this repo.

About

A GitHub CLI extension for generating an AI-assisted commit message

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Footer

© 2026 GitHub, Inc.