Metadata-Version: 2.4
Name: patch-code
Version: 0.2.0
Summary: Patch is AI pair programming in your terminal
Project-URL: Homepage, https://github.com/PierrunoYT/patch
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development
Requires-Python: <3.15,>=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: audioop-lts>=0.2.2; python_version >= "3.13"
Requires-Dist: backoff>=2.2.1
Requires-Dist: beautifulsoup4>=4.14.3
Requires-Dist: configargparse>=1.7.5
Requires-Dist: diff-match-patch>=20241021
Requires-Dist: diskcache>=5.6.3
Requires-Dist: fastapi>=0.135.1
Requires-Dist: flake8>=7.3.0
Requires-Dist: GitPython>=3.1.46
Requires-Dist: grep_ast>=0.9.0
Requires-Dist: importlib_resources>=6.5.2
Requires-Dist: json5>=0.13.0
Requires-Dist: jsonschema>=4.26.0
Requires-Dist: litellm<1.98,>=1.97.0
Requires-Dist: networkx<3.5,>=3.4.2
Requires-Dist: numpy<2,>=1.26.4; python_version < "3.11"
Requires-Dist: numpy<2.5,>=2.3; python_version >= "3.11"
Requires-Dist: orjson>=3.11.7
Requires-Dist: oslex>=0.1.3
Requires-Dist: packaging>=26.0
Requires-Dist: pathspec>=1.0.4
Requires-Dist: pexpect>=4.9.0
Requires-Dist: pillow>=12.1.1
Requires-Dist: posthog>=7.9.12
Requires-Dist: prompt_toolkit>=3.0.52
Requires-Dist: psutil>=7.2.2
Requires-Dist: pydub>=0.25.1
Requires-Dist: pypandoc>=1.17
Requires-Dist: pyperclip>=1.11.0
Requires-Dist: PyYAML>=6.0.3
Requires-Dist: rich>=14.3.3
Requires-Dist: scipy<1.16,>=1.13.1; python_version < "3.11"
Requires-Dist: scipy<1.18,>=1.16.1; python_version >= "3.11"
Requires-Dist: shtab>=1.8.0
Requires-Dist: socksio>=1.0.0
Requires-Dist: sounddevice>=0.5.5
Requires-Dist: soundfile>=0.13.1
Requires-Dist: tree-sitter>=0.25.2
Requires-Dist: watchfiles>=1.1.1
Provides-Extra: dev
Requires-Dist: codespell>=2.4.1; extra == "dev"
Requires-Dist: contourpy>=1.3.2; python_version < "3.11" and extra == "dev"
Requires-Dist: contourpy>=1.3.3; python_version >= "3.11" and extra == "dev"
Requires-Dist: imgcat>=0.6.0; extra == "dev"
Requires-Dist: lox>=0.13.1; extra == "dev"
Requires-Dist: matplotlib>=3.10.8; extra == "dev"
Requires-Dist: pandas>=2.3.3; extra == "dev"
Requires-Dist: pip-tools>=7.5.1; extra == "dev"
Requires-Dist: pre-commit>=4.4.0; extra == "dev"
Requires-Dist: pytest>=9.0.2; extra == "dev"
Requires-Dist: pytest-cov>=7.0.0; extra == "dev"
Requires-Dist: pytest-env>=1.2.0; extra == "dev"
Requires-Dist: typer>=0.21.1; extra == "dev"
Requires-Dist: uv>=0.9.9; extra == "dev"
Provides-Extra: help
Requires-Dist: llama-index-embeddings-huggingface>=0.6.1; extra == "help"
Requires-Dist: scikit-learn>=1.7.2; extra == "help"
Requires-Dist: torch>=2.3.0; extra == "help"
Provides-Extra: browser
Requires-Dist: streamlit>=1.54.0; extra == "browser"
Provides-Extra: playwright
Requires-Dist: playwright>=1.57.0; extra == "playwright"
Dynamic: license-file

<p align="center">
  <img src="assets/logo.svg" alt="PATCH wordmark" width="300">
</p>

<h1 align="center">Patch</h1>

<p align="center">
  <strong>AI pair programming in your terminal.</strong><br>
  Work with your codebase. Make changes with an LLM. Review them with Git.
</p>

<p align="center">
  <a href="#quick-start">Quick start</a> ·
  <a href="#documentation">Documentation</a> ·
  <a href="CHANGELOG.md">Changelog</a> ·
  <a href="https://github.com/PierrunoYT/patch/issues">Report an issue</a>
</p>

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:

```bash
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:

```bash
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](patch/docs/models.md) for other providers.

### Install from source

To work with the current checkout instead of a published PyPI release:

```bash
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](patch/docs/config.md#repository-configuration-is-untrusted).

### 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](patch/docs/install.md)
- [Usage guide](patch/docs/usage.md)
- [Model configuration](patch/docs/models.md)
- [Configuration options](patch/docs/config.md)
- [Git integration](patch/docs/git.md)
- [Troubleshooting](patch/docs/troubleshooting.md)
- [Analytics](patch/docs/analytics.md)
- [Patch changelog](CHANGELOG.md)
- [Contributing](CONTRIBUTING.md)

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

## Logos

- [Wide PATCH wordmark](assets/logo.svg) — 2048 × 686, lettering only.
- [Square P icon](assets/logo-icon.svg) — 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](https://github.com/Aider-AI/aider), developed in
[PierrunoYT/patch](https://github.com/PierrunoYT/patch). This repository is licensed
under [Apache 2.0](LICENSE.txt).

The [inherited release history](HISTORY.md) and retained [benchmark data](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.
