1.2 KiB
1.2 KiB
AI Commits
AI Commits is a tool that writes your git commit messages for you. Never write a commit message again.
Installation and Usage
Install the CLI then grab your OpenAI key and add it as an environment variable.
npm install -g aicommitsexport OPENAI_KEY=sk-xxxxxxxxxxxxxxxx
Then after running a git add . command in a git repo, use this CLI by simply running aicommits to generate your commit.
How it works
This CLI tool runs a git diff command to grab all the latest changes, sends this to OpenAI's GPT-3, then returns the AI generated commit message. Video coming soon where I rebuild it from scratch to show you how to easily build your own CLI tools powered by AI.
Limitations
- Only supports git diffs of up to 200 lines of code for now
- Does not support conventional commits
The next version of the CLI, v2, will address both of these limitations!
Future tasks
- Add support for conventional commits as a flag that users can enable
- Try supporting more than 200 lines by grabbing the diff per file
- Experiment with openai curie and codex as opposed to dacinvi
- Build landing page for the 2.0 launch
