claye
v1.0.2
Published
A CLI tool to commit your changes with AI
Maintainers
Readme
CLAYE
A powerful CLI tool that generates intelligent, contextual commit messages using Anthropic's Claude AI models. Save time and improve your commit message quality by letting AI analyze your code changes and generate meaningful commit messages.
Features
- 🤖 AI-Powered: Uses Anthropic's Claude models to generate intelligent commit messages
- 📝 Multiple Formats: Generates structured commit messages with changes, reasoning, and summary
- 🔧 Configurable: Supports multiple Claude models (Haiku, Sonnet, Opus)
- 🛡️ Safe: Warns about sensitive files being committed
- 💬 Interactive: Lets you review and approve commit messages before applying
- ⚡ Fast: Quick setup and execution
Installation
From NPM (Recommended)
npm install -g clayeFrom Source
git clone https://github.com/frbarbre/claye.git
cd claye
npm install
npm run build
npm linkSetup
1. Get Your Anthropic API Key
- Visit Anthropic Console
- Create a new API key
- Copy the key (starts with
sk-ant-api03-...)
2. Configure the CLI Tool
claye config set ANTHROPIC_API_KEY=sk-ant-api03-your-key-hereThe API key will be securely stored in ~/.config/claye/.env.
3. Verify Configuration
claye config getUsage
Basic Commit Workflow
Stage your changes:
git add .Generate and commit:
claye commitReview the generated message and choose whether to commit.
Advanced Usage
Custom Prompt
Provide additional context for the commit message:
claye commit "Focus on the implementation of auth"Different AI Models
Use a specific Claude model:
claye commit --model claude-3-5-sonnet-latestAvailable models:
claude-3-5-haiku-latest(default - fastest)claude-3-5-sonnet-latest(balanced)claude-3-7-sonnet-20250219(advanced)claude-4-sonnet-20250514(most capable)claude-4-opus-20250514(most powerful)
Commands
claye config
Manage your Anthropic API key configuration.
Set API Key
claye config set ANTHROPIC_API_KEY=your-key-hereGet Current API Key
claye config getRemove API Key
autocommit config unsetautocommit commit
Generate and apply AI-powered commit messages.
Basic Usage
claye commit [prompt] [--model <model-name>]Options
[prompt]- Optional context or instruction for the commit message--model- Choose which Claude model to use (default: claude-3-5-haiku-latest)
Examples
# Basic commit
claye commit
# With custom context
claye commit "Fix critical bug in payment processing"
# Using a specific model
claye commit --model claude-3-5-sonnet-latest
# Combining both
claye commit "Add user dashboard" --model claude-4-sonnet-20250514