@tmustier/pi-files-widget
v0.1.12
Published
In-terminal file browser and viewer for Pi.
Readme
files-widget
In-terminal file browser and diff viewer widget for Pi. Navigate files, view diffs, select code, and send comments to the agent without leaving the terminal and without interrupting your agent.
Install
Quick install (Pi package manager):
pi install npm:@tmustier/pi-files-widgetRequired deps (needed for /files):
# macOS (Homebrew)
brew install bat git-delta glow
# Ubuntu/Debian
sudo apt-get install -y bat git-delta glowpi install git:github.com/tmustier/pi-extensionsThen add to ~/.pi/agent/settings.json:
{
"packages": [
{
"source": "git:github.com/tmustier/pi-extensions",
"extensions": ["files-widget/index.ts"]
}
]
}Local clone:
Add to your Pi extensions list:
{
"extensions": [
"~/pi-extensions/files-widget"
]
}If you prefer symlinking into ~/.pi/agent/extensions:
ln -sfn ~/pi-extensions/files-widget ~/.pi/agent/extensions/files-widgetThen reference it in your settings:
{
"extensions": [
"~/.pi/agent/extensions/files-widget"
]
}Dependencies (required)
bat: syntax highlightingdelta: formatted diffsglow: markdown rendering
The /files browser requires these tools and will refuse to open until they are installed.
Commands
/files- open the file browser/review- open tuicr review flow/diff- open critique (bunx critique)
Review/Diff Dependencies
brew install agavra/tap/tuicr
brew install oven-sh/bun/buntuicris required for/reviewbunis required for/diff
If missing, /review or /diff will show a clear install prompt.
Browser Keybindings
j/kor↑/↓: moveEnter: open file / expand folderh/lor←/→: collapse/expand folderPgUp/PgDn: page up/downc: toggle changed-only view]/[: next/prev changed file/: search (type to filter,Escto exit)+/-: increase/decrease browser heightq: close
Viewer Keybindings
j/kor↑/↓: scrollPgUp/PgDn: page up/downg/G: top/bottomd: toggle diff (tracked files only)/: search (type to search)n/N: next/prev matchv: select mode (line selection)c: comment on selected lines (inline prompt)]/[: next/prev changed file+/-: increase/decrease viewer heightq: back to browser
Notes
- Untracked files show as
[UNTRACKED]and open in normal view. - Folder LOCs are shown only when the folder is collapsed (expanded folders would duplicate counts).
- Line counts load asynchronously; the header shows activity while counts are computed.
- Large non-git folders load progressively and may show
[partial]while loading in safe mode. - Git status refreshes every 3 seconds while
/filesis open.
