JSPM

commit-ai-cli

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q27223F
  • 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

CLI Git Message AI

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:

npx cligitmessageai

Or install it globally:

npm install -g cligitmessageai

Configuration

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

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

To remove a configured API key:

cligitmessageai ai --remove openai

Usage

Generate a commit message

In a git repository with changes:

cligitmessageai 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

cligitmessageai 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

ISC