1.0.1-rc1 • Published 2 years ago
commit-pilot v1.0.1-rc1
🤖💬 commit-pilot
This package uses ChatGPT to generate commit messages based on your changes. It provides a convenient way to generate commit messages for your development workflow, if you can't think of a good commit message to put in.
npm install --save-dev commit-pilotUsage
After installing, set up a custom script in package.json to run commit-pilot before commiting:
{
...
"scripts": {
"commit": "npx commit-pilot"
},
...
}and then before commiting, run:
npm run commitOr simply set it up in a pre-commit hook workflow with husky in the pre-commit file:
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npx commit-pilot --skip-commitBe sure to pass in --skip-commit, otherwise commit-pilot will attempt to commit the message by itself instead of passing it to git
Next features
- Add option to include gitignore to ignore changes from certain files
- Generate commit messages for even larger changes, currently ChatGPT limits word count for large charges