omp packages

pi-preferred-shell-tools0.1.4

Configurable Pi extension that prefers modern shell tools when they are available.

GitHub Actions Published 26 days ago MIT ~420 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-preferred-shell-tools

npm version npm license npm downloads GitHub Actions GitHub release GitHub code size GitHub top language

A small Pi extension that tells the model to prefer modern command-line tools when they are installed.

Its built-in preferences are:

  • rg instead of grep
  • eza instead of ls
  • fd instead of find

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