@javimolina/pi-rg

Pi package that adds a /r command with cached ripgrep-backed file completions

Package details

extension

Install @javimolina/pi-rg from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@javimolina/pi-rg
Package
@javimolina/pi-rg
Version
0.1.3
Published
Mar 7, 2026
Downloads
70/mo · 15/wk
Author
javimolina
License
MIT
Types
extension
Size
8.9 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-rg

Pi package that adds a /r command with cached ripgrep-backed file completions and inserts @file references into the editor.

Why

Pi's built-in @ file autocomplete is convenient, but on larger repositories it can feel slower than a ripgrep-backed file index. This package adds a dedicated /r flow that uses a cached rg --files result for command completions, which makes file lookup feel much snappier in big codebases.

The goal is not to replace @, but to provide a faster path when you already know you want to search for a file and insert it as an @file reference.

Usage

Install with pi:

pi install npm:@javimolina/pi-rg

Or with the installer:

npx @javimolina/pi-rg

If pi is already running, use:

/reload

Then type:

/r tui

While typing, pi shows live command completions from a cached rg --files index.

When you submit:

  • if there is one exact or best remaining match, it inserts @path/to/file
  • if there are multiple matches, it opens a selector
  • if there are no matches, it shows a notification

The inserted text replaces the /r ... command line with:

@path/to/file