@xl0/pi-lovely-codex

Pi extension for GPT fast mode and Codex-style apply_patch

Packages

Package details

extension

Install @xl0/pi-lovely-codex from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@xl0/pi-lovely-codex
Package
@xl0/pi-lovely-codex
Version
0.2.0
Published
Jun 29, 2026
Downloads
706/mo · 32/wk
Author
xl0
License
MIT
Types
extension
Size
19.4 KB
Dependencies
2 dependencies · 3 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions"
  ]
}

Security note

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

README

@xl0/pi-lovely-codex

GPT "Fast mode" control and Codex-style apply_patch tool.

Install

pi install npm:@xl0/pi-lovely-codex

Use without install:

pi -e npm:@xl0/pi-lovely-codex

/lovely-codex

Lovely codex settings

GPT fast mode 🏎️

  • default -> omit service_tier - default mode
  • fast -> send service_tier: "priority" for openai and openai-codex - request fast mode on OpenAI API and Codex sub.
  • fast-codex -> send priority only for openai-codex - request fast mode on Codex sub only.

Applies only to provider openai or openai-codex, model id starting with gpt-. Fast mode shows 🏎️ in status line.

apply_patch tool

GPT models have been relentlessly fine-tuned to use the apply_patch tool in Codex. They can use the default Pi edit tool of course, but often make silly mistakes that might be just muscle memory from being trained on apply_patch for the edit task.

This extension adds the tool GPT models crave so much.

Note: Current apply_patch implementation shells out to codex --codex-run-as-apply-patch. You need to have codex installed and available on PATH.

add apply_patch controls whether Lovely Codex enables the apply_patch tool:

  • on -> always add the apply_patch tool.
  • off -> don't add the apply_patch tool.
  • gpt-only -> enable apply_patch only when current model id starts with gpt- or contains /gpt-.

Optionally, you can disable the now redundant built-in tools while apply_patch is active:

  • disable write
  • disable edit

When apply_patch becomes inactive, write/edit are restored only if they were active at session start.

Default effective values: add apply_patch = gpt-only, disable write = off, disable edit = off.

Config scopes:

  • User: ~/.pi/agent/xl0-pi-lovely-codex.json
  • Workspace: <cwd>/.pi/xl0-pi-lovely-codex.json

Workspace overrides User. All keys are optional.

Related projects

Pi Lovely Web web_search, web_fetch, web_image tools
Pi Lovely Dev Tools interactive debugging helpers /tool, /show-sysprompt, /show-context, /llm-stats
Pi Lovely IDE IDE integration
Pi Lovely Config scoped config helpers for Pi extensions

Like this work? Hire me