The smart way to write your commit messages using Conventional Commits.
npm install -g gsmart
After installing the package, you can use the gsmart
command to write your commit messages.
First you need to provide your API key for any of the supported AI services. You can use the gsmart login
command to do this.
gsmart login
? Select a provider > suse arrow keys to navigate
❯ OpenAI
Anthropic
After selecting a provider, you will be prompted to enter your API key.
? Enter your API key:
To generate a commit message, you need to be in a git repository and have some changes to commit.
Add the changes to the staging area using the git add
command. Then you can use the gsmart
command to write your commit message.
gsmart
If can add different providers. If you want to use a specific provider, you can use the --provider
option.
gsmart --provider anthropic
You can also specify the prompt to use for the AI model, using the --prompt
option.
gsmart --prompt "Explaining the changes in the staging area"
Usage: gsmart [options] [command]
CLI to generate smart commit messages using AI. generate command is the default command.
Options:
-V, --version output the version number
-h, --help display help for command
Commands:
generate Generate a commit message based on the changes in the staging area
login Login to a provider to use their AI service
reset Reset the API key for all providers and remove the configuration file
help [command] Display help for command
- OpenAI
- Model: GPT-3
- Get API Key
- Anthropic
- Model: Claude
- Get API Key
- Mistral
- Model: Mistral Large
- Get API Key
- Fireworks AI
- Model: FireFunction V1
- Get API Key
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.