JSPM

@mr_kaakyire/autogit

1.0.2
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • 0
    • Score
      100M100P100Q32024F
    • License MIT

    CLI tool to generate Git commit messages using Gemini API

    Package Exports

    • @mr_kaakyire/autogit
    • @mr_kaakyire/autogit/index.js

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

    Readme

    autogit

    Generate smart Git commit messages using the Gemini API (now using the gemini-2.0-flash model).

    Features

    • Reads your staged Git diff
    • Sends it to Gemini (Google AI) for a commit message (using the gemini-2.0-flash model)
    • Outputs a Markdown bullet list
    • Optional: Auto-commit with generated message
    • Shows a loading spinner during message generation
    • Displays a success message when commit message is generated
    • Displays a failure message if generation fails

    Installation

    1. Clone this repo
    2. Install dependencies:
      npm install
    3. Set up your API key:
      • Copy .env.example to .env
      • Add your Gemini API key to .env

    Usage

    Stage your changes with git add as usual, then run:

    npx autogit

    Or, to auto-commit with the generated message:

    npx autogit --commit

    You can also install globally:

    npm install -g .

    Then use:

    autogit [--commit]

    Environment Variables

    • GEMINI_API_KEY — Your Gemini API key (see .env.example)

    Dependencies

    • ora — for the loading spinner

    Notes

    • Only staged changes are used (like git commit)
    • Handles API and Git errors gracefully
    • Requires Node.js 16+

    MIT License