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
$ uvx git-copilot-commit commit --help
Usage: git-copilot-commit commit [OPTIONS]
Automatically commit changes in the current git repository.
Options:
-a, --all Stage all files before committing
-v, --verbose Show verbose output
-m, --model TEXT Model to use for generating commit message
--help Show this message and exit.
Authenticate
$ uvx git-copilot-commit authenticate --help
Usage: git-copilot-commit authenticate [OPTIONS]
Autheticate with GitHub Copilot.
Options:
--help Show this message and exit.
List models
$ uvx git-copilot-commit models --help
Usage: git-copilot-commit models [OPTIONS]
List models available for chat in a table.
Options:
--help Show this message and exit.
Configure
$ uvx git-copilot-commit config --help
Usage: git-copilot-commit config [OPTIONS]
Manage application configuration.
Options:
--set-default-model TEXT Set default model for commit messages
--show Show current configuration
--help Show this message and exit.
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
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 --all --verbose
git ai-commit --model claude-3.5-sonnet
Additionally, show more context in diffs by running the following command:
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.10.tar.gz.
File metadata
- Download URL: git_copilot_commit-0.1.10.tar.gz
- Upload date:
- Size: 21.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8856ba5391c7ee69b310847bd973e2f58a9500df02cdb582168f055474307429
|
|
| MD5 |
73d3679bd704eee6164c23e5e307ed17
|
|
| BLAKE2b-256 |
9380dfbeacafd0c36f0935053f38619dca6900c972fed0296647958d4e75348d
|
File details
Details for the file git_copilot_commit-0.1.10-py3-none-any.whl.
File metadata
- Download URL: git_copilot_commit-0.1.10-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cf50e0b65dc8c2940d9f34ebb952ca3c6e6f3a67f8d97bc8e7f3d558141549e
|
|
| MD5 |
2b98f12e5523478b58fd2476bb9a489d
|
|
| BLAKE2b-256 |
0ccd42c803e9128d862b2988a7ccf0d93285cfad70acaad2c662c6ff8b942c04
|