@javimolina/pi-rg
v0.1.3
Published
Pi package that adds a /r command with cached ripgrep-backed file completions
Maintainers
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-rgOr with the installer:
npx @javimolina/pi-rgIf pi is already running, use:
/reloadThen type:
/r tuiWhile 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