Patch
AI pair programming in your terminal
Patch lets you pair program with LLMs to start a new project or build on an existing codebase.
Features
Cloud and local LLMs
Patch connects to cloud and local LLMs, giving you the flexibility to use the models that work best for you.
Maps your codebase
Patch maps your entire codebase, which helps it work well in larger projects.
100+ code languages
Patch works with Python, JavaScript, TypeScript, Rust, Ruby, Go, C++, PHP, HTML, CSS, and dozens more.
Git integration
Patch automatically commits changes with sensible commit messages. Use familiar Git tools to diff, manage, and undo AI changes.
Use in your IDE
Use Patch from within your favorite IDE or editor. Ask for changes by adding comments to your code and Patch will get to work.
Images & web pages
Add images and web pages to the chat to provide visual context, screenshots, reference docs, etc.
Voice-to-code
Speak with Patch about your code. Request new features, test cases, or bug fixes using your voice and let Patch implement the changes.
Linting & testing
Automatically lint and test your code every time Patch makes changes. Patch can fix problems detected by your linters and test suites.
Copy/paste to web chat
Work with any LLM via its web chat interface. Patch streamlines copying code context and edits between your terminal and browser.
Getting Started
Install Patch from source and run the patch command:
git clone https://github.com/PierrunoYT/patch.git
cd patch
python -m pip install -e .
# Start Patch in your codebase
cd /to/your/project
patch
Security Boundaries
Patch treats both model output and the repository under edit as untrusted input.
Writes stay inside the repository. Every model-supplied path is resolved canonically and
must land inside the repository root before anything is created or modified. Absolute paths,
.. traversal, and symlinks pointing outside the tree are refused, including under --no-git
and --yes, and including the patch format's Move to: target. Files added with
--read are exempt: they are supplied by you, not the model, and are never written to.
The repository's own config is not trusted. A .patch.conf.yml or .env discovered inside
the repository cannot set execution-capable options (test, test-cmd, lint-cmd, load,
notifications-command, editor, verify-ssl, git-commit-verify) or environment variables
that redirect API endpoints or proxies (*_API_BASE, *_BASE_URL, HTTP(S)_PROXY,
REQUESTS_CA_BUNDLE, ...). Ignored settings are reported at startup. Your home-directory
config and any file you pass explicitly with --config / --env-file are trusted as usual.
Pass --trust-repo-config to opt back in for a repository you trust. You can also set
PATCH_TRUST_REPO_CONFIG in your shell. The setting is ignored when it comes from the repository's
own config or .env, so a repository cannot grant itself trust.
Development
See CONTRIBUTING.md for local development instructions. Amp orbs use the
repository's executable .agents/setup script to provision the complete
development and optional-feature toolchain automatically on fresh remote machines.
More Information
Documentation
- Installation and quick start
- Security boundaries
- Development guide
- Run
patch --helpfor all command-line and configuration options - Report a problem or request a feature
Community & Resources
Release files for patch-chat 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_chat-0.1.0.tar.gz | 1.2 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| patch_chat-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.5 MB
Release files / patch_chat-0.1.0.tar.gz
| Download URL | patch_chat-0.1.0.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
26772a09f55258a909fcd9c0fbbc1c8a94c42a14a688add158aba188e9b23a71
|
|
BLAKE2b-256 checksum How to use checksums |
2d35929de7f222fd39e53437ae01cecea886a9719c549d9f97b43da112e2c0bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / patch_chat-0.1.0-py3-none-any.whl
| Download URL | patch_chat-0.1.0-py3-none-any.whl |
|---|---|
| Size | 247.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bad23d8bce14916a23bf64133c3e1643c0345954413c1150955eef954a57627c
|
|
BLAKE2b-256 checksum How to use checksums |
c8aa21856c86ed2f61b8f7c9aebb6180643b8ac987ff90f64120cbbb168ddb5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|