pi-editor

Pi extension to open files in your preferred editor ($VISUAL / $EDITOR)

Package details

extension

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

$ pi install npm:pi-editor
Package
pi-editor
Version
0.1.0
Published
Mar 6, 2026
Downloads
24/mo · 7/wk
Author
dwbutler
License
MIT
Types
extension
Size
2.5 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./extensions/editor.ts"
  ]
}

Security note

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

README

pi-editor

A pi extension that opens files in your preferred editor from within pi.

Install

pi install npm:pi-editor

Or try it without installing:

pi -e npm:pi-editor

Usage

/edit <path>   Open a file in $VISUAL or $EDITOR

The command resolves the path relative to your current working directory and spawns the editor attached to your terminal. If the file doesn't exist, you'll be prompted to create it.

Editor Selection

The extension checks these environment variables in order:

  1. $VISUAL — preferred for full-screen editors (e.g. nvim, code --wait)
  2. $EDITOR — fallback (e.g. vim, nano)
  3. vi — default if neither is set

License

MIT