omp packages

@paulpham157/apply-patch0.3.1

Universal apply_patch for every model on Pi, not just gpt-*: GPT, Claude, Gemini, DeepSeek, Kimi, GLM, Qwen, and more. One patch tool across providers with grammar support and JSON fallback.

GitHub Actions Published 1 month ago MIT ~577 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

apply-patch

One apply_patch for every model on Pi: GPT, Claude, Gemini, DeepSeek, Kimi, GLM, Qwen, and others. The extension replaces edit/write, choosing the grammar or JSON function tool based on provider capability.

Repo: https://github.com/paulpham157/pi-apply-patch

Why apply-patch

Native edit fails when the exact match string is off, while apply_patch applies the same intent with context matching:

edit tool failing on inexact match apply_patch applying the same intent

Install

Requires Pi >=0.85.1 and Node >=22.

pi install npm:@paulpham157/apply-patch

If Pi is running, use /reload. The extension activates automatically and keeps working across model switches.

Features

  • Create, edit, delete, and move files with a single patch tool.
  • Confines paths to cwd; rejects symlinks, existing destinations on create/move, and overlapping path operations.
  • Validates the full patch before writing; no full rollback on filesystem write errors.

Read a file before editing it; on patch failure, re-read the relevant region and generate a new patch. Patch usage quality varies by model. bash still works and is not subject to this tool's path limits.

Contributing and support

Read CONTRIBUTION.md, AGENTS.md, and run the required tests before opening a PR. See live testing with Pi and releasing.

Issues? Open one here with the Pi version, provider/model, and reproduction steps. Do not attach API keys.

Quick create: Bug report · Model/provider issue · Feature request.

Forked from code-yeongyu/pi-apply-patch: at the time, upstream had no updates for ~2 months and only supported gpt-* models, so this fork was created for personal use. MIT license.