AI-powered git commit and PR creation tool
Project description
AI CLI 🤖
AI-powered Git commits and Pull Requests, done right.
AI CLI is a command-line tool that uses Google Gemini to generate high-quality commit messages and Pull Requests based on your actual code changes — automatically, consistently, and following best practices.
Spend less time writing commits and PRs. Spend more time coding.
✨ What AI CLI does
- 🤖 Generate Conventional Commit messages from real diffs
- 📋 Create Pull Requests automatically, including:
- What changed
- Why it changed
- How to test
- 🚀 Optional auto-push after commit
- 📁 Smart commit-all, grouping changes by context
- 🔗 Branch-based PR creation
- 🎯 Strict Conventional Commits compliance
- ⚙️ Fully configurable prompts per project or globally
- 🧪 Type-safe, tested, production-ready
🚀 Quick Start (2 minutes)
Requirements
- Python 3.13+
- Git
- Google Gemini API key
- GitHub CLI (
gh) (optional, for PR creation)
Install
git clone <repository-url>
cd ai-cli
uv sync
uv tool install .
Configure
Get your API key at: https://makersuite.google.com/app/apikey
Then configure your environment (example):
export GEMINI_API_KEY="your_api_key_here"
Common usage
# AI-powered commit (with push)
ai-cli smart-commit
# Commit without pushing
ai-cli smart-commit --no-push
# Commit and create a PR
ai-cli smart-commit --pr
# Commit all changes grouped by context
ai-cli smart-commit-all
# Create PR from current branch
ai-cli create-pr
# Create PR against another base
ai-cli create-pr --base develop
🧠 How Pull Requests are generated
AI CLI analyzes:
- all commits in the branch
- all changed files (including additions/removals)
- diff stats and curated patches
- configuration and public interface changes
It then generates a PR with a stable structure:
- What was done
- Why it was done
- How to test
- Risk & impact (when applicable)
This avoids shallow or misleading PR descriptions.
🎨 Customizing AI Prompts
All AI behavior is customizable via prompts.json.
Lookup order:
./prompts.json(project-level)~/.config/ai-cli/prompts.json(global)- Built-in defaults
Example:
{
"commit_message": {
"description": "Commit message prompt",
"prompt": "Generate a Conventional Commit message..."
},
"pull_request": {
"description": "PR prompt",
"prompt": "Generate a PR title and body..."
}
}
You can:
- Change language
- Enforce stricter formats
- Customize PR structure
- Adapt prompts per repository
⚙️ Configuration
Environment variables:
GEMINI_API_KEY— Gemini API key (required)GEMINI_MODEL— Model to use (default:gemini-2.5-flash)MAX_DIFF_SIZE— Max diff size sent to AI (default:10000)DEFAULT_BRANCH— Default git base branch (default:main)DEBUG— Debug mode (default:false)
🏗️ Architecture (for contributors)
AI CLI follows a clean, layered architecture:
src/ai_cli/
├── core/ # Domain models, interfaces, exceptions
├── services/ # Business logic
├── infrastructure/ # Git, AI, GitHub integrations
├── cli/ # Command-line interface
└── config/ # Configuration management
The design emphasizes:
- separation of concerns
- testability
- deterministic AI inputs
- safe fallbacks when AI is unavailable
🔧 Development
# Install dev dependencies
uv sync --group dev
# Format & lint
uv run ruff format src tests
uv run ruff check src tests
# Type checking
mypy src
# Run tests
pytest
🔄 Workflow
- Analyze git changes
- Generate commit or PR with AI
- Show preview
- User approves
- Commit / Push / PR
AI is always assistive, never destructive.
🤝 Contributing
Contributions are welcome!
- Fork the repo
- Create a feature branch
- Make changes
- Run tests
- Commit with Conventional Commits
- Open a PR
📄 License
MIT License — see LICENSE.
Made with ❤️ by Parcky.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file parcky_cli-2026.6.0a4.tar.gz.
File metadata
- Download URL: parcky_cli-2026.6.0a4.tar.gz
- Upload date:
- Size: 102.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
062e8eb70653159f5587675cd441726bcc1faff9fa813b761be0e2732d078914
|
|
| MD5 |
e60bb972cc809e67048776afb54e5762
|
|
| BLAKE2b-256 |
182e41d0f5aa8cb47e0c9c36f14b26fdc4aec339c0cc64540874f9ce00f23f95
|
File details
Details for the file parcky_cli-2026.6.0a4-py3-none-any.whl.
File metadata
- Download URL: parcky_cli-2026.6.0a4-py3-none-any.whl
- Upload date:
- Size: 66.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71d0df26a1eb7d96b44a219d9ffd8cecfdc0813f67912f51a54f4099741170f2
|
|
| MD5 |
79ce2dca766cfe3d1ce0b374d0e19e71
|
|
| BLAKE2b-256 |
2fa3b86c4851563119f015e8dc29e9caa8daa43a8294ca26a2d6f8cef85045db
|