OpenCommit logo

OpenCommit

Author @di-sukharev

AI generates conventional commits with mind-blowing accuracy

Current version
--- ## Examples Look into [the commits](https://github.com/di-sukharev/opencommit/commit/4795a695800686c42e7c72fca7569103d21cd510) to see how OpenCommit works. Emoji and long commit description text is configurable. ## Setup > The minimum supported version of Node.js is the latest v14. Check your Node.js version with `node --version`. 1. Install opencommit globally to use in any repository: ```sh npm install -g opencommit ``` 2. Get your API key from [OpenAI](https://platform.openai.com/account/api-keys) 3. Set the key to opencommit config: ```sh opencommit config set OPENAI_API_KEY= ``` Your token isn't sent to anyone, it's saved in `~/.opencommit` config file. ## Usage You can call `opencommit` directly to generate a commit message for your staged changes: ```sh git add opencommit ``` You can also use the `oc` shortcut: ```sh git add oc ``` ## Features ### Preface commits with emoji 🤠 [GitMoji](https://gitmoji.dev/) convention is used. To add emoji: ```sh opencommit config set emoji=true ``` To remove emoji: ```sh opencommit config set emoji=false ``` ### Postface commits with descriptions of changes 🤠 To add descriptions: ```sh opencommit config set description=true ``` To remove description: ```sh opencommit config set description=false ``` ## Payments You pay for your own requests to OpenAI API. OpenCommit uses ChatGPT official model, that is ~10x times cheaper than GPT-3.