Skip to main content

PATCH wordmark

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.

A cloned repository writes its own .patch.conf.yml and .env, so Patch ignores the settings in them that run commands, carry credentials, steer API traffic, or write outside the repository. Startup messages, file grants (read/file), and startup edit/test/commit actions also require trusted configuration. Use your own configuration for those, or --trust-repo-config for a repository you have reviewed. See configuration options.

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

These Markdown docs are packaged with Patch for /help <question>. Patch does not maintain a separate documentation website.

Logos

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.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for patch-code 0.2.0
File Size Uploaded
patch_code-0.2.0.tar.gz 217.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for patch-code 0.2.0
File Interpreter ABI Platform
patch_code-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 477.1 kB

Release files / patch_code-0.2.0.tar.gz

Download URL patch_code-0.2.0.tar.gz
Size 217.8 kB
Tags Source
SHA-256 checksum
How to use checksums
567b77573752fcb081d3e144310cf63c814d42fc19cbbc94a3a9734c112c4dde
BLAKE2b-256 checksum
How to use checksums
83e54e483e59c3d589e1f60bbd96b91c0a4002567585a8e367acea633d383df2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.6

Release files / patch_code-0.2.0-py3-none-any.whl

Download URL patch_code-0.2.0-py3-none-any.whl
Size 259.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8ccf715555de4df57b3ea59cafb75e6d79c2841bf55c47e0568ea9798ca8750
BLAKE2b-256 checksum
How to use checksums
b78617dded0d5533713785cdad8be1764f3b7b138d6f2be60c66a75e342a92eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.6

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page