Mirror from GitHub
  • JavaScript 44.9%
  • CSS 25.5%
  • TypeScript 25.1%
  • HTML 4.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
deflating f68152d543 fix: prevent subagent children from starting mirror server (#40)
Added PI_SUBAGENT_CHILD=1 detection in session_start handler.
When pi-subagents spawns child processes, they will no longer attempt
to start a Tau mirror server, preventing the parent from being
SIGTERM'd by port-conflict logic.

Also bumps version to 1.0.9 to fix the stale npm package with the
missing closing bracket (#36 — the source was already balanced but
the published package was broken).

Closes #40, closes #36
2026-06-22 17:16:38 +10:00
.pi Initial commit: Tau web UI for Pi coding agent 2026-03-02 03:11:37 +10:00
docs/images Add screenshots: dark, terracotta, settings, commands 2026-03-03 09:42:49 +10:00
extensions fix: prevent subagent children from starting mirror server (#40) 2026-06-22 17:16:38 +10:00
extras Pre-audit checkpoint 2026-03-03 17:22:51 +10:00
public Merge community contributions: PR #42, #44, #45 2026-06-22 17:13:45 +10:00
.gitignore chore: add .claude files to .gitignore (closes #27) 2026-05-29 10:39:35 +10:00
.npmignore Fix tau mirror static asset packaging and mobile websocket stability 2026-03-05 17:20:27 +01:00
CLAUDE.md docs: split CLAUDE.md dev setup by OS (Windows/macOS) (#32) 2026-05-29 10:44:14 +10:00
MOBILE.md Mobile overhaul: slide-over sidebar, tinted backgrounds, iOS optimisations, WebSocket auto-reconnect, updated README 2026-03-03 08:16:25 +10:00
package-lock.json 1.0.5 2026-03-06 16:22:59 +10:00
package.json fix: prevent subagent children from starting mirror server (#40) 2026-06-22 17:16:38 +10:00
README.md #9 (#22) 2026-05-29 10:41:01 +10:00
ROADMAP.md Mobile overhaul: slide-over sidebar, tinted backgrounds, iOS optimisations, WebSocket auto-reconnect, updated README 2026-03-03 08:16:25 +10:00

Tau

A web UI that mirrors your Pi terminal session in the browser. No separate server — it runs as a Pi extension inside your existing process.

Tau dark mode

Tau terracotta theme

Settings

Commands

What it does

Tau connects to your running Pi TUI and gives you a second view in the browser. Same session, same messages, same tools — just a different screen. Type in the terminal or the browser, both stay in sync.

  • Live mirroring — streams messages, tool calls, and thinking blocks in real-time
  • Works on any device — open it on your phone, tablet, or another monitor
  • Session browser — view history from any past session
  • No extra process — the Pi extension is the server

Install

pi install npm:tau-mirror

Or from git:

pi install git:github.com/deflating/tau

Usage

  1. Start Pi normally in your terminal
  2. Open the URL shown in the status bar (default: http://localhost:3001)
  3. That's it

Type /qr in the terminal to show a QR code and scan it to access via your phone.

Features

Chat

  • Full markdown rendering with syntax-highlighted code blocks
  • Streaming responses with typing indicator
  • Image attachments (paste, drag & drop, or button)
  • Copy any message with one click
  • Inline diff viewer for edit tool calls (red/green lines)
  • Scroll-to-bottom button with new message indicator
  • Message queuing — type while the agent is working, messages queue and auto-send

Session Management

  • Browse all past sessions grouped by project
  • Full-text search across all session history with highlighted snippets
  • Sorted by last modified (most recent first)
  • Live session marked with a green dot
  • Historical sessions are read-only
  • Inline session rename
  • Favourite sessions, tags, and filtering

Model & Thinking

  • Model picker with search/filter and keyboard support
  • Thinking level toggle (off/low/medium/high)
  • Token usage percentage with context window visualiser
  • Cost tracking per session

Voice Input

  • Mic button in the input area using Web Speech API (on-device dictation)
  • Live transcription into the textarea
  • Pulses red while recording

File Browser

  • Right sidebar with lazy-loaded file tree
  • Navigate directories, open files natively
  • Drag files onto the input to insert their path

Compaction

  • Manual context compaction with status display
  • Auto-compaction support

PWA

  • Installable as a standalone app on iOS, Android, and macOS
  • Custom app icons
  • Service worker with network-first caching

Configuration

Environment variables (set before starting Pi):

Variable Default Description
TAU_MIRROR_PORT 3001 Server port
TAU_HOST 0.0.0.0 Bind address. Set to 127.0.0.1 to restrict to localhost only
TAU_STATIC_DIR (bundled) Override static files path
TAU_DISABLED 0 Set to 1 to disable Tau (it stays installed but won't start the server)
TAU_USER (none) HTTP Basic Auth username (both TAU_USER and TAU_PASS required to enable)
TAU_PASS (none) HTTP Basic Auth password

Authentication

Tau supports optional HTTP Basic Auth (browser-native login popup).

1. Set credentials — add to ~/.pi/agent/settings.json:

{
  "tau": {
    "user": "pi",
    "pass": "your-password"
  }
}

Or via environment variables: TAU_USER=pi TAU_PASS=secret pi

2. Toggle on/off — once credentials are configured, a "Require login" toggle appears in Settings within the Tau web UI. Flip it on to start requiring authentication, off to open it back up. The setting persists across restarts.

Both HTTP and WebSocket connections are gated when enabled. The /api/health endpoint remains open for monitoring.

Start / Stop

Control Tau at runtime without uninstalling:

/tau-stop     Stop the mirror server
/tau-start    Start it again

To prevent Tau from auto-starting (e.g. in multi-session or dev container workflows):

TAU_DISABLED=1 pi

You can still start it manually with /tau-start in that session.

How it works

Tau is a Pi extension that starts an HTTP + WebSocket server inside the Pi process. The extension subscribes to all Pi events and forwards them to connected browser clients. Commands from the browser are executed via the extension API against the same agent session.

┌─────────────┐     ┌──────────────────────────────┐     ┌─────────────┐
│  Pi TUI     │     │  Pi Process                  │     │  Browser    │
│  (terminal) │◄───►│                              │◄───►│  (Tau)      │
│             │     │  tau extension               │     │             │
└─────────────┘     │    ↳ HTTP + WS on :3001      │     └─────────────┘
                    └──────────────────────────────┘

There's no separate server to run. The extension auto-loads when Pi starts and shuts down when Pi exits.

Development

Clone and point the extension at the local static files:

git clone https://github.com/deflating/tau.git
cd tau
TAU_STATIC_DIR=$(pwd)/public pi

Edit the files in public/ — refresh the browser to see changes.

License

MIT