JSPM

commit-ai-cli

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

A CLI tool for generating commit messages using AI

Package Exports

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

Readme

Commit AI CLI

A command-line tool that uses AI to generate meaningful git commit messages by analyzing your changes.

Features

  • Analyzes staged and unstaged git changes
  • Generates commit messages using OpenAI's GPT-4
  • Follows conventional commit format
  • Allows manual editing of generated messages
  • Secure API key storage

Installation

You can run this tool directly using npx with any of these commands:

npx aig         # Short alias (AI Git)
npx aic         # Short alias (AI Commit)
npx commit-ai   # Standard command

Or install it globally:

npm install -g commit-ai-cli

After global installation, you can use any of these commands:

  • aig
  • aic
  • commit-ai

Configuration

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

aig ai --openai "your-api-key-here"

To remove a configured API key:

aig ai --remove openai

Usage

Generate a commit message

In a git repository with changes:

aig generate

This will:

  1. Analyze your git changes
  2. Generate a commit message
  3. Ask for confirmation
  4. Commit the changes if confirmed

Generate and commit without confirmation

aig generate -y

Commands

  • generate: Generates a commit message based on your changes
  • ai: Configure AI provider settings
  • --help: Shows help information
  • --version: Shows version information

Options

Generate Command

  • -y, --yes: Skip confirmation and commit directly

AI Command

  • --openai <key>: Set OpenAI API key
  • --remove <provider>: Remove API key for specified provider

Security

API keys are stored securely in your system's standard configuration location using configstore.

License

MIT