Standalone basic tools for pi.
This package bundles a practical set of editing, fetch, web-reference, and built-in search activation extensions split out from pi-goodstuff.
fetchenable-builtin-search(activates pi's built-ingrep,find, andlstools)repo-map(repo_maptool)read-block(read_blocktool)questionquestionnairesourcegraph
repo_map generates a compact project orientation map: root, git state, manifests, language mix, important files, directory clusters, and recent changes.
read_block reads the enclosing code or Markdown block around a line or symbol, so agents can inspect the right semantic unit without guessing offset/limit ranges.
question adds a small, session-friendly tool for asking the user a focused question with optional choices and free-text fallback.
questionnaire adds a multi-question TUI for batching related questions with suggested options, recommended defaults, free-text answers, and a submit review screen.
Looking for task tracking?
todois no longer shipped here. Install@tintinweb/pi-tasksforTaskCreate/TaskList/TaskUpdateand friends.
enable-builtin-search activates pi's internal grep, find, and ls tools. Legacy custom glob, grep, and list implementations were removed so they cannot shadow pi's built-ins.
Pi core packages have moved from @mariozechner/* to @earendil-works/*. This package imports and tests against the new scope (@earendil-works/pi-ai, @earendil-works/pi-coding-agent, and @earendil-works/pi-tui) and keeps them as peer dependencies so pi supplies its own core runtime.
fetchrequires MarkItDown for Markdown conversion.- Activated built-in
grepandfinduse pi's managedrgandfdtools; install them onPATHor let pi download them when needed. - MarkItDown upstream requires Python 3.10 or newer.
- Recommended installation method:
pipx, so themarkitdownCLI is available onPATHwithout modifying the package itself.
Install the pi package:
pi install npm:@capyup/pi-basic-toolsInstall pipx if it is not already available:
brew install pipxAlternative pipx installation:
python3 -m pip install --user pipx
python3 -m pipx ensurepathInstall MarkItDown for the fetch tool:
pipx install 'markitdown[all]'Verify that MarkItDown is available:
markitdown --versionIf pi is already running, reload extensions after installing or updating dependencies:
/reload
The test suite is strict by default: it uses real filesystem operations, real git, live network calls to example.com and Sourcegraph, and the real MarkItDown CLI. Missing dependencies are expected to fail tests instead of being mocked or skipped.
npm install
npm test
npm run test:build
npm run checkTest coverage includes repo_map, read_block, question, questionnaire, fetch, sourcegraph, enable-builtin-search, and package wiring. See docs/testing.md for the dependency checklist, public research summary, and recommended pi extension testing workflow.
Update this package inside pi:
pi update npm:@capyup/pi-basic-toolsIf you need to update MarkItDown as well:
pipx upgrade markitdownThe fetch tool does not inline the fetched page body into the tool result. Instead, it stores artifacts under the current project's .pi/fetch/ directory using a timestamp-plus-slug layout similar to task artifacts. It does not fall back to the global ~/.pi; if you run it directly from your home directory, it refuses and asks you to work from a project directory.
.pi/fetch/<timestamp>-<slug>/
response.<ext>
content.md
meta.json
response.<ext>: raw fetched response saved byte-for-byte with an extension inferred fromContent-Typeor URL.content.md: Markdown generated by MarkItDown when conversion succeeds.meta.json: metadata for the fetch run, including URL, content type, byte size, saved paths, and MarkItDown command attempts.
fetch attempts MarkItDown in this order:
~/.local/bin/markitdownmarkitdownpython3 -m markitdownpython -m markitdown
If conversion fails, the raw response is still preserved and meta.json records the failed attempts.
The fetch result explicitly tells the agent which saved file to read next. It also reports a rough line count and token estimate for that recommended file so the model can decide whether to read it immediately.
After calling fetch, inspect the generated Markdown with read:
read .pi/fetch/<timestamp>-<slug>/content.md
If Markdown conversion fails, fetch points read at the raw saved response instead. For binary responses it still preserves the file, but line and token estimates are omitted because they would not be meaningful.
If Markdown conversion fails, inspect either of these instead:
read .pi/fetch/<timestamp>-<slug>/response.<ext>
read .pi/fetch/<timestamp>-<slug>/meta.json
Good candidates for later pi-basic-tools additions:
diagnostics/check: run project-aware lint/test/typecheck commands with structured, compressed results.symbols: LSP or Serena-backedfind_symbol,references, and safe rename/replace helpers.- Structured git write tools: guarded branch/commit helpers that never hide dirty worktree risk.
- Context utilities: inspect active tools, model context usage, and recent large tool outputs.
Browser automation, heavy web research, and semantic language-server workflows may be better as separate packages or MCP integrations instead of bloating this core package.
fetchkeeps a 5 MB response-size guard.fetchsaves binary responses safely; it does not force them through text decoding before writing them to disk.- Legacy custom
glob,grep, andlistimplementations are intentionally absent; pi's built-ingrep,find, andlsare preferred.
MIT