Ferir
Ferir runs coding agents on real codebases: clone any git repository (public or private), execute Pi headless in Docker, and return a unified diff - so you can review, apply, or open a PR from automated tasks.
Prerequisites
- Python 3.11+.
- Docker.
- Git.
- LLM Provider.
Install
uv add ferir
Usage
import ferir
result = ferir.run(
ferir.RunRequest(
work_dir="/tmp/basement",
id="550e8400-e29b-41d4-a716-446655440000",
repo_url="https://github.com/Clivern/Diffsay.git",
prompt="Add Gemfile.lock to LOW_PRIORITY_FILES",
pi_model="openrouter/anthropic/claude-sonnet-4.5",
proxy_url="http://host.docker.internal:8080/api",
docker_image="clivern/ferir:v0.1.0",
container=ferir.Container(
memory="2g",
cpus="1",
init_script=".ferir/init.sh",
init_bash="apt-get update && apt-get install -y jq",
),
cleanup=True,
),
timeout=90 * 60,
)
# result.patch, result.summary, result.total_tokens, result.changed_files, result.repo_dir, result.out_dir
Private repositories
HTTPS:
git_clone_auth=ferir.GitCloneAuth(token=os.environ["GITHUB_TOKEN"]),
repo_url="https://github.com/org/private.git",
SSH:
git_clone_auth=ferir.GitCloneAuth(
ssh_private_key_path=os.path.expanduser("~/.ssh/id_ed25519"),
),
repo_url="git@github.com:org/private.git",
Examples
uv run python examples/example1.py
| Example | What it shows |
|---|---|
examples/example1.py |
Five concurrent runs against one repository |
examples/example2.py |
Read-only codebase question |
examples/example3.py |
Init installs Python, then Pi edits and runs tests |
examples/example4.py |
The timeout kills a long init script |
Develop
uv sync
uv run ruff check .
uv run pytest -m "not network"
Metadata
Release files for ferir 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 | |
|---|---|---|---|
| ferir-0.1.0.tar.gz | 22.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ferir-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 38.4 kB
Release files / ferir-0.1.0.tar.gz
| Download URL | ferir-0.1.0.tar.gz |
|---|---|
| Size | 22.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
84b21a32a5ff29f0752cd92e7022e14c26859a022f15b44adadd0ef0d343b3a7
|
|
BLAKE2b-256 checksum How to use checksums |
2b9b0528adfe0c89e87a252481256a93b91db78172b6ea2c86cc3a066ba6e8eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.7
|
Release files / ferir-0.1.0-py3-none-any.whl
| Download URL | ferir-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
42f4c1e87a9a446fc6484fc180e1194a32ce6ae879a0283e016e03f9e6f1e5be
|
|
BLAKE2b-256 checksum How to use checksums |
2ac61548b07849816f19837ee29397a5563ebc39c87270996e59210e3febab97
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.7
|