Automatically generate and commit changes using copilot
Project description
git-copilot-commit
AI-powered Git commit assistant that generates conventional commit messages using GitHub Copilot.
Features
- Generates commit messages based on your staged changes
- Supports multiple AI models: GPT-4, Claude, Gemini, and more
- Allows editing of generated messages before committing
- Follows the Conventional Commits standard
Installation
Install with uv (recommended):
uv tool install git-copilot-commit
Or with pipx:
pipx install git-copilot-commit
Or run directly with uv:
uvx git-copilot-commit --help
Prerequisites
- Active GitHub Copilot subscription
Quick Start
- Authenticate with GitHub Copilot:
git-copilot-commit authenticate
-
Make changes in your repository.
-
Generate and commit:
git-copilot-commit commit
Usage
Commit changes
git-copilot-commit commit
Options:
--all, -a: Stage all files--verbose, -v: Show detailed output--model, -m: Choose an AI model
Workflow:
- Analyze changes
- Prompt to stage files
- Generate a commit message
- Choose to commit, edit, or cancel
Authenticate
git-copilot-commit authenticate
List models
git-copilot-commit models
Configure
git-copilot-commit config --show
git-copilot-commit config --set-default-model gpt-4o
Examples
Commit all changes:
git-copilot-commit commit --all
Verbose output:
git-copilot-commit commit --verbose
Use a specific model:
git-copilot-commit commit --model claude-3.5-sonnet
Set and use a default model:
git-copilot-commit config --set-default-model gpt-4o
git-copilot-commit commit
git-copilot-commit commit --model claude-3.5-sonnet
Commit Message Format
Follows Conventional Commits:
<type>[optional scope]: <description>
Types:
feat: New featurefix: Bug fixdocs: Documentationstyle: Formatting onlyrefactor: Code restructureperf: Performancetest: Testschore: Maintenancerevert: Revert changes
Examples:
feat(auth): add JWT authenticationfix(db): retry connection on failuredocs(readme): update install stepsrefactor(utils): simplify date parsing
Git Configuration
Add a git alias by adding the following to your ~/.gitconfig:
[alias]
ai-commit = "!f() { git-copilot-commit commit $@; }; f"
Now you can run:
git ai-commit
git ai-commit --model claude-3.5-sonnet
git ai-commit --all --verbose
Show more context in diffs:
git config --global diff.context 3
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 git_copilot_commit-0.1.8.tar.gz.
File metadata
- Download URL: git_copilot_commit-0.1.8.tar.gz
- Upload date:
- Size: 21.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97d214db7bc11e69564c9b8247165c0bbc37a0feb2cc817e8d2db3e14d8150be
|
|
| MD5 |
7b6d190f1c987a73e7cde7b981f32cde
|
|
| BLAKE2b-256 |
7dbe4634ca1160cd1f323cab5c222410160429da555475b7a3f15fd33ae5a9d4
|
File details
Details for the file git_copilot_commit-0.1.8-py3-none-any.whl.
File metadata
- Download URL: git_copilot_commit-0.1.8-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2832d60967b5a4a2d591537318c187303131692283fed13e50650242b6e538f3
|
|
| MD5 |
2160437105f3e704190118a6699cfa0e
|
|
| BLAKE2b-256 |
f2a85315eb0978ff17b560f31ac52ff6b7143371753a1bb54bf1c0d1f99f9fdd
|