Comparing version
{ | ||
"name": "aicommits", | ||
"version": "1.5.1", | ||
"version": "1.6.0", | ||
"description": "Writes your git commit messages for you with AI", | ||
@@ -22,4 +22,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@dqbd/tiktoken": "^0.4.0" | ||
"@dqbd/tiktoken": "^1.0.2" | ||
} | ||
} |
@@ -67,2 +67,11 @@ <div align="center"> | ||
#### Generate multiple recommendations | ||
Sometimes the recommended commit message isn't the best so you want it to generate a few to pick from. You can generate multiple commit messages at once by passing in the `--generate` flag: | ||
```sh | ||
aicommits --generate # or -g | ||
``` | ||
> Warning: this uses more tokens, meaning it costs more. | ||
### Git hook | ||
@@ -100,3 +109,72 @@ | ||
## Configuration | ||
### Reading a configuration value | ||
To retrieve a configuration option, use the command: | ||
```sh | ||
aicommits config get <key> | ||
``` | ||
For example, to retrieve the API key, you can use: | ||
```sh | ||
aicommits config get OPENAI_KEY | ||
``` | ||
You can also retrieve multiple configuration options at once by separating them with spaces: | ||
```sh | ||
aicommits config get OPENAI_KEY generate | ||
``` | ||
### Setting a configuration value | ||
To set a configuration option, use the command: | ||
```sh | ||
aicommits config set <key>=<value> | ||
``` | ||
For example, to set the API key, you can use: | ||
```sh | ||
aicommits config set OPENAI_KEY=<your-api-key> | ||
``` | ||
You can also set multiple configuration options at once by separating them with spaces, like | ||
```sh | ||
aicommits config set OPENAI_KEY=<your-api-key> generate=3 locale=en | ||
``` | ||
### Options | ||
#### OPENAI_KEY | ||
Required | ||
The OpenAI API key. You can retrieve it from [OpenAI API Keys page](https://platform.openai.com/account/api-keys). | ||
#### locale | ||
Default: `en` | ||
The locale to use for the generated commit messages. Consult the list of codes in: https://wikipedia.org/wiki/List_of_ISO_639-1_codes. | ||
#### generate | ||
Default: `1` | ||
The number of commit messages to generate to pick from. | ||
Note, this will use more tokens as it generates more results. | ||
#### proxy | ||
Set a HTTP/HTTPS proxy to use for requests. | ||
To clear the proxy option, you can use the command (note the empty value after the equals sign): | ||
```sh | ||
aicommits config set proxy= | ||
``` | ||
## How it works | ||
@@ -108,14 +186,2 @@ | ||
## Future tasks | ||
- Add support for conventional commits as a flag that users can enable | ||
- Migrate to chatGPT instead of GPT-3 | ||
- Add support for diffs greater than 200 lines by grabbing the diff per file, optional flag | ||
- Add ability to specify a commit message from inside aicommit if user doesn't like generated one | ||
- Play around with prompt to produce optimal result | ||
- Add an alias called `aic` that does "git add . && aicommits && git push" | ||
- Add opt-in emoji flag to preface commits with an emoji, use [this](https://gitmoji.dev) as a guide | ||
- Add opt-in languages flag where it returns the commit in different languages | ||
- Build landing page for the 2.0 launch | ||
## Maintainers | ||
@@ -131,2 +197,2 @@ | ||
If you want to help fix a bug or implement a feature in [Issues](https://github.com/Nutlope/aicommits/issues), checkout the [Contribution Guide](CONTRIBUTING.md) to learn how to setup and test the project. | ||
If you want to help fix a bug or implement a feature in [Issues](https://github.com/Nutlope/aicommits/issues), checkout the [Contribution Guide](CONTRIBUTING.md) to learn how to setup and test the project. |
Sorry, the diff of this file is not supported yet
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
104429
21.28%427
20.28%195
52.34%22
22.22%4
100%+ Added
- Removed
Updated