| Crates.io | simple-aicommits |
| lib.rs | simple-aicommits |
| version | 0.2.1 |
| created_at | 2025-03-08 01:58:10.528617+00 |
| updated_at | 2025-03-21 13:45:36.447221+00 |
| description | A simple CLI tool that generates commit messages from git diffs using Claude AI, OpenAI, or Gemini |
| homepage | |
| repository | https://github.com/katsuhirohonda/simple-aicommits |
| max_upload_size | |
| id | 1583943 |
| size | 90,304 |
A simple CLI tool that generates commit messages from git diffs using Claude AI, OpenAI, or Gemini.
# Clone the repository
git clone https://github.com/katsuhirohonda/simple-aicommits.git
cd simple-aicommits
# Build and install
cargo install --path .
First, ensure you have staged your changes with git add.
# Set your API keys
export ANTHROPIC_API_KEY="your-anthropic-api-key"
export OPENAI_API_KEY="your-openai-api-key"
export GEMINI_API_KEY="your-gemini-api-key"
# Optionally set the models to use
export ANTHROPIC_MODEL="claude-3-5-haiku-20241022"
export OPENAI_MODEL="gpt-4o-mini"
export GEMINI_MODEL="gemini-1.5-flash"
# Generate a commit message using Claude (default)
aicommits
# Generate a commit message using OpenAI
aicommits --provider openai
# Generate a commit message using Gemini
aicommits --provider gemini
# Generate a commit message with a specific model
aicommits --provider openai --model gpt-4o
# Generate a commit message and automatically commit
aicommits --commit
-c, --commit: Automatically commit changes with the generated message-p, --provider: AI provider to use (claude, openai, gemini)-m, --model: AI model to use (overrides the default for the provider)-h, --help: Print help information-V, --version: Print version informationaicommits:
ANTHROPIC_API_KEY: Required for Claude. Your Anthropic API key.ANTHROPIC_MODEL: Optional. The Claude model to use (defaults to "claude-3-5-haiku-20241022").OPENAI_API_KEY: Required for OpenAI. Your OpenAI API key.OPENAI_MODEL: Optional. The OpenAI model to use (defaults to "gpt-4o-mini").GEMINI_API_KEY: Required for Gemini. Your Gemini API key.GEMINI_MODEL: Optional. The Gemini model to use (defaults to "gemini-1.5-flash").MIT