Patch
AI pair programming in your terminal.
Work with your codebase. Make changes with an LLM. Review them with Git.
Quick start · Documentation · Changelog · Report an issue
Patch is a command-line coding assistant that helps you build features, fix bugs, and navigate existing projects using cloud or local language models. It maps your repository for context, edits files directly, and integrates with your Git workflow.
Features
- Choose your model. Connect to cloud providers or local models.
- Work across your codebase. Use a repository map to give the model context beyond individual files.
- Review changes with Git. Inspect diffs, create commits, and undo AI-generated changes.
- Iterate with checks. Run linters and tests, then ask Patch to address failures.
- Bring more context. Add images, web pages, and voice input to your coding conversations.
- Use your existing tools. Work in the terminal alongside your editor, or try the experimental browser UI.
Quick start
Requires Python 3.10–3.14. Install the patch-code package in a virtual environment:
python -m venv .venv
# macOS / Linux
source .venv/bin/activate
# Windows PowerShell
# .venv\Scripts\Activate.ps1
python -m pip install patch-code
Open your project and start a conversation:
cd /path/to/your/project
python -m patch --model sonnet --api-key anthropic=YOUR_API_KEY
The patch command is also available when your virtual environment is active.
Use python -m patch to avoid ambiguity with the standard Unix patch utility.
Run python -m patch --help for all options. See the
model configuration guide for other providers.
Install from source
To work with the current checkout instead of a published PyPI release:
git clone https://github.com/PierrunoYT/patch.git
cd patch
# Activate a virtual environment first, as shown above.
python -m pip install -e .
python -m patch --help
Configuration
| Component | Name |
|---|---|
| PyPI package | patch-code |
| Python module | patch |
| Terminal command | patch or python -m patch |
| Configuration file | .patch.conf.yml |
| State and history files | .patch* |
| Application environment variables | PATCH_* |
Provider credentials keep their provider-specific names, such as ANTHROPIC_API_KEY
and OPENAI_API_KEY. Keep credentials out of version control.
Moving from Aider
Patch does not automatically read or migrate Aider configuration. Rename and review
your .aider* configuration files as .patch*, and update application environment
variables from AIDER_* to PATCH_* before using them with Patch.
Documentation
- Installation and optional extras
- Usage guide
- Model configuration
- Configuration options
- Git integration
- Troubleshooting
- Analytics
- Patch changelog
- Contributing
These Markdown docs are packaged with Patch for /help <question>.
Patch does not maintain a separate documentation website.
Logos
- Wide PATCH wordmark — 2048 × 686, lettering only.
- Square P icon — 2048 × 2048.
Both SVGs use mint on charcoal and scale without requiring fonts.
The root assets/ folder contains the logos.
License and attribution
Patch is a fork of Aider, developed in PierrunoYT/patch. This repository is licensed under Apache 2.0.
The inherited release history and retained benchmark data are upstream material, not claims about Patch. Historical documentation links point to upstream Aider's GitHub sources. The inherited website, articles, and recordings are no longer bundled with Patch.
Release files for patch-code 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| patch_code-0.1.0.tar.gz | 214.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| patch_code-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 465.7 kB
Release files / patch_code-0.1.0.tar.gz
| Download URL | patch_code-0.1.0.tar.gz |
|---|---|
| Size | 214.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
688413c35610088df958b196332825a67d5d1ca4fc2e3f5397e81df62894239c
|
|
BLAKE2b-256 checksum How to use checksums |
449d04f5d3b7cc77309f35f142936414197acd67c0d4da6dd496fb95a15fc756
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.21
|
Release files / patch_code-0.1.0-py3-none-any.whl
| Download URL | patch_code-0.1.0-py3-none-any.whl |
|---|---|
| Size | 251.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
baba39804776843c26d796f60d9dbca0f31aa4f9a4b2caa369d65372592909e5
|
|
BLAKE2b-256 checksum How to use checksums |
dc781a04be4591e06515a72e17570e52d4371dac5dab3f1a13051571832289f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.21
|