pi-fallow
Pi extension that brings Fallow codebase intelligence into Pi as an agent tool and slash command.
Package details
Install pi-fallow from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-fallow- Package
pi-fallow- Version
0.1.3- Published
- Jun 17, 2026
- Downloads
- 167/mo · 8/wk
- Author
- revazi
- License
- MIT
- Types
- extension
- Size
- 472 KB
- Dependencies
- 0 dependencies · 4 peers
Pi manifest JSON
{
"image": "https://raw.githubusercontent.com/revazi/pi-fallow/main/pi-fallow.png",
"extensions": [
"./extensions/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
Pi Fallow
Pi Fallow connects Fallow to the Pi coding agent: you get a fallow_run tool for agent workflows and a /fallow slash command for interactive checks.
Use it when you want Pi to verify changes, review a PR, find dead code, inspect duplication, check maintainability, or trace whether something is safe to remove.

Pi Fallow checking the pi-fallow package itself.
Highlights
- Agent tool:
fallow_rungives Pi structured JSON summaries from Fallow. - Slash command:
/fallow ...runs the Fallow CLI from inside Pi. - PR shortcut:
/fallow prmaps toaudit --base <detected-base> --gate new-only. - Rerun shortcut:
/fallow rerunrepeats the last/fallowcommand. - Autocomplete: subcommands, flags, enum values, and branch refs are suggested in the editor.
- Interactive navigator: findings open in a bordered TUI view where you can inspect, select, trace, or load issues into the editor.
- Safe defaults: JSON and quiet output are added when appropriate; large output is truncated for the transcript and saved to a temp file.
- Flexible CLI lookup: uses
FALLOW_BINfirst, thenfallowfromPATH, then falls back tonpx -y fallow.
Installation
Install from npm after publishing:
pi install npm:pi-fallow
Install directly from GitHub:
pi install git:github.com/revazi/pi-fallow
Try it locally without installing:
pi -e .
Or install the local checkout:
pi install .
# project-local install
pi install -l .
Usage
Ask Pi things like:
- “Run a Fallow audit for this PR and fix introduced dead code.”
- “Find duplicate code, trace the largest clone group, then suggest a refactor.”
- “Run Fallow health and tell me the safest maintainability improvement.”
- “Preview Fallow auto-fixes before applying anything.”
Manual slash command examples:
/fallow pr
/fallow rerun
/fallow audit --base origin/main --gate new-only
/fallow check-changed --changed-since main
/fallow dead-code --changed-since main
/fallow dupes --changed-since main
/fallow health --file-scores --targets --score
/fallow trace-file extensions/fallow/ui.ts
/fallow trace-export extensions/fallow/ui.ts FallowIssueNavigator
/fallow coverage analyze
In the interactive navigator:
↑↓orj/k— moveEnter/Space— expand the selected findings— select/unselecteora— load selected findings into the editort— run a trace for the selected finding when possibleq/Esc— close
Requirements
- Node.js 20+
- Pi coding agent
- Fallow available through one of:
FALLOW_BIN=/path/to/fallowfallowonPATHnpx -y fallowfallback
The Pi package declares Pi libraries as peer dependencies, as recommended for Pi extensions.
Package manifest
package.json exposes the extension through the Pi package manifest:
{
"keywords": ["pi-package", "pi-extension"],
"pi": {
"extensions": ["./extensions/index.ts"],
"image": "https://raw.githubusercontent.com/revazi/pi-fallow/main/pi-fallow.png"
}
}
Development
Useful checks:
npm run check:bundle
npm run health
npm run dupes
npm run pack:check
This repo includes .fallowrc.json so Fallow knows the Pi entrypoint is extensions/index.ts and treats TUI component callbacks such as handleInput and invalidate as framework-used.
File layout
.fallowrc.json— local Fallow config for entrypoint and Pi TUI lifecycle methodsextensions/index.ts— Pi package entrypointextensions/fallow.ts— extension registrationextensions/fallow/autocomplete.ts—/fallowautocompleteextensions/fallow/cli.ts— CLI argument building and process executionextensions/fallow/colors.ts— shared ANSI color helpersextensions/fallow/command/— slash-command argument normalization, loading, result flow, and prompt handoffextensions/fallow/data.ts— small data helpersextensions/fallow/engine.ts— command execution and formatting pipelineextensions/fallow/output.ts— JSON parsing, summaries, and output truncationextensions/fallow/overview.ts— maps Fallow JSON to overview dataextensions/fallow/path.ts— path/text extraction helpersextensions/fallow/pr-summary/— PR audit summary extraction and rendering helpersextensions/fallow/project/— config/cache/git status helpersextensions/fallow/schema.ts— tool parameter schemaextensions/fallow/session.ts— session startup and autocomplete provider registrationextensions/fallow/status.ts— status bar update helperextensions/fallow/summary/— summary text/render helpersextensions/fallow/tool-render.ts— tool call/result and transcript message renderingextensions/fallow/types.ts— shared typesextensions/fallow/ui.ts— TUI component re-exportsextensions/fallow/ui/— overview and issue navigator TUI components
License
MIT © Revaz Zakalashvili
