pi-preferred-shell-tools
Configurable Pi extension that prefers modern shell tools when they are available.
Package details
Install pi-preferred-shell-tools from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-preferred-shell-tools- Package
pi-preferred-shell-tools- Version
0.1.4- Published
- Sep 23, 2026
- Downloads
- 371/mo · 15/wk
- Author
- aalexren
- License
- MIT
- Types
- extension
- Size
- 12.3 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-preferred-shell-tools
A small Pi extension that tells the model to prefer modern command-line tools when they are installed.
Its built-in preferences are:
The extension checks the current environment once per session and adds the available preferences to a dedicated structured section in Pi's system prompt. It does not replace Pi's built-in tools or require any preferred command to be installed.
Run /preferred-shell-tools to inspect the exact section that will be injected and whether it is already in the current model context. It is a human slash command, not a model tool: Pi handles it locally and does not add it to the conversation or consume context tokens.
Install
pi install npm:pi-preferred-shell-tools
Or install the GitHub version:
pi install git:github.com/aalexren/pi-preferred-shell-tools
Configure preferences
Add preferredShellTools to ~/.pi/agent/settings.json:
{
"preferredShellTools": {
"tools": [
{
"command": "bat",
"instruction": "Use `bat` instead of `cat` when previewing files."
},
{
"command": "jq",
"instruction": "Use `jq` when inspecting or transforming JSON."
}
]
}
}
Each entry needs a command to detect and the instruction Pi should receive. An entry with the same command overrides its built-in version.
To disable one built-in preference:
{
"preferredShellTools": {
"tools": [{ "command": "eza", "enabled": false }]
}
}
To start without any built-in preferences and provide only your own:
{
"preferredShellTools": {
"includeDefaults": false,
"tools": [
{
"command": "bat",
"instruction": "Use `bat` instead of `cat` when previewing files."
}
]
}
}
The original array form remains supported and adds entries to the defaults. Project settings in <project>/.pi/settings.json work too; project options and entries override matching global values. Settings are read when a session starts.
License
MIT