Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (opencommit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
All the commits in this repo are done with OpenCommit — look into the commits 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.
Install opencommit globally to use in any repository:
npm install -g opencommit
Get your API key from OpenAI
Set the key to opencommit config:
opencommit config set OPENAI_API_KEY=<your_api_key>
Your api key is stored locally in
~/.opencommitconfig file.
Usage
You can call opencommit directly to generate a commit message for your staged changes:
git add <files...>
opencommitYou can also use the oc shortcut:
git add <files...>
ocFeatures
Preface commits with emoji 🤠
GitMoji convention is used.
To add emoji:
oc config set emoji=trueTo remove emoji:
oc config set emoji=falsePostface commits with descriptions of changes
To add descriptions:
oc config set description=trueTo remove description:
oc config set description=falseGit hook
You can set opencommit as Git prepare-commit-msg hook. Hook integrates with you IDE Source Control and allows you edit the message before commit.
To set the hook:
oc hook setTo unset the hook:
oc hook unsetTo use the hook:
git add <files...>
git commitOr follow the process of your IDE Source Control feature, when it calls git commit command — OpenCommit will integrate into the flow.
Payments
You pay for your own requests to OpenAI API. OpenCommit uses ChatGPT official model, that is ~10x times cheaper than GPT-3.