Patchforge
This repo now ships an installable CLI that wraps:
llama-serverfor a local OpenAI-compatible endpointaider-chatfor file editing against that local model
The binary name is patchforge.
Install
Install the package into a tool environment:
uv tool install .
Or into a project virtualenv:
python3 -m venv .venv
./.venv/bin/pip install -e .
aider-chat is installed as a package dependency. Then bootstrap the native side:
patchforge install
patchforge install chooses the best local installation path it can find:
- Reuse an existing
llama-serverif one is already onPATH - Otherwise, on macOS, prefer Homebrew and install
llama.cpp - After that, prefetch the default GGUF models into the llama.cpp cache
Usage
Start the local model server in the background:
patchforge start
Check whether it is up:
patchforge status
Run Aider against that endpoint:
patchforge aider --yes-always --message "Create hello.txt with a short greeting."
You can also let the CLI ensure the server is running first:
patchforge aider --ensure-server --yes-always --message "Create hello.txt with a short greeting."
Stop the managed background server:
patchforge stop
Inspect the local /v1/models endpoint:
patchforge models
Defaults
- Host:
127.0.0.1 - Port:
8091 - Model alias:
gemma-local - Default models: cached
gemma-2-9b-itfirst, then cachedgemma-4-E4B-it - Runtime state:
.patchforge/under the current project
Overrides
These environment variables are supported:
LLAMA_HOST=127.0.0.1
LLAMA_PORT=8095
LLAMA_MODEL_ALIAS=my-local-model
LLAMA_MODEL_PATH=/absolute/path/to/model.gguf
LLAMA_CTX_SIZE=8192
LLAMA_PARALLEL=1
OPENAI_API_KEY=sk-local
You can also pass the same values as CLI flags such as --port, --model-alias, and --model-path.
If you want to force the Homebrew path explicitly:
patchforge install --installer brew --force-install
Metadata
Release files for patchforge 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 | |
|---|---|---|---|
| patchforge-0.1.0.tar.gz | 11.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| patchforge-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.3 kB
Release files / patchforge-0.1.0.tar.gz
| Download URL | patchforge-0.1.0.tar.gz |
|---|---|
| Size | 11.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
748efc281c11697ebab7b524e089419c21af9d6173f1329f51eb2c69667e9094
|
|
BLAKE2b-256 checksum How to use checksums |
fd173512af0cc198e61498d6d3fb92206e7aadee0a0046eecf11219bd21b9a4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / patchforge-0.1.0-py3-none-any.whl
| Download URL | patchforge-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aab9f2f9d324a10756e90dbd913c16a66713e5fe6d611aed2e46241878c813c2
|
|
BLAKE2b-256 checksum How to use checksums |
0f5cf5394a055c53cc8ec72152ff65ca525862a9c28bd9ade9bdd78fa29a1af9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|