javimolina-pi-rg

内容来源:README.md(说明文档) · 原始地址 · 查看安装指南

原始内容

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