Files

1.1 KiB

@jbcode/pi-bash-cwd

Pi extension that adds an optional cwd argument to the built-in bash tool. Absolute paths are used directly, relative paths resolve from the Pi session directory, and omitted paths retain the session directory. The extension validates the directory before starting the command, preventing an ignored or invalid cwd from running in Pi's process directory.

The override delegates execution and rendering to Pi's built-in Bash implementation. Existing command and timeout calls remain compatible.

Try from this checkout

pi -e ./extensions/bash-cwd/index.ts

Pi warns that the extension replaces the built-in bash tool; that warning is expected. The package is not published yet. After publication, install it with pi install npm:@jbcode/pi-bash-cwd and restart Pi or run /reload.

Use this package with Pi 0.84.x. Remove it only after moving to a Pi release that exposes equivalent validated per-call cwd behavior and can be imported by extensions without undeclared runtime dependencies.

Verify

bun run --filter '@jbcode/pi-bash-cwd' test