@xynogen/pix-grep

Pi tool — pattern search in files

Packages

Package details

extension

Install @xynogen/pix-grep from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@xynogen/pix-grep
Package
@xynogen/pix-grep
Version
0.3.10
Published
Nov 4, 2026
Downloads
1,803/mo · 750/wk
Author
xynogen
License
MIT
Types
extension
Size
21.6 KB
Dependencies
2 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "src/extension.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pix-grep

Pi tool — pattern search in files with FFF acceleration.

What it does

Replaces Pi's default grep tool with a version backed by pix-pretty.

  • FFF lifecycle — owns the frecency-ranked, SIMD-accelerated file index: inits on session_start, tears down on session_shutdown.
  • Constrained searches (path/glob set) skip FFF and use the SDK's ripgrep directly, avoiding a known FFF 0.5.2 abort on Unicode filenames. ignoreCase searches also use the SDK path, because FFF only has smart case. FFF searches are case-sensitive, like ripgrep. Falls back to plain ripgrep if @ff-labs/fff-node isn't installed.
  • Edit anchors — match rows are path:LINE#HASH|text. LINE#HASH is a valid edit anchor. Files over the anchor size limit keep plain path:LINE: rows.
  • Batch — returns up to 30 matches by default; limit asks for more. Pass patterns to search several patterns in one call.
  • Rendering — match-count header, highlighted pattern, file paths + line numbers, dim inline preview. Call labels show pattern, path, glob. A cut preview fades out at the bottom and ends with … N more lines (ctrl+o to expand).
  • Pagination — when more matches exist than returned, the result asks for a narrower pattern, path, or glob first, and carries a cursor id that continues the search only if every match is needed.

Auto-collapse

After a configurable delay (default 10 seconds), completed output collapses to a row such as ✓ grep tickCollapse · 12 matches. Structured failures use a compact ✗ row after the delay. Expanding restores the existing bounded match preview or exact diagnostic without restarting the elapsed timer. This is controlled via the collapse section of ~/.pi/agent/pix.json:

{
  "collapse": {
    "enabled": true,
    "delaySec": 10,
    "tools": { "grep": true }
  }
}

Set collapse.tools.grep: false to disable for this tool only. See @xynogen/pix-runtime/collapse for the full API.

Install

pi install npm:@xynogen/pix-grep

Bundled in @xynogen/pix-core. Install it alone only if you do not use pix-core.

Full distro

This package is part of Pix. The installer sets up Pi and the full distro. See Install for the notes for each OS.

# Linux / macOS
curl -fsSL https://raw.githubusercontent.com/xynogen/pix-mono/main/scripts/install.sh | sh
# Windows
irm https://raw.githubusercontent.com/xynogen/pix-mono/main/scripts/install.ps1 | iex

License

MIT