# commit_ai_nodejs

> A CLI tool to generate git commit messages using OpenAI's GPT-4.

Latest version **1.0.2** (published 2023-03-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install commit_ai_nodejs
pnpm add commit_ai_nodejs
yarn add commit_ai_nodejs
bun add commit_ai_nodejs
```

Provides the command `commitai`.

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2023-03-20 |
| First published | 2023-03-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 12.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | tommyle |
| Keywords | git, commit, message, gpt-4, openai, cli |

## Links

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

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^1.3.4
- [argparse](https://npm.io/package/argparse.md) ^2.0.1

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2023-03-20
- 1.0.1 — 2023-03-20
- 1.0.0 — 2023-03-20

## README

# Commit AI

A command-line application built with Node.js that generates git commit messages using OpenAI's GPT-3 model. This app runs git diff in the current working directory, sends the output to the GPT-3 model, and presents multiple commit message suggestions. The user can then choose a message, and the app will commit the changes using the selected message.

## Prerequisites

- Node.js (latest version): https://nodejs.org/en/download/
- A valid OpenAI API key: https://beta.openai.com/signup/

## Installation

1. Clone the repository:

```bash
git clone https://github.com/tommyle/commit_ai_nodejs.git
```

2. Change to the cloned directory:

```bash
cd commit_ai_nodejs
```

3. Install dependencies:

```bash
npm install
```

## Usage

1. Set your OpenAI API key:

```bash
npm run build-and-run --set_api_key
```

   You'll be prompted to enter your API key, which will be saved to a local file for future use.

2. Run the app to generate a commit message and commit the changes:

```bash
npm run start app.js
```

   The app will display multiple commit message suggestions based on the `git diff` output. Choose a message and the app will commit the changes using the selected message.

### Optional arguments

- `--help` or `-h`: Display help information.

```bash
npm run start app.js --help
```

- `--show_diff` or `-d`: Show the git diff output.

```bash
npm run start app.js --show_diff
```

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

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