Skip to content

This package creates commit messages using GPT. It uses the `GPT 3.5 turbo` model, OpenAI's API.

License

Notifications You must be signed in to change notification settings

juhyeonni/commit-message-generator

Repository files navigation

commit-message-generator

en ko

This is a package that generates commit messages using OpenAI's GPT models.
The default GPT model is set to gpt-3.5-turbo.

Installation

commit-message-generator on npmjs

The package can be installed using npm or yarn.

  • yarn
yarn global add commit-message-generator
  • npm
npm install -g commit-message-generator

🤔 Usage

⭐️ Registering the API KEY (required)

Use the setkey command to register the openai api key.

cmg setkey

Generate commit messages by listing the work details

  1. Write the details of the changes you want to commit using the generate command.
cmg generate <request message>

or

cmg g <request message>
  1. Review the output.
cmg generate "initialize the project"

# output
🎉 init: Initialize the project

Automatically generate commit messages based on the changes in specified files/directories

  1. Use the diff command to specify the file/directory.
cmg diff <filePath>

or

cmg d <filePath>
  1. Review the output.
cmg diff src/components/TestComponent

# output
feat: add console log for testing

add_testcode

🛠️ Configuration

Setting Commit Rules

Use the config command to set commit rules. This command opens the config file which can be freely modified by the user.

cmg config
  • format: Defines the format of the output commit message.
  • commitTypes: Defines the types of commits.
  • localRules: Allows setting limits on commit messages.
  • gpt_model: Sets the GPT Model.

Setting the GPT Model (not implemented yet!)

Use the setmodel command to set the AI model you want to use.

cmg setmodel

About

This package creates commit messages using GPT. It uses the `GPT 3.5 turbo` model, OpenAI's API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published