@vanillagreen/pi-codex-minimal-tools

Minimal Codex/OpenAI native tools for Pi: Codex image_generation, view_image, apply_patch

Packages

Package details

extension

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.0.1
Published
Sep 6, 2026
Downloads
803/mo · 221/wk
Author
vanillagreencom
License
MIT
Types
extension
Size
252.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.

apply_patch side-by-side diff rendering

image_generation lifecycle

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.toml for user scope. Run kendex 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.

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 native image_generation rewrite.
  • imageGeneration, imageOutputDir, imageModel, directImageApiFallback: image generation, where images land (relative to the workspace), and the direct Images API fallback, which needs OPENAI_API_KEY.
  • viewImage, viewImageWorkspaceOnly: the view_image tool and whether it may read outside the workspace.
  • applyPatchEnabled, strictPatchMode, allowAbsolutePatchPaths, deferApplyPatchRendering: the patch tool; strict mode removes edit and write from the active set so every edit goes through apply_patch.
  • glyphStyle: Unicode or ASCII symbols; pi-tool-renderer's global override wins when set.

Maintainer notes are in DEVELOPMENT.md.