@fgladisch/pi-zsh-shell
Run Pi user bash commands through zsh with Pi-specific functions
Package details
Install @fgladisch/pi-zsh-shell from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@fgladisch/pi-zsh-shell- Package
@fgladisch/pi-zsh-shell- Version
0.2.1- Published
- Jun 5, 2026
- Downloads
- 217/mo · 22/wk
- Author
- fgladisch
- License
- MIT
- Types
- package
- Size
- 2.9 KB
- Dependencies
- 0 dependencies · 1 peer
Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@fgladisch/pi-zsh-shell
Run Pi user bash commands through zsh while sourcing Pi-specific shell functions from ~/.pi/agent/zsh-functions.
What it does
This extension hooks Pi's user_bash execution and wraps each command in:
exec /bin/zsh -fc 'if [ -r ~/.pi/agent/zsh-functions ]; then source ~/.pi/agent/zsh-functions; fi
<your command>'
zsh -f keeps startup fast and avoids loading interactive config such as ~/.zshrc, prompt plugins, Powerlevel10k, or gitstatus.
Pi zsh functions
Create ~/.pi/agent/zsh-functions for helpers you want available inside Pi commands:
gst() {
git status "$@"
}
ll() {
ls -lah "$@"
}
The file is sourced only when readable. Missing file is ignored.
Prefer functions over aliases. Functions work reliably in this non-interactive zsh -f -c flow, while aliases are parsed earlier and can be surprising.
Shell selection
By default the extension uses:
PI_ZSH_SHELL, if set to an absolute path$SHELL, when it is an absolute path and its basename iszsh/bin/zsh
Example:
export PI_ZSH_SHELL=/opt/homebrew/bin/zsh