xl0/pi-lovely-codex

3

stars

58

commits

TypeScript

primary language

Sep 5, 2026

updated

README

@xl0/pi-lovely-codex

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

Install

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

Or use without installing:

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

/lovely-codex

Lovely codex settings

GPT fast mode 🏎️

Sends service_tier: "priority" to request priority serving:

  • default β€” don't send service_tier
  • fast β€” priority on both openai and openai-codex
  • fast-codex β€” priority on openai-codex only

GPT models on those two providers only. Fast mode shows 🏎️ in the status line.

On the Codex subscription, priority is silently ignored unless your account has Fast mode credits. On the OpenAI API it needs priority processing enabled for your org.

apply_patch

GPT models are trained on Codex's apply_patch; with Pi's edit tool, muscle memory shows β€” silly mistakes creep in. This extension gives them the tool they were trained on.

By default, apply_patch is a plain JSON tool { input: string }. For models that support OpenAI grammar tools, it can instead be a freeform custom tool constrained by Codex's Lark grammar.

Patches are applied by shelling out to codex --codex-run-as-apply-patch. The Codex CLI must be installed and on PATH.

Settings:

  • add apply_patch β€” on, off, or gpt-only (default: only for model ids starting with gpt- or containing /gpt-).
  • enable freeform β€” use the grammar-constrained custom tool when supported (off by default).
  • disable write / disable edit β€” drop the now-redundant built-in tools while apply_patch is active (off by default); restored after, but never beyond what the session started with.
  • disable read β€” on, off, or gpt-only (default: only for GPT model ids, independent of apply_patch). Forces bounded shell reads (sed -n/ head) instead of whole-file reads, conserving context the way Codex's toolset does. While read is gone, a view_image tool takes over image reading (which the shell can't provide); turn it off with add view_image.

Config files

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

Workspace overrides User. All keys optional.

Pi Lovely Webweb_search, web_fetch, web_image tools
Pi Lovely Dev Toolsinteractive debugging helpers /tool, /show-sysprompt, /show-context, /llm-stats
Pi Lovely IDEIDE integration
Pi Lovely Configscoped config helpers for Pi extensions
Pi Lovely Commentopen the last assistant message in your editor and sync edits back into the prompt
Pi Lovely Renameautomatic and manual session naming

Like this work? Hire me

Contributors

xl0

56 commits

any-victor

1 commits

wplct

1 commits

xl0/pi-lovely-codex

3

stars

58

commits

TypeScript

primary language

Sep 5, 2026

updated

README

@xl0/pi-lovely-codex

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

Install

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

Or use without installing:

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

/lovely-codex

Lovely codex settings

GPT fast mode 🏎️

Sends service_tier: "priority" to request priority serving:

  • default β€” don't send service_tier
  • fast β€” priority on both openai and openai-codex
  • fast-codex β€” priority on openai-codex only

GPT models on those two providers only. Fast mode shows 🏎️ in the status line.

On the Codex subscription, priority is silently ignored unless your account has Fast mode credits. On the OpenAI API it needs priority processing enabled for your org.

apply_patch

GPT models are trained on Codex's apply_patch; with Pi's edit tool, muscle memory shows β€” silly mistakes creep in. This extension gives them the tool they were trained on.

By default, apply_patch is a plain JSON tool { input: string }. For models that support OpenAI grammar tools, it can instead be a freeform custom tool constrained by Codex's Lark grammar.

Patches are applied by shelling out to codex --codex-run-as-apply-patch. The Codex CLI must be installed and on PATH.

Settings:

  • add apply_patch β€” on, off, or gpt-only (default: only for model ids starting with gpt- or containing /gpt-).
  • enable freeform β€” use the grammar-constrained custom tool when supported (off by default).
  • disable write / disable edit β€” drop the now-redundant built-in tools while apply_patch is active (off by default); restored after, but never beyond what the session started with.
  • disable read β€” on, off, or gpt-only (default: only for GPT model ids, independent of apply_patch). Forces bounded shell reads (sed -n/ head) instead of whole-file reads, conserving context the way Codex's toolset does. While read is gone, a view_image tool takes over image reading (which the shell can't provide); turn it off with add view_image.

Config files

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

Workspace overrides User. All keys optional.

Pi Lovely Webweb_search, web_fetch, web_image tools
Pi Lovely Dev Toolsinteractive debugging helpers /tool, /show-sysprompt, /show-context, /llm-stats
Pi Lovely IDEIDE integration
Pi Lovely Configscoped config helpers for Pi extensions
Pi Lovely Commentopen the last assistant message in your editor and sync edits back into the prompt
Pi Lovely Renameautomatic and manual session naming

Like this work? Hire me

Contributors

xl0

56 commits

any-victor

1 commits

wplct

1 commits

Languages

TypeScript

100.0%