aicommit2 1.12.6 → 1.13.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 +31 -24
- package/dist/cli.mjs +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -42,8 +42,8 @@ _aicommit2_ is a reactive CLI tool that automatically generates Git commit messa
|
|
|
42
42
|
- [Codestral **(Free till August 1, 2024)**](https://mistral.ai/news/codestral/)
|
|
43
43
|
- [Cohere](https://cohere.com/)
|
|
44
44
|
- [Groq](https://groq.com/)
|
|
45
|
-
- [Huggingface **(Unofficial)**](https://huggingface.co/chat/)
|
|
46
45
|
- [Perplexity](https://docs.perplexity.ai/)
|
|
46
|
+
- [Huggingface **(Unofficial)**](https://huggingface.co/chat/)
|
|
47
47
|
|
|
48
48
|
### Local
|
|
49
49
|
|
|
@@ -98,17 +98,17 @@ aicommit2 config set COHERE_KEY=<your key>
|
|
|
98
98
|
aicommit2 config set GROQ_KEY=<your key>
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
+
- [Perplexity](https://docs.perplexity.ai/)
|
|
102
|
+
```sh
|
|
103
|
+
aicommit2 config set PERPLEXITY_KEY=<your key>
|
|
104
|
+
```
|
|
105
|
+
|
|
101
106
|
- [Huggingface **(Unofficial)**](https://github.com/tak-bro/aicommit2?tab=readme-ov-file#how-to-get-cookieunofficial-api)
|
|
102
107
|
```shell
|
|
103
108
|
# Please be cautious of Escape characters(\", \') in browser cookie string
|
|
104
109
|
aicommit2 config set HUGGINGFACE_COOKIE="<your browser cookie>"
|
|
105
110
|
```
|
|
106
111
|
|
|
107
|
-
- [Perplexity](https://docs.perplexity.ai/)
|
|
108
|
-
```sh
|
|
109
|
-
aicommit2 config set PERPLEXITY_KEY=<your key>
|
|
110
|
-
```
|
|
111
|
-
|
|
112
112
|
This will create a `.aicommit2` file in your home directory.
|
|
113
113
|
|
|
114
114
|
> You may need to create an account and set up billing.
|
|
@@ -331,10 +331,10 @@ aicommit2 config set OPENAI_KEY=<your-api-key> generate=3 locale=en
|
|
|
331
331
|
| `COHERE_MODEL` | `command` | The identifier of the Cohere model |
|
|
332
332
|
| `GROQ_KEY` | N/A | The Groq API Key |
|
|
333
333
|
| `GROQ_MODEL` | `gemma-7b-it` | The Groq model name to use |
|
|
334
|
-
| `HUGGINGFACE_COOKIE` | N/A | The HuggingFace Cookie string |
|
|
335
|
-
| `HUGGINGFACE_MODEL` | `mistralai/Mixtral-8x7B-Instruct-v0.1` | The HuggingFace Model to use |
|
|
336
334
|
| `PERPLEXITY_KEY` | N/A | The Perplexity API key |
|
|
337
335
|
| `PERPLEXITY_MODEL` | `llama-3.1-sonar-small-128k-chat` | The Perplexity Model to use |
|
|
336
|
+
| `HUGGINGFACE_COOKIE` | N/A | The HuggingFace Cookie string |
|
|
337
|
+
| `HUGGINGFACE_MODEL` | `mistralai/Mixtral-8x7B-Instruct-v0.1` | The HuggingFace Model to use |
|
|
338
338
|
| `OLLAMA_MODEL` | N/A | The Ollama Model. It should be downloaded your local |
|
|
339
339
|
| `OLLAMA_HOST` | `http://localhost:11434` | The Ollama Host |
|
|
340
340
|
| `OLLAMA_TIMEOUT` | `100_000` ms | Request timeout for the Ollama |
|
|
@@ -677,6 +677,28 @@ Supported:
|
|
|
677
677
|
|
|
678
678
|
> The models mentioned above are subject to change.
|
|
679
679
|
|
|
680
|
+
### Perplexity
|
|
681
|
+
|
|
682
|
+
##### PERPLEXITY_KEY
|
|
683
|
+
|
|
684
|
+
The Perplexity API key. If you don't have one, please sign up and subscribe in [Perplexity](https://www.perplexity.ai/).
|
|
685
|
+
|
|
686
|
+
##### PERPLEXITY_MODEL
|
|
687
|
+
|
|
688
|
+
Default: `llama-3.1-sonar-small-128k-chat`
|
|
689
|
+
|
|
690
|
+
Supported:
|
|
691
|
+
- `llama-3.1-sonar-small-128k-chat`
|
|
692
|
+
- `llama-3.1-sonar-large-128k-chat`
|
|
693
|
+
- `llama-3.1-sonar-large-128k-online`
|
|
694
|
+
- `llama-3.1-sonar-small-128k-online`
|
|
695
|
+
- `llama-3.1-8b-instruct`
|
|
696
|
+
- `llama-3.1-70b-instruct`
|
|
697
|
+
- `llama-3.1-8b`
|
|
698
|
+
- `llama-3.1-70b`
|
|
699
|
+
|
|
700
|
+
> The models mentioned above are subject to change.
|
|
701
|
+
|
|
680
702
|
### HuggingFace Chat
|
|
681
703
|
|
|
682
704
|
##### HUGGINGFACE_COOKIE
|
|
@@ -699,22 +721,6 @@ Supported:
|
|
|
699
721
|
|
|
700
722
|
> The models mentioned above are subject to change.
|
|
701
723
|
|
|
702
|
-
##### PERPLEXITY_MODEL
|
|
703
|
-
|
|
704
|
-
Default: `llama-3.1-sonar-small-128k-chat`
|
|
705
|
-
|
|
706
|
-
Supported:
|
|
707
|
-
- `llama-3.1-sonar-small-128k-chat`
|
|
708
|
-
- `llama-3.1-sonar-large-128k-chat`
|
|
709
|
-
- `llama-3.1-sonar-large-128k-online`
|
|
710
|
-
- `llama-3.1-sonar-small-128k-online`
|
|
711
|
-
- `llama-3.1-8b-instruct`
|
|
712
|
-
- `llama-3.1-70b-instruct`
|
|
713
|
-
- `llama-3.1-8b`
|
|
714
|
-
- `llama-3.1-70b`
|
|
715
|
-
|
|
716
|
-
> The models mentioned above are subject to change.
|
|
717
|
-
|
|
718
724
|
## Upgrading
|
|
719
725
|
|
|
720
726
|
Check the installed version with:
|
|
@@ -880,6 +886,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
880
886
|
<td align="center"><a href="https://github.com/eltociear"><img src="https://avatars.githubusercontent.com/eltociear" width="100px;" alt=""/><br /><sub><b>@eltociear</b></sub></a><br /><a href="https://github.com/tak-bro/aicommit2/commits?author=eltociear" title="Documentation">📖</a></td>
|
|
881
887
|
<td align="center"><a href="https://github.com/ubranch"><img src="https://avatars.githubusercontent.com/ubranch" width="100px;" alt=""/><br /><sub><b>@ubranch</b></sub></a><br /><a href="https://github.com/tak-bro/aicommit2/commits?author=ubranch" title="Code">💻</a></td>
|
|
882
888
|
<td align="center"><a href="https://github.com/bhodrolok"><img src="https://avatars.githubusercontent.com/bhodrolok" width="100px;" alt=""/><br /><sub><b>@bhodrolok</b></sub></a><br /><a href="https://github.com/tak-bro/aicommit2/commits?author=bhodrolok" title="Code">💻</a></td>
|
|
889
|
+
<td align="center"><a href="https://github.com/ryicoh"><img src="https://avatars.githubusercontent.com/ryicoh" width="100px;" alt=""/><br /><sub><b>@ryicoh</b></sub></a><br /><a href="https://github.com/tak-bro/aicommit2/commits?author=ryicoh" title="Code">💻</a></td>
|
|
883
890
|
</tr>
|
|
884
891
|
</table>
|
|
885
892
|
<!-- markdownlint-restore -->
|
package/dist/cli.mjs
CHANGED
|
@@ -60,7 +60,7 @@ ${i.footer}`:""}`});return u.length>n?u.slice(0,n):u}catch{const u=/\[[\s\S]*?\]
|
|
|
60
60
|
|
|
61
61
|
${c.body}`:""}${c.footer?`
|
|
62
62
|
|
|
63
|
-
${c.footer}`:""}`});return p.length>n?p.slice(0,n):p}catch{return[]}}}extractMessageAsType(t,r){switch(r){case"conventional":const n=/(\w+)(?:\(.*?\))?:\s*(.*)/,o=t.subject.match(n),s=o?o[0]:t.subject;return{...t,subject:this.normalizeCommitMessage(s)};case"gitmoji":const u=/:\w*:\s*(.*)/,i=t.subject.match(u);return{...t,subject:i?i[0].toLowerCase():t.subject};default:return t}}normalizeCommitMessage(t){const r=/^(\w+)(\(.*?\))?:\s(.*)$/,n=t.match(r);if(n){const[,o,s,u]=n,i=o.toLowerCase(),a=u.charAt(0).toLowerCase()+u.slice(1);t=`${i}${s||""}: ${a}`}return t}}var qr="1.
|
|
63
|
+
${c.footer}`:""}`});return p.length>n?p.slice(0,n):p}catch{return[]}}}extractMessageAsType(t,r){switch(r){case"conventional":const n=/(\w+)(?:\(.*?\))?:\s*(.*)/,o=t.subject.match(n),s=o?o[0]:t.subject;return{...t,subject:this.normalizeCommitMessage(s)};case"gitmoji":const u=/:\w*:\s*(.*)/,i=t.subject.match(u);return{...t,subject:i?i[0].toLowerCase():t.subject};default:return t}}normalizeCommitMessage(t){const r=/^(\w+)(\(.*?\))?:\s(.*)$/,n=t.match(r);if(n){const[,o,s,u]=n,i=o.toLowerCase(),a=u.charAt(0).toLowerCase()+u.slice(1);t=`${i}${s||""}: ${a}`}return t}}var qr="1.13.0",Oi="A Reactive CLI that generates git commit messages with various AI";class F extends Error{}const ht=" ",pe=e=>{e instanceof Error&&(e instanceof F||(e.stack&&console.error(g.dim(e.stack.split(`
|
|
64
64
|
`).slice(1).join(`
|
|
65
65
|
`))),console.error(`
|
|
66
66
|
${ht}${g.dim(`aicommit2 v${qr}`)}`),console.error(`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aicommit2",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "A Reactive CLI that generates git commit messages with various AI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
"chatgpt",
|
|
33
33
|
"cohere",
|
|
34
34
|
"groq",
|
|
35
|
-
"codestral"
|
|
35
|
+
"codestral",
|
|
36
|
+
"perplexity"
|
|
36
37
|
],
|
|
37
38
|
"license": "MIT",
|
|
38
39
|
"repository": "tak-bro/aicommit2",
|