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 commandOr install it globally:
npm install -g commit-ai-cliAfter global installation, you can use any of these commands:
aigaiccommit-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 openaiUsage
Generate a commit message
In a git repository with changes:
aig generateThis will:
- Analyze your git changes
- Generate a commit message
- Ask for confirmation
- Commit the changes if confirmed
Generate and commit without confirmation
aig generate -yCommands
generate: Generates a commit message based on your changesai: 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