@amitkot/pi-open-zed
v0.1.0
Published
Host-side Zed IDE bridge for Pi — opens files at a line number from the coding agent.
Maintainers
Readme
open-zed extension
Opens files in the Zed IDE from Pi, bypassing macOS sandbox restrictions.
Purpose
The sandboxed bash tool cannot run zed (like gh). This extension calls zed on
the host via child_process.execFile, so the LLM can open files for the user's
inspection or editing in their IDE.
Threat Model
- Risk: Accidental file opens, minimal.
- Mitigations:
- Uses
child_process.execFilewith argument arrays (no shell). - Adds execution timeout.
- Does not pass full process environment to subprocesses.
- Only opens files — no edits, no mutations.
- Uses
Requirements
- Zed IDE installed on the host machine
zedavailable onPATH
Tools
open_zed— opens a file in Zed, optionally at a specific line number
Parameters
path(required) — file path to openline(optional) — line number to navigate to (1-indexed)
Prompt Guidelines
- Use
open_zedwhen the user asks to open or edit a file in their Zed IDE. - Do not use raw
zedshell commands when this tool is available.
Installation
pi install npm:@amitkot/pi-open-zedFor local development from a checkout:
pi -e ./packages/open-zed/src/index.tsTo install the whole pi-tools monorepo from git:
pi install git:github.com/amitkot/pi-toolsAfter installation or changes, restart Pi or run:
/reload