git-copilot-commit 0.1.7__tar.gz → 0.1.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- git_copilot_commit-0.1.8/PKG-INFO +183 -0
- git_copilot_commit-0.1.8/README.md +170 -0
- {git_copilot_commit-0.1.7 → git_copilot_commit-0.1.8}/pyproject.toml +2 -2
- {git_copilot_commit-0.1.7 → git_copilot_commit-0.1.8}/src/git_copilot_commit/settings.py +13 -11
- {git_copilot_commit-0.1.7 → git_copilot_commit-0.1.8}/uv.lock +3 -12
- git_copilot_commit-0.1.7/PKG-INFO +0 -201
- git_copilot_commit-0.1.7/README.md +0 -188
- {git_copilot_commit-0.1.7 → git_copilot_commit-0.1.8}/.github/workflows/ci.yml +0 -0
- {git_copilot_commit-0.1.7 → git_copilot_commit-0.1.8}/.gitignore +0 -0
- {git_copilot_commit-0.1.7 → git_copilot_commit-0.1.8}/.python-version +0 -0
- {git_copilot_commit-0.1.7 → git_copilot_commit-0.1.8}/LICENSE +0 -0
- {git_copilot_commit-0.1.7 → git_copilot_commit-0.1.8}/src/git_copilot_commit/__init__.py +0 -0
- {git_copilot_commit-0.1.7 → git_copilot_commit-0.1.8}/src/git_copilot_commit/cli.py +0 -0
- {git_copilot_commit-0.1.7 → git_copilot_commit-0.1.8}/src/git_copilot_commit/git.py +0 -0
- {git_copilot_commit-0.1.7 → git_copilot_commit-0.1.8}/src/git_copilot_commit/py.typed +0 -0
- {git_copilot_commit-0.1.7 → git_copilot_commit-0.1.8}/src/git_copilot_commit/version.py +0 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: git-copilot-commit
|
|
3
|
+
Version: 0.1.8
|
|
4
|
+
Summary: Automatically generate and commit changes using copilot
|
|
5
|
+
Author-email: Dheepak Krishnamurthy <1813121+kdheepak@users.noreply.github.com>
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Requires-Python: >=3.12
|
|
8
|
+
Requires-Dist: platformdirs>=4.0.0
|
|
9
|
+
Requires-Dist: pycopilot>=0.1.6
|
|
10
|
+
Requires-Dist: rich>=14.0.0
|
|
11
|
+
Requires-Dist: typer>=0.16.0
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
|
|
14
|
+
# `git-copilot-commit`
|
|
15
|
+
|
|
16
|
+
AI-powered Git commit assistant that generates conventional commit messages using GitHub Copilot.
|
|
17
|
+
|
|
18
|
+
## Features
|
|
19
|
+
|
|
20
|
+
- Generates commit messages based on your staged changes
|
|
21
|
+
- Supports multiple AI models: GPT-4, Claude, Gemini, and more
|
|
22
|
+
- Allows editing of generated messages before committing
|
|
23
|
+
- Follows the [Conventional Commits](https://www.conventionalcommits.org/) standard
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
Install with [`uv`] (recommended):
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
uv tool install git-copilot-commit
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Or with `pipx`:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pipx install git-copilot-commit
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Or run directly with [`uv`]:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
uvx git-copilot-commit --help
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
[`uv`]: https://github.com/astral-sh/uv
|
|
46
|
+
|
|
47
|
+
## Prerequisites
|
|
48
|
+
|
|
49
|
+
- Active GitHub Copilot subscription
|
|
50
|
+
|
|
51
|
+
## Quick Start
|
|
52
|
+
|
|
53
|
+
1. Authenticate with GitHub Copilot:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
git-copilot-commit authenticate
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
2. Make changes in your repository.
|
|
60
|
+
|
|
61
|
+
3. Generate and commit:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
git-copilot-commit commit
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Usage
|
|
68
|
+
|
|
69
|
+
### Commit changes
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
git-copilot-commit commit
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Options:**
|
|
76
|
+
|
|
77
|
+
- `--all, -a`: Stage all files
|
|
78
|
+
- `--verbose, -v`: Show detailed output
|
|
79
|
+
- `--model, -m`: Choose an AI model
|
|
80
|
+
|
|
81
|
+
Workflow:
|
|
82
|
+
|
|
83
|
+
1. Analyze changes
|
|
84
|
+
2. Prompt to stage files
|
|
85
|
+
3. Generate a commit message
|
|
86
|
+
4. Choose to commit, edit, or cancel
|
|
87
|
+
|
|
88
|
+
### Authenticate
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
git-copilot-commit authenticate
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### List models
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
git-copilot-commit models
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Configure
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
git-copilot-commit config --show
|
|
104
|
+
git-copilot-commit config --set-default-model gpt-4o
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Examples
|
|
108
|
+
|
|
109
|
+
Commit all changes:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
git-copilot-commit commit --all
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Verbose output:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
git-copilot-commit commit --verbose
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Use a specific model:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
git-copilot-commit commit --model claude-3.5-sonnet
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Set and use a default model:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
git-copilot-commit config --set-default-model gpt-4o
|
|
131
|
+
git-copilot-commit commit
|
|
132
|
+
git-copilot-commit commit --model claude-3.5-sonnet
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Commit Message Format
|
|
136
|
+
|
|
137
|
+
Follows [Conventional Commits](https://www.conventionalcommits.org/):
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
<type>[optional scope]: <description>
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Types:**
|
|
144
|
+
|
|
145
|
+
- `feat`: New feature
|
|
146
|
+
- `fix`: Bug fix
|
|
147
|
+
- `docs`: Documentation
|
|
148
|
+
- `style`: Formatting only
|
|
149
|
+
- `refactor`: Code restructure
|
|
150
|
+
- `perf`: Performance
|
|
151
|
+
- `test`: Tests
|
|
152
|
+
- `chore`: Maintenance
|
|
153
|
+
- `revert`: Revert changes
|
|
154
|
+
|
|
155
|
+
**Examples:**
|
|
156
|
+
|
|
157
|
+
- `feat(auth): add JWT authentication`
|
|
158
|
+
- `fix(db): retry connection on failure`
|
|
159
|
+
- `docs(readme): update install steps`
|
|
160
|
+
- `refactor(utils): simplify date parsing`
|
|
161
|
+
|
|
162
|
+
## Git Configuration
|
|
163
|
+
|
|
164
|
+
Add a git alias by adding the following to your `~/.gitconfig`:
|
|
165
|
+
|
|
166
|
+
```ini
|
|
167
|
+
[alias]
|
|
168
|
+
ai-commit = "!f() { git-copilot-commit commit $@; }; f"
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Now you can run:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
git ai-commit
|
|
175
|
+
git ai-commit --model claude-3.5-sonnet
|
|
176
|
+
git ai-commit --all --verbose
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Show more context in diffs:
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
git config --global diff.context 3
|
|
183
|
+
```
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# `git-copilot-commit`
|
|
2
|
+
|
|
3
|
+
AI-powered Git commit assistant that generates conventional commit messages using GitHub Copilot.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Generates commit messages based on your staged changes
|
|
8
|
+
- Supports multiple AI models: GPT-4, Claude, Gemini, and more
|
|
9
|
+
- Allows editing of generated messages before committing
|
|
10
|
+
- Follows the [Conventional Commits](https://www.conventionalcommits.org/) standard
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
Install with [`uv`] (recommended):
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
uv tool install git-copilot-commit
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Or with `pipx`:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pipx install git-copilot-commit
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Or run directly with [`uv`]:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
uvx git-copilot-commit --help
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[`uv`]: https://github.com/astral-sh/uv
|
|
33
|
+
|
|
34
|
+
## Prerequisites
|
|
35
|
+
|
|
36
|
+
- Active GitHub Copilot subscription
|
|
37
|
+
|
|
38
|
+
## Quick Start
|
|
39
|
+
|
|
40
|
+
1. Authenticate with GitHub Copilot:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
git-copilot-commit authenticate
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
2. Make changes in your repository.
|
|
47
|
+
|
|
48
|
+
3. Generate and commit:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
git-copilot-commit commit
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Usage
|
|
55
|
+
|
|
56
|
+
### Commit changes
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
git-copilot-commit commit
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Options:**
|
|
63
|
+
|
|
64
|
+
- `--all, -a`: Stage all files
|
|
65
|
+
- `--verbose, -v`: Show detailed output
|
|
66
|
+
- `--model, -m`: Choose an AI model
|
|
67
|
+
|
|
68
|
+
Workflow:
|
|
69
|
+
|
|
70
|
+
1. Analyze changes
|
|
71
|
+
2. Prompt to stage files
|
|
72
|
+
3. Generate a commit message
|
|
73
|
+
4. Choose to commit, edit, or cancel
|
|
74
|
+
|
|
75
|
+
### Authenticate
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
git-copilot-commit authenticate
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### List models
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
git-copilot-commit models
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Configure
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
git-copilot-commit config --show
|
|
91
|
+
git-copilot-commit config --set-default-model gpt-4o
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Examples
|
|
95
|
+
|
|
96
|
+
Commit all changes:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
git-copilot-commit commit --all
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Verbose output:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
git-copilot-commit commit --verbose
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Use a specific model:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
git-copilot-commit commit --model claude-3.5-sonnet
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Set and use a default model:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
git-copilot-commit config --set-default-model gpt-4o
|
|
118
|
+
git-copilot-commit commit
|
|
119
|
+
git-copilot-commit commit --model claude-3.5-sonnet
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Commit Message Format
|
|
123
|
+
|
|
124
|
+
Follows [Conventional Commits](https://www.conventionalcommits.org/):
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
<type>[optional scope]: <description>
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Types:**
|
|
131
|
+
|
|
132
|
+
- `feat`: New feature
|
|
133
|
+
- `fix`: Bug fix
|
|
134
|
+
- `docs`: Documentation
|
|
135
|
+
- `style`: Formatting only
|
|
136
|
+
- `refactor`: Code restructure
|
|
137
|
+
- `perf`: Performance
|
|
138
|
+
- `test`: Tests
|
|
139
|
+
- `chore`: Maintenance
|
|
140
|
+
- `revert`: Revert changes
|
|
141
|
+
|
|
142
|
+
**Examples:**
|
|
143
|
+
|
|
144
|
+
- `feat(auth): add JWT authentication`
|
|
145
|
+
- `fix(db): retry connection on failure`
|
|
146
|
+
- `docs(readme): update install steps`
|
|
147
|
+
- `refactor(utils): simplify date parsing`
|
|
148
|
+
|
|
149
|
+
## Git Configuration
|
|
150
|
+
|
|
151
|
+
Add a git alias by adding the following to your `~/.gitconfig`:
|
|
152
|
+
|
|
153
|
+
```ini
|
|
154
|
+
[alias]
|
|
155
|
+
ai-commit = "!f() { git-copilot-commit commit $@; }; f"
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Now you can run:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
git ai-commit
|
|
162
|
+
git ai-commit --model claude-3.5-sonnet
|
|
163
|
+
git ai-commit --all --verbose
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Show more context in diffs:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
git config --global diff.context 3
|
|
170
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "git-copilot-commit"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.8"
|
|
4
4
|
description = "Automatically generate and commit changes using copilot"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [
|
|
@@ -11,7 +11,7 @@ dependencies = [
|
|
|
11
11
|
"pycopilot>=0.1.6",
|
|
12
12
|
"rich>=14.0.0",
|
|
13
13
|
"typer>=0.16.0",
|
|
14
|
-
"
|
|
14
|
+
"platformdirs>=4.0.0",
|
|
15
15
|
]
|
|
16
16
|
|
|
17
17
|
[project.scripts]
|
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
"""
|
|
2
|
-
Settings management using
|
|
2
|
+
Settings management using platformdirs for cross-platform directory paths.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
5
|
import json
|
|
6
6
|
from typing import Any
|
|
7
7
|
|
|
8
|
-
from
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
from platformdirs import (
|
|
9
|
+
user_cache_dir,
|
|
10
|
+
user_config_dir,
|
|
11
|
+
user_data_dir,
|
|
12
|
+
user_state_dir,
|
|
13
13
|
)
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
class Settings:
|
|
17
|
-
"""Manages application settings using
|
|
17
|
+
"""Manages application settings using platformdirs for cross-platform directory paths."""
|
|
18
18
|
|
|
19
19
|
APP_NAME = "git-copilot-commit"
|
|
20
20
|
|
|
21
21
|
def __init__(self):
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
self.
|
|
25
|
-
self.
|
|
22
|
+
from pathlib import Path
|
|
23
|
+
|
|
24
|
+
self.config_dir = Path(user_config_dir(f"com.kdheepak.{self.APP_NAME}"))
|
|
25
|
+
self.data_dir = Path(user_data_dir(f"com.kdheepak.{self.APP_NAME}"))
|
|
26
|
+
self.cache_dir = Path(user_cache_dir(f"com.kdheepak.{self.APP_NAME}"))
|
|
27
|
+
self.state_dir = Path(user_state_dir(f"com.kdheepak.{self.APP_NAME}"))
|
|
26
28
|
|
|
27
29
|
self.config_file = self.config_dir / "config.json"
|
|
28
30
|
|
|
@@ -57,21 +57,21 @@ wheels = [
|
|
|
57
57
|
|
|
58
58
|
[[package]]
|
|
59
59
|
name = "git-copilot-commit"
|
|
60
|
-
version = "0.1.
|
|
60
|
+
version = "0.1.8"
|
|
61
61
|
source = { editable = "." }
|
|
62
62
|
dependencies = [
|
|
63
|
+
{ name = "platformdirs" },
|
|
63
64
|
{ name = "pycopilot" },
|
|
64
65
|
{ name = "rich" },
|
|
65
66
|
{ name = "typer" },
|
|
66
|
-
{ name = "xdg-base-dirs" },
|
|
67
67
|
]
|
|
68
68
|
|
|
69
69
|
[package.metadata]
|
|
70
70
|
requires-dist = [
|
|
71
|
+
{ name = "platformdirs", specifier = ">=4.0.0" },
|
|
71
72
|
{ name = "pycopilot", specifier = ">=0.1.6" },
|
|
72
73
|
{ name = "rich", specifier = ">=14.0.0" },
|
|
73
74
|
{ name = "typer", specifier = ">=0.16.0" },
|
|
74
|
-
{ name = "xdg-base-dirs", specifier = ">=6.0.2" },
|
|
75
75
|
]
|
|
76
76
|
|
|
77
77
|
[[package]]
|
|
@@ -333,12 +333,3 @@ sdist = { url = "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc
|
|
|
333
333
|
wheels = [
|
|
334
334
|
{ url = "https://files.pythonhosted.org/packages/fd/84/fd2ba7aafacbad3c4201d395674fc6348826569da3c0937e75505ead3528/wcwidth-0.2.13-py2.py3-none-any.whl", hash = "sha256:3da69048e4540d84af32131829ff948f1e022c1c6bdb8d6102117aac784f6859", size = 34166, upload-time = "2024-01-06T02:10:55.763Z" },
|
|
335
335
|
]
|
|
336
|
-
|
|
337
|
-
[[package]]
|
|
338
|
-
name = "xdg-base-dirs"
|
|
339
|
-
version = "6.0.2"
|
|
340
|
-
source = { registry = "https://pypi.org/simple" }
|
|
341
|
-
sdist = { url = "https://files.pythonhosted.org/packages/bf/d0/bbe05a15347538aaf9fa5b51ac3b97075dfb834931fcb77d81fbdb69e8f6/xdg_base_dirs-6.0.2.tar.gz", hash = "sha256:950504e14d27cf3c9cb37744680a43bf0ac42efefc4ef4acf98dc736cab2bced", size = 4085, upload-time = "2024-10-19T14:35:08.114Z" }
|
|
342
|
-
wheels = [
|
|
343
|
-
{ url = "https://files.pythonhosted.org/packages/fc/03/030b47fd46b60fc87af548e57ff59c2ca84b2a1dadbe721bb0ce33896b2e/xdg_base_dirs-6.0.2-py3-none-any.whl", hash = "sha256:3c01d1b758ed4ace150ac960ac0bd13ce4542b9e2cdf01312dcda5012cfebabe", size = 4747, upload-time = "2024-10-19T14:35:05.931Z" },
|
|
344
|
-
]
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: git-copilot-commit
|
|
3
|
-
Version: 0.1.7
|
|
4
|
-
Summary: Automatically generate and commit changes using copilot
|
|
5
|
-
Author-email: Dheepak Krishnamurthy <1813121+kdheepak@users.noreply.github.com>
|
|
6
|
-
License-File: LICENSE
|
|
7
|
-
Requires-Python: >=3.12
|
|
8
|
-
Requires-Dist: pycopilot>=0.1.6
|
|
9
|
-
Requires-Dist: rich>=14.0.0
|
|
10
|
-
Requires-Dist: typer>=0.16.0
|
|
11
|
-
Requires-Dist: xdg-base-dirs>=6.0.2
|
|
12
|
-
Description-Content-Type: text/markdown
|
|
13
|
-
|
|
14
|
-
# git-copilot-commit
|
|
15
|
-
|
|
16
|
-
🤖 AI-powered Git commit assistant that automatically generates conventional commit messages using
|
|
17
|
-
GitHub Copilot.
|
|
18
|
-
|
|
19
|
-
## Features
|
|
20
|
-
|
|
21
|
-
- **AI-Generated Commit Messages**: Uses GitHub Copilot to analyze your staged changes and generate
|
|
22
|
-
conventional commit messages
|
|
23
|
-
- **Multiple AI Models**: Choose from GPT-4, Claude, Gemini, and other available models
|
|
24
|
-
- **Configurable Defaults**: Set a default model to use across all commits
|
|
25
|
-
- **Message Editing**: Edit generated messages using your git-configured editor or commit directly
|
|
26
|
-
- **Conventional Commits**: Follows the [Conventional Commits](https://www.conventionalcommits.org/)
|
|
27
|
-
specification
|
|
28
|
-
- **Rich Output**: Beautiful terminal output with syntax highlighting and tables
|
|
29
|
-
|
|
30
|
-
## Installation
|
|
31
|
-
|
|
32
|
-
Install using uv (recommended):
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
uv tool install git-copilot-commit
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Or with pip:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
pipx install git-copilot-commit
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Or without installing:
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
uvx git-copilot-commit --help
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## Prerequisites
|
|
51
|
-
|
|
52
|
-
**GitHub Copilot Access**: You need an active GitHub Copilot subscription
|
|
53
|
-
|
|
54
|
-
## Quick Start
|
|
55
|
-
|
|
56
|
-
1. **Authenticate with GitHub Copilot**:
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
git-copilot-commit authenticate
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
2. **Make some changes** in your git repository
|
|
63
|
-
|
|
64
|
-
3. **Generate and commit**:
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
git-copilot-commit commit
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
## Usage
|
|
71
|
-
|
|
72
|
-
### `commit`
|
|
73
|
-
|
|
74
|
-
Automatically commit changes in the current git repository:
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
git-copilot-commit commit
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
**Options:**
|
|
81
|
-
|
|
82
|
-
- `--all, -a`: Stage all files before committing
|
|
83
|
-
- `--verbose, -v`: Show verbose output with file details
|
|
84
|
-
- `--model, -m`: Specify which AI model to use for generating the commit message
|
|
85
|
-
|
|
86
|
-
1. The tool analyzes your changes
|
|
87
|
-
2. Prompts you to stage files (if needed)
|
|
88
|
-
3. Generates an AI-powered commit message
|
|
89
|
-
4. Offers three choices:
|
|
90
|
-
- `(c)ommit`: Commit with the generated message
|
|
91
|
-
- `(e)dit`: Edit the message in your git-configured editor
|
|
92
|
-
- `(q)uit`: Cancel the commit
|
|
93
|
-
|
|
94
|
-
### `authenticate`
|
|
95
|
-
|
|
96
|
-
Set up authentication with GitHub Copilot:
|
|
97
|
-
|
|
98
|
-
```bash
|
|
99
|
-
git-copilot-commit authenticate
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
### `models`
|
|
103
|
-
|
|
104
|
-
List available AI models:
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
git-copilot-commit models
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### `config`
|
|
111
|
-
|
|
112
|
-
Manage application configuration:
|
|
113
|
-
|
|
114
|
-
```bash
|
|
115
|
-
# Show current configuration
|
|
116
|
-
git-copilot-commit config --show
|
|
117
|
-
|
|
118
|
-
# Set a default model for all commits
|
|
119
|
-
git-copilot-commit config --set-default-model gpt-4o
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
## Examples
|
|
123
|
-
|
|
124
|
-
**Commit all changes with staging prompts:**
|
|
125
|
-
|
|
126
|
-
```bash
|
|
127
|
-
git-copilot-commit commit --all
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
**Commit with verbose output:**
|
|
131
|
-
|
|
132
|
-
```bash
|
|
133
|
-
git-copilot-commit commit --verbose
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
**Use a specific AI model:**
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
git-copilot-commit commit --model claude-3.5-sonnet
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
**Set up a default model and use it:**
|
|
143
|
-
|
|
144
|
-
```bash
|
|
145
|
-
# Set default model once
|
|
146
|
-
git-copilot-commit config --set-default-model gpt-4o
|
|
147
|
-
|
|
148
|
-
# Now all commits will use gpt-4o by default
|
|
149
|
-
git-copilot-commit commit
|
|
150
|
-
|
|
151
|
-
# Override with a different model when needed
|
|
152
|
-
git-copilot-commit commit --model claude-3.5-sonnet
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
## Generated Commit Message Format
|
|
156
|
-
|
|
157
|
-
The tool follows the [Conventional Commits](https://www.conventionalcommits.org/) specification:
|
|
158
|
-
|
|
159
|
-
```
|
|
160
|
-
<type>[optional scope]: <description>
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
**Supported Types:**
|
|
164
|
-
|
|
165
|
-
- `feat`: A new feature
|
|
166
|
-
- `fix`: A bug fix
|
|
167
|
-
- `docs`: Documentation changes
|
|
168
|
-
- `style`: Code formatting (no logic changes)
|
|
169
|
-
- `refactor`: Code restructuring (no behavior changes)
|
|
170
|
-
- `perf`: Performance improvements
|
|
171
|
-
- `test`: Adding or updating tests
|
|
172
|
-
- `chore`: Maintenance tasks (tooling, dependencies, etc.)
|
|
173
|
-
- `revert`: Reverting previous changes
|
|
174
|
-
|
|
175
|
-
**Example Messages:**
|
|
176
|
-
|
|
177
|
-
- `feat(auth): add user authentication with JWT`
|
|
178
|
-
- `fix(database): handle connection retries properly`
|
|
179
|
-
- `docs(readme): update installation instructions`
|
|
180
|
-
- `refactor(utils): simplify date parsing logic`
|
|
181
|
-
|
|
182
|
-
## Git Configuration
|
|
183
|
-
|
|
184
|
-
For the best experience with git-copilot-commit, consider adding this alias for the commit command:
|
|
185
|
-
|
|
186
|
-
```bash
|
|
187
|
-
# Add a git alias for quick access
|
|
188
|
-
git config --global alias.ai-commit "!git-copilot-commit commit"
|
|
189
|
-
|
|
190
|
-
# Now you can use:
|
|
191
|
-
git ai-commit
|
|
192
|
-
git ai-commit --model claude-3.5-sonnet
|
|
193
|
-
git ai-commit --all --verbose
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
You can also configure git to show more context in diffs, which can help when reviewing changes:
|
|
197
|
-
|
|
198
|
-
```bash
|
|
199
|
-
# Show more context in diffs
|
|
200
|
-
git config --global diff.context 3
|
|
201
|
-
```
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
# git-copilot-commit
|
|
2
|
-
|
|
3
|
-
🤖 AI-powered Git commit assistant that automatically generates conventional commit messages using
|
|
4
|
-
GitHub Copilot.
|
|
5
|
-
|
|
6
|
-
## Features
|
|
7
|
-
|
|
8
|
-
- **AI-Generated Commit Messages**: Uses GitHub Copilot to analyze your staged changes and generate
|
|
9
|
-
conventional commit messages
|
|
10
|
-
- **Multiple AI Models**: Choose from GPT-4, Claude, Gemini, and other available models
|
|
11
|
-
- **Configurable Defaults**: Set a default model to use across all commits
|
|
12
|
-
- **Message Editing**: Edit generated messages using your git-configured editor or commit directly
|
|
13
|
-
- **Conventional Commits**: Follows the [Conventional Commits](https://www.conventionalcommits.org/)
|
|
14
|
-
specification
|
|
15
|
-
- **Rich Output**: Beautiful terminal output with syntax highlighting and tables
|
|
16
|
-
|
|
17
|
-
## Installation
|
|
18
|
-
|
|
19
|
-
Install using uv (recommended):
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
uv tool install git-copilot-commit
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Or with pip:
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
pipx install git-copilot-commit
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
Or without installing:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
uvx git-copilot-commit --help
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Prerequisites
|
|
38
|
-
|
|
39
|
-
**GitHub Copilot Access**: You need an active GitHub Copilot subscription
|
|
40
|
-
|
|
41
|
-
## Quick Start
|
|
42
|
-
|
|
43
|
-
1. **Authenticate with GitHub Copilot**:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
git-copilot-commit authenticate
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
2. **Make some changes** in your git repository
|
|
50
|
-
|
|
51
|
-
3. **Generate and commit**:
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
git-copilot-commit commit
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Usage
|
|
58
|
-
|
|
59
|
-
### `commit`
|
|
60
|
-
|
|
61
|
-
Automatically commit changes in the current git repository:
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
git-copilot-commit commit
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
**Options:**
|
|
68
|
-
|
|
69
|
-
- `--all, -a`: Stage all files before committing
|
|
70
|
-
- `--verbose, -v`: Show verbose output with file details
|
|
71
|
-
- `--model, -m`: Specify which AI model to use for generating the commit message
|
|
72
|
-
|
|
73
|
-
1. The tool analyzes your changes
|
|
74
|
-
2. Prompts you to stage files (if needed)
|
|
75
|
-
3. Generates an AI-powered commit message
|
|
76
|
-
4. Offers three choices:
|
|
77
|
-
- `(c)ommit`: Commit with the generated message
|
|
78
|
-
- `(e)dit`: Edit the message in your git-configured editor
|
|
79
|
-
- `(q)uit`: Cancel the commit
|
|
80
|
-
|
|
81
|
-
### `authenticate`
|
|
82
|
-
|
|
83
|
-
Set up authentication with GitHub Copilot:
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
git-copilot-commit authenticate
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### `models`
|
|
90
|
-
|
|
91
|
-
List available AI models:
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
|
-
git-copilot-commit models
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### `config`
|
|
98
|
-
|
|
99
|
-
Manage application configuration:
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
# Show current configuration
|
|
103
|
-
git-copilot-commit config --show
|
|
104
|
-
|
|
105
|
-
# Set a default model for all commits
|
|
106
|
-
git-copilot-commit config --set-default-model gpt-4o
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
## Examples
|
|
110
|
-
|
|
111
|
-
**Commit all changes with staging prompts:**
|
|
112
|
-
|
|
113
|
-
```bash
|
|
114
|
-
git-copilot-commit commit --all
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
**Commit with verbose output:**
|
|
118
|
-
|
|
119
|
-
```bash
|
|
120
|
-
git-copilot-commit commit --verbose
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
**Use a specific AI model:**
|
|
124
|
-
|
|
125
|
-
```bash
|
|
126
|
-
git-copilot-commit commit --model claude-3.5-sonnet
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
**Set up a default model and use it:**
|
|
130
|
-
|
|
131
|
-
```bash
|
|
132
|
-
# Set default model once
|
|
133
|
-
git-copilot-commit config --set-default-model gpt-4o
|
|
134
|
-
|
|
135
|
-
# Now all commits will use gpt-4o by default
|
|
136
|
-
git-copilot-commit commit
|
|
137
|
-
|
|
138
|
-
# Override with a different model when needed
|
|
139
|
-
git-copilot-commit commit --model claude-3.5-sonnet
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
## Generated Commit Message Format
|
|
143
|
-
|
|
144
|
-
The tool follows the [Conventional Commits](https://www.conventionalcommits.org/) specification:
|
|
145
|
-
|
|
146
|
-
```
|
|
147
|
-
<type>[optional scope]: <description>
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
**Supported Types:**
|
|
151
|
-
|
|
152
|
-
- `feat`: A new feature
|
|
153
|
-
- `fix`: A bug fix
|
|
154
|
-
- `docs`: Documentation changes
|
|
155
|
-
- `style`: Code formatting (no logic changes)
|
|
156
|
-
- `refactor`: Code restructuring (no behavior changes)
|
|
157
|
-
- `perf`: Performance improvements
|
|
158
|
-
- `test`: Adding or updating tests
|
|
159
|
-
- `chore`: Maintenance tasks (tooling, dependencies, etc.)
|
|
160
|
-
- `revert`: Reverting previous changes
|
|
161
|
-
|
|
162
|
-
**Example Messages:**
|
|
163
|
-
|
|
164
|
-
- `feat(auth): add user authentication with JWT`
|
|
165
|
-
- `fix(database): handle connection retries properly`
|
|
166
|
-
- `docs(readme): update installation instructions`
|
|
167
|
-
- `refactor(utils): simplify date parsing logic`
|
|
168
|
-
|
|
169
|
-
## Git Configuration
|
|
170
|
-
|
|
171
|
-
For the best experience with git-copilot-commit, consider adding this alias for the commit command:
|
|
172
|
-
|
|
173
|
-
```bash
|
|
174
|
-
# Add a git alias for quick access
|
|
175
|
-
git config --global alias.ai-commit "!git-copilot-commit commit"
|
|
176
|
-
|
|
177
|
-
# Now you can use:
|
|
178
|
-
git ai-commit
|
|
179
|
-
git ai-commit --model claude-3.5-sonnet
|
|
180
|
-
git ai-commit --all --verbose
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
You can also configure git to show more context in diffs, which can help when reviewing changes:
|
|
184
|
-
|
|
185
|
-
```bash
|
|
186
|
-
# Show more context in diffs
|
|
187
|
-
git config --global diff.context 3
|
|
188
|
-
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|