A minimal terminal coding agent harness.

Sub-agents, anchored edits, a permission gate, and MCP without context death — in a ~15 MB binary that stays out of your way.

install.sh — zsh
$curl -fsSL https://raw.githubusercontent.com/pulseaiclub/phi/main/scripts/install.sh | bash

First run: pick a model with phi config · latest release on GitHub

Why phi

A harness that treats your context budget as the scarce resource it is.

Sub-agents

Spawn isolated jobs and watch the run unfold — without stuffing every turn into the parent context.

Anchored sloppy edits

Edit by anchored SM:FIND/SM:PUT patches instead of rewriting whole files; missing or ambiguous anchors fail closed with copy-ready fixes.

Permission gate

Gate or Ask before destructive tools fire. Safety is not optional when an agent can touch your tree.

In-TUI diff review

Open /diff to review the working tree, staged changes, or the last commit — leave line notes, then send them to the agent.

MCP without context death

Configure as many MCP servers as you want; tool schemas never enter the model prompt.

Any model

OpenAI, Anthropic, or Gemini — no vendor lock-in, switch models at runtime.

Skills & extensions

Package reusable procedures as SKILL.md; extend phi with native binaries — tools, commands, and event handlers via the PXB protocol.

Footprint

Cheap to run, cheap to hack on.

~15 MBrelease binary
~21 MBidle RSS per session
~31 mstime to first frame
6direct module deps
~22k LOCGo source, 32 packages
0Node / Electron / Python runtimes

Terminal first

A TUI, not a web app.

phi — zsh
phi welcome screen in the terminal