diff --git a/README.md b/README.md index edd3a54..106ecee 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,16 @@ aicommits --generate # or -g > Warning: this uses more tokens, meaning it costs more. +#### Generating Conventional Commits + +If you'd like to generate [Conventional Commits](https://conventionalcommits.org/), you can use the `--type` flag followed by `conventional`. This will prompt `aicommits` to format the commit message according to the Conventional Commits specification: + +```sh +aicommits --type conventional # or -t conventional +``` + +This feature can be useful if your project follows the Conventional Commits standard or if you're using tools that rely on this commit format. + ### Git hook 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. @@ -203,6 +213,22 @@ Default: `50` aicommits config set max-length=100 ``` +#### type + +Default: `""` (Empty string) + +The type of commit message to generate. Set this to "conventional" to generate commit messages that follow the Conventional Commits specification: + +```sh +aicommits config set type=conventional +``` + +You can clear this option by setting it to an empty string: + +```sh +aicommits config set type= +``` + ## How it works This CLI tool runs `git diff` to grab all your latest code changes, sends them to OpenAI's GPT-3, then returns the AI generated commit message.