Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Marc-R2/ai-commits-intellij-plugin

 
 

Repository files navigation

CommitGPT

CommitGPT for IntelliJ based IDEs/Android Studio.

Build Status


Description

CommitGPT is a plugin that generates your commit messages with ChatGPT. To get started, install the plugin and set OpenAI private token in plugin's settings: Settings > Tools > CommitGPT

Features

  • Generate commit message from diff using OpenAI ChatGPT API
  • Compute diff only from the selected files and lines in the commit dialog
  • Create your own prompt for commit message generation
  • Choose your own base prompt
  • Include a hint in the prompt for the AI to generate a better commit message.

Hint the AI

You can provide a hint for the AI to generate a better commit message by writing a sentence in the commit dialog starting with a !.

This hint will be included in the prompt for the AI.

Note: Your custom prompt have to include {hint} at some point in order for the hint to be included. By default, this is the case.

Custom prompt

You can choose your own base prompt for the AI to generate the commit message from in the settings.

Your custom prompt have to include {diffs}, otherwise the AI will not be able to generate a commit message based on your changes. The prompt can also include {hint} to include a hint in the prompt for the AI to generate a better commit message.

Note: The custom prompt will not be saved in the settings if it does not include {diffs}. {hint} is optional.

Compatibility

IntelliJ IDEA, PhpStorm, WebStorm, PyCharm, RubyMine, AppCode, CLion, GoLand, DataGrip, Rider, MPS, Android Studio, DataSpell, Code With Me

Install

Or you could install it inside your IDE:

  • For Windows & Linux: File > Settings > Plugins > Marketplace > Search for "CommitGPT" > Install Plugin > Restart IntelliJ IDEA

  • For Mac: IntelliJ IDEA > Preferences > Plugins > Marketplace > Search for "CommitGPT" > Install Plugin > Restart IntelliJ IDEA

Remember to set your OpenAI private token in plugin's settings: Settings > Tools > CommitGPT

Installation from zip

  1. Download zip from releases
  2. Import to IntelliJ: Settings > Plugins > Cog > Install plugin from disk...
  3. Set OpenAI private token in plugin's settings: Settings > Tools > CommitGPT

Support

Change log

Please see CHANGELOG for more information what has changed recently. This may not be complete, so please check the commit history as well.

Contributing

We welcome contributions of all kinds.

If you find a bug, have a question or a feature request, please file an issue.

If you'd like to contribute code, fork the repository, make your changes and feel free to submit a pull request. Please see CONTRIBUTING for details.

Acknowledgements

License

Please see LICENSE for details.