# QuiCommit A powerful AI-powered Git assistant for generating conventional commits, tags, and changelogs. Manage multiple Git profiles for different work contexts seamlessly. ![Rust](https://img.shields.io/badge/rust-%23000000.svg?style=for-the-badge&logo=rust&logoColor=white) ![License](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg) ## Features - 🤖 **AI-Powered Generation**: Generate commit messages, tag annotations, and changelog entries using LLM APIs (OpenAI, Anthropic) or local Ollama models - 📝 **Conventional Commits**: Full support for Conventional Commits and @commitlint formats - 👤 **Profile Management**: Save and switch between multiple Git profiles (user info, SSH keys, GPG signing) - 🏷️ **Smart Tagging**: Semantic version bumping with auto-generated release notes - 📜 **Changelog Generation**: Automatic changelog generation in Keep a Changelog or GitHub Releases format - 🔐 **Security**: Encrypt sensitive data like SSH passphrases and API keys - 🎨 **Interactive UI**: Beautiful CLI with interactive prompts and previews ## Installation ### From Source ```bash git clone https://github.com/yourusername/quicommit.git cd quicommit cargo build --release ``` The binary will be available at `target/release/quicommit`. ### Prerequisites - Rust 1.70 or later - Git 2.0 or later - For AI features: Ollama (local) or API keys for OpenAI/Anthropic ## Quick Start ### 1. Initialize Configuration ```bash quicommit init ``` This will guide you through setting up your first profile and LLM configuration. ### 2. Generate a Commit ```bash # AI-generated commit (default) quicommit commit # Manual commit quicommit commit --manual -t feat -m "add new feature" # Date-based commit quicommit commit --date # Stage all and commit quicommit commit -a ``` ### 3. Create a Tag ```bash # Auto-detect version bump from commits quicommit tag # Bump specific version quicommit tag --bump minor # Custom tag name quicommit tag -n v1.0.0 ``` ### 4. Generate Changelog ```bash # Generate for unreleased changes quicommit changelog # Generate for specific version quicommit changelog -v 1.0.0 # Initialize new changelog quicommit changelog --init ``` ## Configuration ### Profiles Manage multiple Git identities for different contexts: ```bash # Add a new profile quicommit profile add # List profiles quicommit profile list # Switch profile quicommit profile switch # Apply profile to current repo quicommit profile apply # Set profile for current repo quicommit profile set-repo personal ``` ### LLM Providers #### Ollama (Local - Recommended) ```bash # Configure Ollama quicommit config set-llm ollama # Or with specific settings quicommit config set-ollama --url http://localhost:11434 --model llama2 ``` #### OpenAI ```bash quicommit config set-llm openai quicommit config set-openai-key YOUR_API_KEY ``` #### Anthropic Claude ```bash quicommit config set-llm anthropic quicommit config set-anthropic-key YOUR_API_KEY ``` ### Commit Format ```bash # Use conventional commits (default) quicommit config set-commit-format conventional # Use commitlint format quicommit config set-commit-format commitlint ``` ## Usage Examples ### Interactive Commit Flow ```bash $ quicommit commit Staged files (3): • src/main.rs • src/lib.rs • Cargo.toml 🤖 AI is analyzing your changes... ──────────────────────────────────────────────────────────── Generated commit message: ──────────────────────────────────────────────────────────── feat: add user authentication module Implement OAuth2 authentication with support for GitHub and Google providers. ──────────────────────────────────────────────────────────── What would you like to do? > ✓ Accept and commit 🔄 Regenerate ✏️ Edit ❌ Cancel ``` ### Profile Management ```bash # Create work profile $ quicommit profile add Profile name: work Git user name: John Doe Git user email: john@company.com Is this a work profile? yes Organization: Acme Corp # Set for current repository $ quicommit profile set-repo work ✓ Set 'work' for current repository ``` ### Smart Tagging ```bash $ quicommit tag Latest version: v0.1.0 Version selection: > Auto-detect bump from commits Bump major version Bump minor version Bump patch version 🤖 AI is generating tag message from 15 commits... Tag preview: Name: v0.2.0 Message: ## What's Changed ### 🚀 Features - Add user authentication - Implement dashboard ### 🐛 Bug Fixes - Fix login redirect issue Create this tag? yes ✓ Created tag v0.2.0 ``` ## Configuration File Configuration is stored at: - **Linux**: `~/.config/quicommit/config.toml` - **macOS**: `~/Library/Application Support/quicommit/config.toml` - **Windows**: `%APPDATA%\quicommit\config.toml` Example configuration: ```toml version = "1" default_profile = "personal" [profiles.personal] name = "personal" user_name = "John Doe" user_email = "john@example.com" [profiles.work] name = "work" user_name = "John Doe" user_email = "john@company.com" is_work = true organization = "Acme Corp" [llm] provider = "ollama" max_tokens = 500 temperature = 0.7 [llm.ollama] url = "http://localhost:11434" model = "llama2" [commit] format = "conventional" auto_generate = true max_subject_length = 100 [tag] version_prefix = "v" auto_generate = true include_changelog = true [changelog] path = "CHANGELOG.md" auto_generate = true group_by_type = true ``` ## Environment Variables | Variable | Description | |----------|-------------| | `QUICOMMIT_CONFIG` | Path to configuration file | | `EDITOR` | Default editor for interactive input | | `NO_COLOR` | Disable colored output | ## Shell Completions ### Bash ```bash quicommit completions bash > /etc/bash_completion.d/quicommit ``` ### Zsh ```bash quicommit completions zsh > /usr/local/share/zsh/site-functions/_quicommit ``` ### Fish ```bash quicommit completions fish > ~/.config/fish/completions/quicommit.fish ``` ## Troubleshooting ### LLM Connection Issues ```bash # Test LLM connection quicommit config test-llm # List available models quicommit config list-models ``` ### Git Operations ```bash # Check current profile quicommit profile show # Apply profile to fix git config quicommit profile apply ``` ## Contributing Contributions are welcome! Please feel free to submit a Pull Request. 1. Fork the repository 2. Create your feature branch (`git checkout -b feature/amazing-feature`) 3. Commit your changes (`git commit -m 'feat: add amazing feature'`) 4. Push to the branch (`git push origin feature/amazing-feature`) 5. Open a Pull Request ## License This project is licensed under the MIT OR Apache-2.0 license. ## Acknowledgments - [Conventional Commits](https://www.conventionalcommits.org/) specification - [Keep a Changelog](https://keepachangelog.com/) format - [Ollama](https://ollama.ai/) for local LLM support