| Crates.io | commitcraft |
| lib.rs | commitcraft |
| version | 1.1.0 |
| created_at | 2025-06-08 09:34:32.771542+00 |
| updated_at | 2025-06-09 07:59:23.678513+00 |
| description | A fast, intelligent CLI tool that generates conventional commit messages using AI |
| homepage | https://github.com/san0808/commitcraft |
| repository | https://github.com/san0808/commitcraft |
| max_upload_size | |
| id | 1704740 |
| size | 252,686 |
A fast, intelligent CLI tool that generates conventional commit messages using AI. Built in Rust for performance and reliability.
๐ What's New in v1.1.0: Updated to the latest AI models for 75% faster responses and 75% cost savings! Now featuring GPT-4.1 Nano and Claude 3.5 Haiku as defaults.
curl -sSL https://raw.githubusercontent.com/san0808/commitcraft/main/install.sh | bash
cargo install commitcraft
Download the latest binary from GitHub Releases
git clone https://github.com/san0808/commitcraft
cd commitcraft
cargo build --release
sudo cp target/release/commitcraft /usr/local/bin/commitcraft
# Run interactive setup
commitcraft setup
# Check your configuration
commitcraft config
# List available providers and models
commitcraft list
# Stage your changes
git add .
# Generate and edit commit command interactively
commitcraft
โ Message generated successfully!
๐ Generated commit message:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
feat(auth): add OAuth2 login support
Implement OAuth2 authentication flow with Google and GitHub providers.
Includes token refresh logic and secure storage.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Edit the command below (or press Enter to execute):
$ git commit -m "feat(auth): add OAuth2 login support"โ
# โ You can edit this command or just press Enter to execute
# Skip interactive editing, commit immediately
commitcraft -y
# Just show the git command (no execution)
commitcraft --show-command
# Dry run (generate message without committing)
commitcraft --dry-run
# Use legacy confirmation flow
commitcraft --legacy
# Use specific provider and model
commitcraft --provider openai --model gpt-4o
# Use model alias
commitcraft --model smart
# Include verbose output and file context
commitcraft --verbose --include-files
# Review in editor before committing
commitcraft --review
# Combine options
commitcraft --provider anthropic --model fast --verbose --yes
Configuration is stored at ~/.config/commitcraft/config.toml:
default_provider = "gemini"
[api_keys]
openai = "sk-..."
gemini = "your-api-key"
anthropic = "your-api-key"
[models]
openai = "gpt-4.1-nano" # Latest: 75% faster & cheaper
gemini = "gemini-1.5-flash-latest" # Unchanged: Already optimal
anthropic = "claude-3-5-haiku-20241022" # Latest: Superior performance
[aliases]
fast = "gemini-1.5-flash-latest"
smart = "gpt-4o"
This tool generates commit messages following the Conventional Commits specification:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
feat: New featuresfix: Bug fixesdocs: Documentation changesstyle: Code formattingrefactor: Code restructuringtest: Adding testschore: Maintenance tasksperf: Performance improvementsci: CI/CD changesbuild: Build system changesfeat(auth): add OAuth2 login support
Implement OAuth2 authentication flow with Google and GitHub providers.
Includes token refresh logic and secure storage.
feat!: remove deprecated API endpoints
BREAKING CHANGE: The v1 API endpoints have been removed. Use v2 instead.
src/
โโโ main.rs # Main application entry point
โโโ cli.rs # Command-line interface definitions
โโโ config.rs # Configuration management
โโโ git.rs # Git operations (diff, commit, repo info)
โโโ providers/ # AI provider implementations
โโโ mod.rs # Common traits and structures
โโโ openai.rs # OpenAI GPT integration
โโโ gemini.rs # Google Gemini integration
โโโ anthropic.rs # Anthropic Claude integration
Experience CommitCraft's power through our professional demo videos:
Perfect for social media and quick showcases:
./demo/quick-demo.sh
Complete feature walkthrough for presentations:
./demo/cinematic-demo.sh
Automatic Features:
See demo/README.md for complete documentation.
cargo build --release
cargo test
Setup Flow
cargo run -- setup
Basic Generation
git add some-file.rs
cargo run -- --dry-run
Provider Testing
cargo run -- --provider openai --dry-run
cargo run -- --provider gemini --dry-run
cargo run -- --provider anthropic --dry-run
Advanced Features
cargo run -- --verbose --include-files --dry-run
cargo run -- config
cargo run -- list
"Not inside a git repository"
git init if needed"No staged files to commit"
git add . or git add <file>"API key not found"
commitcraft setup to configure API keyscommitcraft configBuild errors
rustup update to update your toolchainMIT License - see LICENSE file for details.