Install
Install with PiG
pig install npm:@zharskiy/pinataInstall with Pi
pi install npm:@zharskiy/pinataPackages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"skills": [
"./skills"
],
"extensions": [
"./extensions/subagents/index.ts",
"./extensions/session-limits/index.ts",
"./extensions/spending/index.ts",
"./extensions/working-indicator/index.ts",
"./extensions/notifications/index.ts",
"./extensions/command-aliases/index.ts",
"./extensions/composer/index.ts",
"./extensions/questionnaire/index.ts",
"./extensions/style/index.ts",
"./extensions/context/index.ts",
"./extensions/footer/index.ts",
"./extensions/mcp-import/index.ts",
"./extensions/transcript/index.ts",
"./extensions/model-default/index.ts",
"./extensions/prune/index.ts"
]
}README
Written by the package's publisher, shown as published in version 1.2.1 (README.md). PiG does not review it.
pinata
Background agents, session awareness and a calmer terminal for the pi coding agent.
Fifteen extensions and several skills in one pi package (@zharskiy/pinata), built on one small shared platform.
Quick start · Sandbox · Development · Contributing and licence
Why
Pi is a lean, extensible coding agent. This package adds what a long working day needs on top of it. The main session delegates work to background agents and keeps its own context for judgement. It hands itself over to a fresh session before its context fills, and it shows what everything costs. The terminal stays quiet and readable while all of that runs.
What it looks like
✓ read src/stats.py:5-14
↳ 10 lines
✗ 3 agents · 4m 2s · 35 calls · 64.7k tokens · $0.25
↳ ✓ scout Map the auth module · model-a:low
1m 5s · 4 calls · 12.3k tokens · $0.04
✗ worker Fix the login redirect · model-a:low
tests failed twice · 2m 10s · 31 calls · 52.4k tokens · $0.21
── ⠹ Pondering · 12s (esc to interrupt) ─────────────────────────────
my-project on main · session-name model-name · thinking high
context 13.0k of 163k · cache 73% 851.3k tokens · $0.34
shift+tab to cycle thinking · ← to list agents
Tool rows from transcript, an agent batch from subagents, the working line from working-indicator and the status block from footer.
Quick start
pi install npm:@zharskiy/pinata # the whole package, without the sandbox; pi update --extensions updates it
pi install ./pinata # from a local checkout; add -l for the current project only
pi -e ./pinata/extensions/<name>/index.ts # one extension for a single run, from a checkout; git pull, then /reload in pi
To run pi in the sandbox with them, install with pinata instead (Install, update and uninstall).
The package installs its skills (pinata-code-style, the code style the subagents implementer writes by, which pi lists for the main session too) and fifteen extensions:
Agents and tools
- subagents: background agents you run, watch, message and stop from the main session, optionally in their own git worktree, with MCP tools. A panel below the editor and an
/agentsoverlay. - questionnaire: a tool the model uses to ask you a batch of multiple-choice questions in one inline form.
- style:
/style concisefor short, result-first replies from the main session;/style normalturns it off. - mcp-import:
/mcp-import <claude|cursor>copies MCP servers into pi'smcp.json. A dry run unless you addapply.
Session awareness
- session-limits: hands the main session over to a new session before its context fills up.
- spending: the session's total spend in the footer, subagents at every depth included.
- context:
/contextshows what fills the context window, per category, with cache hit rates. - notifications: one terminal notification when pi waits for your input or a dialog waits unanswered.
- prune: removes sessions, agent runs and handoff folders untouched for 180 days (
days), keeping every session whose chain (sessions linked by parent, either way) holds an open or recent one;/pruneshows what each interval would remove and asks before it removes, or sets the automatic interval. - model-default: the model and thinking level you last picked (Enter in the selector,
/model <name>, cycling, Shift+Tab) become pi's saved defaults, as Ctrl+S does, and a model switch keeps your thinking level.
Look and feel
- footer: a three-line status block: folder, branch, model, thinking level, context, cache, cost and a key-hint row.
- transcript: tool calls as state rows: a glyph, a title and a one-line outcome you expand with
ctrl+o. - composer: the input drawn between two full-width rules, with pi's
›cursor as the prompt. - working-indicator: a rotating verb and the elapsed time next to pi's spinner (
Pondering · 12s). - command-aliases: friendlier names for built-in commands:
/continue,/clear,/exit.
Start pi and try:
| Try | What you see |
|---|---|
/agents | The agents menu: view running and finished agents, set up models, create a new agent. |
/context | What fills the context window, with cache hit rates. |
/style concise | Short, result-first replies from the main session; subagents are unaffected. |
Coming from another tool
- Skills: nothing to do when they live in
.agents/skills. Pi reads~/.agents/skillsand.agents/skillsas well as its own~/.pi/agent/skillsand.pi/skills. - Agent definitions and instruction files: pi reads
AGENTS.mdandCLAUDE.mdas they are. Rewrite agents by hand:/agents create <name>sets up a new agent (see subagents), then copy the old prompt into its body. - MCP servers:
/mcp-import claudeor/mcp-import cursor(addprojectfor the project's servers) shows what it would copy; addapplyto write it, then/reload. OAuth sign-ins do not transfer: sign in again with/mcp.
Sandbox
The package also ships pinata, a host-side command that runs pi in a per-repository Linux container on a Colima VM (macOS). After pinata install, cd repo && pi starts pi with your providers, MCP servers, settings and packages, but the container holds placeholders instead of credentials, and its only network exit is a proxy on the host that allows a list of hosts and injects the real credentials there. pi --no-sandbox runs host pi. See the pinata README, its configuration reference and its threat model.
Install, update and uninstall
npm install -g --legacy-peer-deps @zharskiy/pinata@<version> # macOS with pi, Homebrew and Node 22.19 or newer
pinata install [--yes]
pinata update
pinata uninstall [--sandbox]
pinata list # the sandbox VM and the pi sessions in it
pinata install, pinata update and every launch need pi on the host and stop before they change anything without one: pinata never installs, updates or removes pi. It installs Colima with Homebrew when it is missing, registers the package with host pi, links ~/.local/bin/pi to pinata, puts ~/.local/bin on PATH in ~/.zshrc (and in ~/.bashrc and ~/.bash_profile when they exist) and runs pinata init. Run again, it changes nothing. In a checkout, run npm install, then node launcher/bin/pinata-dev.js install; pinata update refuses there (git pull, then install again). Details: pinata README.
Versions are yours to pick. The package version is the one you install, @zharskiy/pinata@<version>, or the latest with pinata update, and pi loads the extensions of that same version, pinned as npm:@zharskiy/pinata@<version> in pi's settings, which pi update --extensions does not move. The host pi is yours to install and update; pinata runs pi's managed install in ~/.pi/agent first, else the pi of npm install -g. Pi in the sandbox follows the host pi. How releases are made: RELEASING.md.
Uninstall. pinata uninstall, with no pi session running in the sandbox, deletes the sandbox VM with its containers, volumes and images, the pi link, the package's source in pi, the PATH blocks, pinata's state and the npm package. Your config, pi's sessions, pi and Colima stay. pinata uninstall --sandbox removes only the VM, the pi link and pinata's state, so pi runs host pi with pinata's extensions; pinata install brings the sandbox back.
Development
npm install
npm run check # typecheck, biome, knip, unit tests; no credentials, no network
npm run test # unit tests only
PI_LIVE_MODEL=provider/id:low npm run test:live # live tests with real agents, local only, costs money
PI_LIVE_MODEL=provider/id:low npm run evals # prompt-quality evals with real agents, local only, costs money
npm run check is what CI runs. Live tests and evals never run in CI. Rules for coding agents are in AGENTS.md; the evals are described in test/evals/README.md.
How live tests and evals use your credentials
Both need PI_LIVE_MODEL=provider/id[:thinking] set to a model you have pi credentials for (in pi's agent dir, ~/.pi/agent/auth.json, or the dir in PI_CODING_AGENT_DIR). The optional PI_LIVE_CHORE_MODEL puts the chore agents on a second model. Without it, or without credentials, they fail at once with a message saying what is missing.
Each suite links your auth.json (and copies models.json, if present) into a temporary agent dir and points pi at it. Your AGENTS.md, skills, extensions and MCP config stay out. A token pi refreshes during a run goes through the link into the real file, so it is not lost. Everything they create lives in temporary directories, except the evals' results in the gitignored test/evals/.results/.
Contributing and licence
Issues and pull requests are welcome. Run npm run check before you open one. Before changing code, read ARCHITECTURE.md for how it works and STRUCTURE.md for where things are. Released under the MIT licence.