aicommits 1.2.0 → 1.3.0
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.
- package/README.md +63 -5
- package/dist/cli.mjs +68 -80
- package/package.json +13 -5
package/README.md
CHANGED
|
@@ -32,9 +32,68 @@
|
|
|
32
32
|
|
|
33
33
|
This will create a `.aicommits` file in your home directory.
|
|
34
34
|
|
|
35
|
-
4. Start committing!
|
|
36
35
|
|
|
37
|
-
|
|
36
|
+
### Upgrading
|
|
37
|
+
|
|
38
|
+
Check the installed version with:
|
|
39
|
+
```
|
|
40
|
+
aicommits --version
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
If it's not the [latest version](https://github.com/Nutlope/aicommits/releases/latest), run:
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
npm update -g aicommits
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Usage
|
|
50
|
+
### CLI mode
|
|
51
|
+
|
|
52
|
+
You can call `aicommits` directly to generate a commit message for your staged changes:
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
git add <files...>
|
|
56
|
+
aicommits
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
`aicommits` passes down unknown flags to `git commit`, so you can pass in [`commit` flags](https://git-scm.com/docs/git-commit) (with some exceptions (e.g. `--all`):
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
aicommits --dry-run
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Git hook
|
|
66
|
+
|
|
67
|
+
You can also integrate _aicommits_ with Git via the [`prepare-commit-msg`](https://git-scm.com/docs/githooks#_prepare_commit_msg) hook. This lets you use Git like you normally would, and edit the commit message before committing.
|
|
68
|
+
|
|
69
|
+
#### Install
|
|
70
|
+
|
|
71
|
+
In the Git repository you want to install the hook in:
|
|
72
|
+
```sh
|
|
73
|
+
aicommits hook install
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
#### Uninstall
|
|
77
|
+
In the Git repository you want to uninstall the hook from:
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
aicommits hook uninstall
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
#### Usage
|
|
84
|
+
|
|
85
|
+
1. Stage your files and commit:
|
|
86
|
+
```sh
|
|
87
|
+
git add <files...>
|
|
88
|
+
git commit # Only generates a message when it's not passed in
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
> If you ever want to write your own message instead of generating one, you can simply pass one in: `git commit -m "My message"`
|
|
92
|
+
|
|
93
|
+
2. Aicommits will generate the commit message for you and pass it back to Git. Git will open it with the [configured editor](https://docs.github.com/en/get-started/getting-started-with-git/associating-text-editors-with-git) for you to review/edit it.
|
|
94
|
+
|
|
95
|
+
3. Save and close the editor to commit!
|
|
96
|
+
|
|
38
97
|
|
|
39
98
|
## How it works
|
|
40
99
|
|
|
@@ -45,14 +104,13 @@ Video coming soon where I rebuild it from scratch to show you how to easily buil
|
|
|
45
104
|
## Future tasks
|
|
46
105
|
|
|
47
106
|
- Add support for conventional commits as a flag that users can enable
|
|
107
|
+
- Migrate to chatGPT instead of GPT-3
|
|
48
108
|
- Add support for diffs greater than 200 lines by grabbing the diff per file, optional flag
|
|
49
109
|
- Add ability to specify a commit message from inside aicommit if user doesn't like generated one
|
|
50
|
-
- Solve latency issue (use a githook to asynchronously run gpt3 call on every git add, store the result in a temp file or in the .git folder). Put behind a flag
|
|
51
|
-
- Use gpt-3-tokenizer instead of hard limit on characters as a more accurate model
|
|
52
110
|
- Play around with prompt to produce optimal result
|
|
111
|
+
- Add an alias called `aic` that does "git add . && aicommits && git push"
|
|
53
112
|
- Add opt-in emoji flag to preface commits with an emoji, use [this](https://gitmoji.dev) as a guide
|
|
54
113
|
- Add opt-in languages flag where it returns the commit in different languages
|
|
55
|
-
- Add automated github releases using [this action](https://github.com/manovotny/github-releases-for-automated-package-publishing-action)
|
|
56
114
|
- Build landing page for the 2.0 launch
|
|
57
115
|
|
|
58
116
|
## Maintainers
|