A minimal terminal coding agent harness.

Sub-agents, hashline edits, a permission gate, and MCP without context death — in a ~12 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.

Hashline edits

Edit by @file#TAG and LINE#HASH anchors instead of rewriting whole files; stale anchors are rejected.

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-compatible or Anthropic — 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.

~12 MBrelease binary
~21 MBidle RSS per session
~40 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