Commitomatic is a command-line tool that uses the OpenAI GPT-Codex to generate commit messages based on a git diff.
Commitomatic uses Nix to manage dependencies. You need to have Nix installed to build and run Commitomatic.
Commitomatic uses the OpenAI API to generate commit messages. You need to have an OpenAI API key to use Commitomatic. You can create one here. Note that you need to be signed up to OpenAI to use the API.
Commitomatic reads the OpenAI API key from the OPENAI_API_KEY
environment variable. You can set it in your shell configuration file.
To run Commitomatic, you need have a git repository with staged changes. You can then run Commitomatic inside of the repository's directory with the following command:
nix run github:tiborpilz/commitomatic .
Commitomatic will then generate a commit message based on the staged changes and open your editor to let you edit the commit message. After you save and close the editor, Commitomatic will commit the staged changes using the commit message.