# commit-pilot

> Apply commit message suggestions from ChatGPT

Latest version **1.0.1-rc1** (published 2023-05-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install commit-pilot
pnpm add commit-pilot
yarn add commit-pilot
bun add commit-pilot
```

Provides the command `commit-pilot`.

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1-rc1 |
| Published | 2023-05-24 |
| First published | 2023-05-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 7 |
| Unpacked size | 13.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | firelessone |

## Links

- npm: https://www.npmjs.com/package/commit-pilot
- npm.io page: https://npm.io/package/commit-pilot

## Dependencies (7)

- [ora](https://npm.io/package/ora.md) ^6.3.1
- [chalk](https://npm.io/package/chalk.md) ^5.2.0
- [dotenv](https://npm.io/package/dotenv.md) ^16.0.3
- [chatgpt](https://npm.io/package/chatgpt.md) ^5.2.4
- [prompts](https://npm.io/package/prompts.md) ^2.4.2
- [simple-git](https://npm.io/package/simple-git.md) ^3.18.0
- [openai-token](https://npm.io/package/openai-token.md) ^1.0.0

## Recent versions

- 1.0.1-rc1 (latest) — 2023-05-24
- 1.0.0-rc1 — 2023-05-23

## README

# 🤖💬 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-pilot
```

## Usage

After installing, set up a custom script in `package.json` to run `commit-pilot` before commiting:

```json
{
    ...
    "scripts": {
        "commit": "npx commit-pilot"
    },
    ...
}
```

and then before commiting, run:

```bash
npm run commit
```

Or simply set it up in a pre-commit hook workflow with `husky` in the `pre-commit` file:

```bash
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx commit-pilot --skip-commit
```

Be 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

---
_Source: https://npm.io/package/commit-pilot · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
