Crates.io | simple-aicommits |
lib.rs | simple-aicommits |
version | |
source | src |
created_at | 2025-03-08 01:58:10.528617+00 |
updated_at | 2025-03-08 03:32:12.74333+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 |
Cargo.toml error: | TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
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