8000 GitHub - yuankui/auto-commit
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

yuankui/auto-commit

Repository files navigation

Auto Commit

A TypeScript tool that helps generate commit messages using ChatGPT API.

Features

  • Automatically detects changes in your git repository
  • Uses OpenAI's GPT model to suggest commit messages based on your changes
  • Interactive CLI to choose from suggested commit messages
  • Automatically commits changes with the selected message

Setup

  1. Install the package:
npm install -g @yuankui/auto-commit
  1. Run the tool:
auto-commit

On first run, you'll be prompted to enter your OpenAI API key. The key will be saved in ~/.auto-commit.env for future use.

Development Setup

  1. Install dependencies:
npm install
  1. Copy .env.example to .env and add your OpenAI API key:
cp .env.example .env

Then edit .env and add your OpenAI API key:

OPENAI_API_KEY=your_api_key_here

Usage

When you have changes you want to commit, simply run:

npm run dev

The tool will:

  1. Check for changes in your repository
  2. Generate commit message suggestions using ChatGPT
  3. Let you choose from the suggested messages
  4. Automatically commit your changes with the selected message

Development

  • Build the project:
npm run build
  • Format code:
npm run format
  • Check code formatting:
npm run format:check

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0