pi-apply-patch

OpenAI Codex apply_patch file-editing tool for GPT models on Pi

Packages

Package details

extension

Install pi-apply-patch from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-apply-patch
Package
pi-apply-patch
Version
0.1.1
Published
Aug 18, 2026
Downloads
366/mo · 22/wk
Author
kennyfrc
License
MIT
Types
extension
Size
68.7 KB
Dependencies
1 dependency · 4 peers
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-apply-patch

OpenAI Codex apply_patch file-editing tool for Pi, active only for GPT-family models, where it replaces the built-in edit and write tools.

Install

pi install npm:pi-apply-patch

Config lives in ~/.pi/agent/pi-apply-patch.json. Omit it for the default auto mode.

{
  "mode": "auto",
  "gptIdPatterns": ["^gpt", "^o\\d"]
}

mode is auto (default), on, or off:

  • auto: enables apply_patch and removes edit and write for GPT-family models; every other model keeps edit/write and has apply_patch hidden.
  • on: enables apply_patch for every model.
  • off: disables apply_patch for every model.

gptIdPatterns are regexes tested against the model id. Models whose api is openai-codex-responses always count as GPT.

License

MIT.