JSPM

gpt-auto-commit

1.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q69718F
  • License MIT

A cute little CLI tool to generate commit messages

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 (gpt-auto-commit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    GPT Auto Commit

    GPT Auto Commit Screenshot

    A cute little CLI tool that uses openai/gpt-5-mini to ✨automatically✨ generate commit messages.

    Features

    • One command, instant commit messages
    • Edit a message in interactive mode
    • Only checks staged changes
    • Follows Conventional Commits to make you look good
    • Clean, colorful CLI for smooth workflow
    • Progress bars so you're never left hanging

    Installation

    npm install -g gpt-auto-commit

    API Key & Pricing

    This tool requires an OpenAI API key to function. Here's what you need to know:

    Also just a heads up that this does cost money:

    Setup

    Before using the tool, you gotta configure your OpenAI API key:

    gpt-auto-commit config --key YOUR_OPENAI_API_KEY
    # or use the shorthand
    gpc config --key YOUR_OPENAI_API_KEY

    Model Configuration

    You can also configure which OpenAI model to use. The default is gpt-4o-mini (cheapest option), but you can change it:

    # Set a different model
    gpc config --model gpt-4o
    gpc config --model gpt-3.5-turbo
    
    # Set both API key and model at once
    gpc config --key YOUR_API_KEY --model gpt-4o
    
    # View current configuration
    gpc config

    Available models:

    A list of models can be found here.

    Usage

    Run gpc in your git repository to automatically generate and commit your changes:

    gpc

    This will:

    1. Analyze your staged changes
    2. Generate a commit message
    3. Automatically commit with the generated message

    Interactive Mode

    If you want to review or edit the commit message before committing:

    gpc generate

    This will:

    1. Generate a commit message
    2. Give you options to:
      • Press c to commit as is
      • Press e to edit the message
      • Press q to quit without committing

    Commands

    All commands can be used with either gpt-auto-commit or the shorthand gpc:

    • gpc - Quick generate and commit (default)
    • gpc generate - Interactive mode with edit options
    • gpc config --key <key> - Set your OpenAI API key
    • gpc config --model <model> - Set your OpenAI model
    • gpc config - View current configuration
    • gpc --help - Show help information