@negoziator/ai-commit v1.2.31
Table of Contents
Setup
A minimum of Node v20 is required. Check your Node.js version with
node --version
.
Installation
Install AI-Commit:
npm install -g @negoziator/ai-commit
Retrieve your API key from OpenAI
Note: This requires an OpenAI account. If you don't have one, you can sign up for a free trial.
Set the key so aicommit can use it:
aicommit config set OPENAI_KEY=<your token>
This will create a
.aicommit
file in your home directory.
Upgrading
npm update -g @negoziator/ai-commit
Usage
CLI Mode
Use aicommit
directly to generate a commit message for your staged changes:
git add <files...>
aicommit
Configuration
Manage configuration using the aicommit config
command.
To get a configuration option value, use the command:
aicommit config get <key>
For example, to retrieve the API key, you can use:
aicommit config get OPENAI_KEY
> sk_1234567890
To set a configuration option, use the command:
aicommit config set <key>=<value>
Options
Option | Default | Description |
---|---|---|
OPENAI_KEY | N/A | The OpenAI API key. |
locale | en | Locale for the generated commit messages. |
generate | 1 | Number of commit messages to generate. |
model | gpt-3.5-turbo | The Chat Completions model to use. |
timeout | 10000 ms | Network request timeout to the OpenAI API. |
max-length | 50 | Maximum character length of the generated commit message. |
type | "" | Type of commit message to generate. |
auto-confirm | false | Automatically confirm the generated commit message without user prompt. |
prepend-reference | false | Prepend issue reference from branch name to commit message. |
temperature | 0.2 | The temperature (0.0-2.0) is used to control the randomness of the output from OpenAI |
Maintainers
- Lars Schou:
Contributing
If you want to help fix a bug or implement a feature in Issues, checkout the Contribution Guide to learn how to setup and test the project.
4 days ago
7 days ago
14 days ago
15 days ago
16 days ago
16 days ago
16 days ago
16 days ago
16 days ago
2 months ago
3 months ago
3 months ago
3 months ago
5 months ago
6 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago