A local pi package with custom extensions, tools, and prompt templates.
This repo currently ships:
- custom commands and shortcuts for review, handoff, memory, side conversations, and file navigation
- custom tools for prior-session lookup, Q&A, GitHub codebase analysis, and web fetching
- one prompt template for accessibility and visual design review
| Command / shortcut | What it does |
|---|---|
/answers or Ctrl+. |
Extract questions from the last assistant response, then answer them in the shared questions TUI. |
/btw <message> |
Start or continue a side conversation without affecting the main agent turn. |
/btw:new [message] |
Reset the side thread and optionally start a new one. |
/btw:clear |
Clear the side thread widget and reset the thread. |
/btw:inject [instructions] |
Inject the full side thread back into the main session as follow-up context. |
/btw:summarize [instructions] |
Summarize the side thread, then inject the summary into the main session. |
/cfile |
Write a Vim quickfix file from files edited in the current session; copies the path to the clipboard on macOS. |
/handoff |
Generate a structured handoff draft, create a new session, prefill the editor, then auto-submit after a short countdown unless edited. |
/mem |
Save an instruction into AGENTS.local.md, project AGENTS.md, or global ~/.pi/agent/AGENTS.md with AI-assisted merging. |
/remember |
Alias for /mem. |
/open-file or Alt+O |
Fuzzy-pick a file edited in the current session and open it in your editor. |
/review |
Start a code review for uncommitted changes, a base branch, a commit, a PR, or custom instructions. |
/end-review |
End a review branch, optionally summarize it, then return to the original session position. |
| Tool | What it does |
|---|---|
session_query |
Ask focused questions about a prior session .jsonl file. Registered by extensions/handoff.ts. |
questions |
Ask one or more interactive single-select, multi-select, or freeform questions. |
webfetch |
Fetch a URL as markdown, text, or raw HTML. Large output is truncated with the full output written to a temp file. |
read_github |
Read a file from a GitHub repo with optional line ranges. |
list_directory_github |
List a directory in a GitHub repo. |
glob_github |
Match files in a GitHub repo by glob. |
search_github |
Search code in a GitHub repo and return grouped snippets. |
commit_search |
Search GitHub commit history. |
diff |
Compare two GitHub refs, optionally with patches. |
list_repositories |
Search repositories, preferring repos accessible to the authenticated user. |
librarian |
Run a GitHub-focused subagent for multi-repo codebase analysis. |
Q&A workflow.
- tool:
questions - command:
/answers - shortcut:
Ctrl+. - the tool asks one or more interactive single-select, multi-select, or freeform questions
/answersextracts questions from the last completed assistant message, then asks them with the same TUI- extraction uses the
fastmodel profile, falling back to the active model
Side-channel conversation widget.
- keeps a separate thread while the main agent keeps working
- persists side-thread entries in the session as custom entries
- can inject the raw thread or an LLM summary back into the main session
- commands:
/btw,/btw:new,/btw:clear,/btw:inject,/btw:summarize
Vim quickfix export for files changed in the current session.
- scans
editandwritetool usage from the session branch - emits one quickfix entry per edit hunk, or line 1 for
write - writes to a temp file named like
pi-qf-<session>-<timestamp>.qf - copies the output path to the clipboard on macOS via
pbcopy
Session handoff workflow plus prior-session lookup.
- command:
/handoff - tool:
session_query - generates a structured handoff document from the current conversation using the
fastmodel profile, falling back to the active model - opens a new session with
parentSessionset - prefills the new editor and auto-submits after 10 seconds unless the user edits or cancels
- clears pending auto-submit state on session changes and shutdown
GitHub analysis tools plus a librarian subagent tool.
- wraps GitHub CLI API access behind repo-safe tools
- normalizes repo names, paths, and search inputs
- spawns an isolated
pisubagent for broader analysis - requires
ghto be installed and authenticated
Persistent memory writer for AGENTS.md files.
- commands:
/mem,/remember - prompts for the instruction text, then asks where to save it
- merges the instruction into existing markdown with the active model
- previews the result before writing
- auto-adds
AGENTS.local.mdto.gitignore
Demo extension that re-registers built-in tools with a more minimal renderer.
- file name is currently
minimial-mode.tsin the repo - overrides
read,bash,edit,write,find,grep, andls - collapsed mode hides or compresses tool output; expanded mode shows full output
- example/demo extension, not a new standalone command
Desktop notifications on agent_end.
- sends OSC 777 notifications with the last assistant text when available
- supported terminals, per source comments: Ghostty, iTerm2, WezTerm, rxvt-unicode
- not supported, per source comments: Kitty, Terminal.app, Windows Terminal, Alacritty
Open a file edited in the current session.
- command:
/open-file - shortcut:
Alt+Oby default - fuzzy-picks files referenced by
editandwritetool calls in the current session - respects config from env vars and
settings.json - supports foreground or background open modes
Supported settings:
PI_OPEN_FILE_COMMANDPI_OPEN_FILE_MODEPI_OPEN_FILE_SHORTCUTopenSessionFilesin global or projectsettings.json
Interactive code review workflow.
- commands:
/review,/end-review - review targets:
- uncommitted changes
- diff against a base branch
- a specific commit
- a GitHub PR checked out locally via
gh pr checkout - custom review instructions
- supports review in the current session or a fresh review branch
- persists review state in session entries and shows a review widget while active
- loads
REVIEW_GUIDELINES.mdif it finds one next to a.pi/directory
Automatic session naming.
- listens on the first meaningful
input - skips slash commands and very short inputs
- uses the
fastmodel profile, falling back to the active model - sets a short lowercase session title once per session
HTTP fetch tool for docs and web pages.
- tool:
webfetch - formats:
markdown(default),text,html - timeout: default 30s, max 120s
- max response size: 5 MB
- uses
turndownfor HTML → markdown conversion - strips some known tooltip/popover noise before markdown conversion
- returns image fetches as metadata only, not binary payloads
A design-review prompt template for accessibility and visual design.
Focus areas:
- WCAG 2.1 accessibility checks
- layout, spacing, typography, contrast, and state coverage
- issue reporting with severity, snippets, and suggested fixes