PiHub

你的π,由此汇聚 — Where π connects everything.

A local web panel for the pi coding agent. Streaming chat, session trees, models and costs — in your browser, on your machine. No cloud, no accounts, no data leaves your computer.

http://localhost:18384

Live demo

A faithful mock of the panel, running right here: the agent is "thinking" and the workflow timer is counting.

http://localhost:18384 PiHub
how does PiHub connect to pi?
Thinking…
bash ✓ ok
ls ~/.pi/agent/sessions
2026-08-05-pihub.jsonl
2026-08-04-smoke.jsonl
PiHub talks to a local `pi --mode rpc` process through a small Node bridge. Everything stays on your machine — no cloud, no accounts.
deepseek-v4-flash ▾ thinking: high ▾ enter to send · shift+enter for newline
ask pi anything…

Install in 3 steps

  1. 01

    Install pi

    The pi coding agent — PiHub is its web panel, not a replacement.

    curl -fsSL https://pi.dev/install.sh | sh
  2. 02

    Clone & install PiHub

    Requires Node.js ≥ 20.

    git clone <your-repo>/pi-panel
    cd pi-panel
    npm install
  3. 03

    Run & open

    The panel spawns pi itself and binds to localhost only.

    npm run dev
    # open http://localhost:18384

Production build:

npm run build    # typecheck + lint + dist/
npm start        # serve dist/ from Node

Features

Streaming chat

Real-time streaming with steer, interrupt and a follow-up queue. Icon thinking states, per-run elapsed time, and a > that collapses the whole workflow.

Session trees

Sessions are trees. Browse branches, filter the tree, fork and clone from the right-click menu, archive or delete with guardrails.

Collections

Group sessions into projects with custom names. Drag sessions between groups; headless sessions stay ungrouped.

Models & channels

Switch models and thinking levels inline — applied immediately. Add custom API channels writing pi's models.json.

Extensions & skills

Type / to summon extensions, skills and prompt templates. Run them as ordinary prompts.

Stats & favorites

Global and per-session token/cost statistics. Save frequently used prompts with one bookmark click.

Manual

Chatting & send modes

Send mode is chosen in Settings → Personalization: Enter (default), ⌘+Enter or Ctrl+Enter. While the agent runs, the send button becomes steer — Enter injects a steering message. Esc interrupts. Type / for extension/skill suggestions; paste images from the clipboard.

Reasoning UI

Thinking states are icon-only: thinking… (animated), thought process… (collapsed, click to expand), thinking interrupted!. When a run completes its unit shows Elapsed hh时mm分ss秒 with a > collapse for the whole workflow, closed by a full-width divider. The Lab's simplified output auto-collapses settled workflows and marks folded content with ..... .

Sessions & collections

Each session carries a status light: green done · cyan running · red interrupted. Right-click a session for open · new branch (clone) · archive · delete. Drag sessions into collections; ungrouped sessions stay headless. Archived sessions are restored under Settings → Session Management. Deletion is guarded on the server.

Models & custom channels

Model and thinking selectors sit at the bottom of the composer — changes apply immediately. Ctrl+Shift+L cycles models. Settings → Models & Channels edits ~/.pi/agent/models.json: channel key, base URL, token, API type, model id/name, context window, max output tokens, reasoning and input types.

Settings areas

Seven areas: General · Personalization · Models & Channels · Session Management · Permissions · Prompt Favorites · Lab. The settings view swaps the sidebar into a navigation tree with a bottom back button.

Privacy & permissions

The panel listens on loopback addresses only. It never reads ~/.pi/agent/auth.json. Writes are limited to conversations via pi RPC, models.json when you save channels, and browser localStorage preferences.

FAQ

Is PiHub a replacement for pi?

No — PiHub is a web interface for the same local pi agent. pi keeps doing the work; PiHub gives it a window.

Does my data leave my machine?

No. The panel binds localhost only and never reads ~/.pi/agent/auth.json. Conversations travel from your browser to the local pi process and back.

Why does the port say 18384?

PiHub's default web port. The backend listens on 127.0.0.1:3001 and the page proxies /api to it.

Can I add my own model providers?

Yes — Settings → Models & Channels writes pi's models.json (base URL, token, API type, context window, max output tokens).