@vanillagreen/pi-codex-minimal-tools
Minimal Codex/OpenAI native tools for Pi: Codex image_generation, view_image, apply_patch
Package details
Install @vanillagreen/pi-codex-minimal-tools from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@vanillagreen/pi-codex-minimal-tools- Package
@vanillagreen/pi-codex-minimal-tools- Version
2.1.2- Published
- Sep 30, 2026
- Downloads
- 675/mo · 59/wk
- Author
- vanillagreencom
- License
- MIT
- Types
- extension
- Size
- 315.3 KB
- Dependencies
- 1 dependency · 4 peers
Pi manifest JSON
{
"image": "https://raw.githubusercontent.com/vanillagreencom/kendex/main/pi-extensions/pi-codex-minimal-tools/assets/apply-patch-rendering.png",
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@vanillagreen/pi-codex-minimal-tools
Image and patch tools for Pi sessions using OpenAI or Codex models. It adds image generation, local image viewing and patch editing.


Install
- npm:
pi install npm:@vanillagreen/pi-codex-minimal-tools. - kendex: add the declaration below to the project's
kendex.toml, or to~/.config/kendex/kendex.tomlfor user scope. Runkendex update-pi.
[pi-extensions."@vanillagreen/pi-codex-minimal-tools"]
source = "kendex"
Restart Pi after installation. Use kendex update-pi --check to preview the installation.
Features
- Generate or edit images and display the saved output.
- Run image generation in the background.
- Show a local image to the model.
- Apply patches that add, change, move or delete files.
- Inspect tool availability for the current model.
How it works
The extension checks the selected model and enables supported tools. An image request goes to the configured provider and saves the result in the output directory. An image-view request reads a local file into the model context. A patch request updates workspace files and reports the changes.
Memory use
- The background-image status keeps one rendered layout of at most 65,536 characters and elapsed-time keys for at most four displayed jobs. Job changes, resizing, elapsed seconds and theme invalidation replace the layout. Session shutdown clears the cache and stops its redraw timer.
- A WebSocket response may hold at most 33,554,432 characters of received events that the reader has not taken yet, counted as each event arrives and before it is decoded; a binary frame counts its bytes. Past that the response stops with an error whose first line starts
codex-websocket-queue-overflow=. - Generated-image previews are read from disk in the background the first time a message shows them, and appear on the next redraw. At most 16,777,216 characters of base64 preview data are cached; the least recently shown previews are dropped. One preview larger than that bound by itself is still cached until the next preview loads. The cache is cleared when a session starts or ends.
Settings
The settings editor writes project values to .pi/settings.json. The default user file is ~/.pi/agent/settings.json. PI_CODING_AGENT_DIR changes the user directory. Package values are stored under kendex.extensionManager.config["@vanillagreen/pi-codex-minimal-tools"].
Open /extensions:settings; settings appear under the Codex Minimal Tools tab. Project settings in .pi/settings.json apply only after Pi marks the workspace trusted.
enabled,autoEnable: the package and whether its tools join the active set on their own.nativeProviderTools: the Codex provider shim and the nativeimage_generationrewrite.imageGeneration,imageOutputDir,imageModel,directImageApiFallback: image generation, where images land (relative to the workspace), and the direct Images API fallback, which needsOPENAI_API_KEY.viewImage,viewImageWorkspaceOnly: theview_imagetool and whether it may read outside the workspace.applyPatchEnabled,strictPatchMode,allowAbsolutePatchPaths,deferApplyPatchRendering: the patch tool; strict mode removeseditandwritefrom the active set so every edit goes throughapply_patch.glyphStyle: Unicode or ASCII symbols;pi-tool-renderer's global override wins when set.
Maintainer notes are in DEVELOPMENT.md.