Skip to main content

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.2.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.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 ferir 0.2.0
File Size Uploaded Provenance Actions
ferir-0.2.0.tar.gz 22.6 kB Without provenance Details for ferir-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 38.4 kB

Release files / ferir-0.2.0.tar.gz

Download URL ferir-0.2.0.tar.gz
Size 22.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ae912b3c82ecf7a7a1d9a27f0e225273c095ea6bd67f5834f073664e85235b23
BLAKE2b-256 checksum
How to use checksums
8fd274727d68ee8941c884cc011280e61b6fb951051cfbf0db7a8b505996fa12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

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

Download URL ferir-0.2.0-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a08d1b16d3943302a750cd88d7b5187a4e0125e6069e138d93e2c73402f05e0
BLAKE2b-256 checksum
How to use checksums
af3f250242735140d2983319be161a1cebea2db563f18cf9c56c10b23f6e4820
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for ferir 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

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