/CommitGenius

analyze the changes in your repository and generate a summary comment

Primary LanguageTypeScriptMIT LicenseMIT

CommitGenius

Powered by GPT-4, CommitGenius analyzes the changes in your repository and generates a summary in either a funny or professional tone, as per your preference.

CommitGenius.mp4

Installation

npm install -g commitgenius

Usage

✍️ simple command

To generate the git comments for the current repo, run the command :

commitgenius

🖨️ output example :

feat(cli): Add mood option for generating funny or professional commit messages

- Update settings.json for vscode
- Modify explanations on Installation and Command line usage in README.md
- Add mood option in index.ts and Args.d.ts for mood choice between pro and funny
- Update instructions in the PromptGenerator.ts based on the mood provided

✍️ mood-based command

You can also choose the mood of the comments by passing the --mood flag (funny or pro), by default pro is used :

commitgenius --mood funny

🖨️ output example :

feat(cli): ✨ Add mood-based commit messages 🎭🚀

Introducing mood-based commit messages! Choose between funny or professional
commit messages with a simple option flag.

- Updated .vscode/settings.json to include new words for spell checker
- Modified `README.md` to properly describe the usage of commitgenius
- Enhanced `PromptGenerator.ts` to create messages according to the mood flag
- Added mood option in `index.ts` for CLI usage
- Updated `Args.d.ts` to include the mood property for better typing

Now, prepare yourself for some hilarious git commits or keep it classy with
pure professionalism! The choice is yours. Enjoy! 😄

✍️ repo-based command

To generate the git comments for another repo, run the command :

commitgenius --repo "user/projects/repo-name/"

OpenAI - environment variable

To run this tool, you need to set your OpenAI key in your environment variables.

You can get a new one here : https://platform.openai.com/account/api-keys

api-key

macOS and Linux

export OPENAI_API_KEY="<your_api_key>"

Windows

setx OPENAI_API_KEY "<your_api_key>"