Using the Web Dashboard
Monitor multiple active terminal sessions, interact with background tasks, and perform visual code reviews without leaving your workflow. Using the local React UI allows you to manage long-running agents and inspect git diffs across multiple projects from a single browser window.
- Prerequisites:
- An active Terminal UI (TUI) session (the web features cannot be launched from CLI-only modes).
- Port
19190available on your machine (the default port for the global dashboard).
Quick Example
Start the global dashboard directly from your active TUI session:
/pidash start
Once the background server launches, the TUI status line shows a clickable pi-dash link to http://localhost:<pidash_port>. Click the label or open that URL in your web browser to manage your workspace.
Step-by-Step Guide
- Launch the Dashboard: Run the
/pidash startcommand inside your active session. The background server will initialize and establish a WebSocket connection with your terminal. - Navigate Sessions: Open the dashboard URL in your browser. The interface displays a list of all active sessions across your system. Clicking a session name switches the dashboard to that session's live stream; the
sessionsdropdown in the info bar additionally loads the current project's saved session files and can switch the terminal itself onto one. - Adjust Agent Settings: The info bar at the bottom has two dropdowns. The model dropdown lists every model your
modelRegistryreports as available (each row shows its provider) and switches the session to the one you pick. The thinking-level dropdown appears only for reasoning-capable models and sets the level directly. Both changes are applied to the running terminal session immediately. The same bar also shows token counts, context-window usage, the git branch, and links to the project's diff viewer. - Monitor Background Tasks: The
⏳ N asyncand⏰ N cronspopovers list running async agents and scheduled cron jobs with per-item Kill buttons, plus Kill All when more than one is present. - Send Prompts: You can type prompts directly into the web UI, including images. The dashboard forwards them to the watched session as follow-up instructions for the agent. Slash commands registered by extensions show up in the input bar's command palette,
ask_userprompts render inline and accept answers, and queued prompts wait for the current turn to finish. Stop (or theabortkeybinding) interrupts the running turn. - Rename a Session: Hover a session in the sidebar and click the pencil icon to rename it in place (
Enterto save,Escto cancel). - Stop the Dashboard: When you are finished, shut down the web server by running
/pidash stopin your terminal.
Advanced Usage
Dashboard vs. Diff Viewer
The project uses two distinct web interfaces depending on what you need to accomplish:
| Feature | /pidash (Web Dashboard) |
/pidiff (Diff Viewer) |
|---|---|---|
| Scope | Global (sees all active sessions) | Local (tied to the current project) |
| Port Mapping | Fixed (19190 by default) |
Dynamic (allocates a random free port) |
| Primary Use | Session switching, model/thinking config, background task monitoring | Visualizing git diffs, publishing inline code review comments |
| Commands | /pidash start, /pidash stop, /pidash restart, /pidash status |
/pidiff start, /pidiff stop, /pidiff restart, /pidiff status |
Using the Project Diff Viewer
While the main dashboard monitors your global state, the pidiff extension provides a dedicated interface for reviewing code changes within a specific repository. It runs a separate server to isolate project context.
Launch the diff viewer from your project session:
/pidiff start
- The TUI status line will display a clickable
pi-difflabel and dynamically allocated port for this specific project's diff viewer (http://localhost:<port>). - Click the
pi-difflabel or open the URL to inspect local git diffs side-by-side and annotate specific lines of code. - Once you publish review comments from the web UI, they are automatically injected into your TUI session as formatted instructions. The active agent will read the comments and begin resolving them.
To check the health and port of your active diff server at any time, run:
/pidiff status
Tip: If you need to forcefully reset the project diff viewer, run
/pidiff restart. This kills the local server and allocates a new random port.
Running in Containers
The pidash extension detects whether a session is running inside a container (it checks for /.dockerenv and /run/.containerenv) and shows a 📦 marker on that session in the dashboard. Ensure you expose the necessary ports when launching your container so your host machine's browser can connect:
- Map port
19190for the global dashboard. Note that the daemon itself listens on0.0.0.0, so the mapping is what makes it reachable from the host. - If using the diff viewer, map a specific port range and ensure your environment is configured to allow dynamic port allocation.
Note: To disable the web dashboard extensions entirely in headless environments or CI pipelines, set
PI_PIDASH_ENABLE=falseandPI_PIDIFF_ENABLE=falsein your environment variables (or setpidash_enable: falseandpidiff_enable: falseinpi-config-settings.json).
Troubleshooting
- Dashboard fails to start: Check if another application is using port
19190. You can change the port by setting thePI_PIDASH_PORTenvironment variable (orpidash_portinpi-config-settings.json) before starting your session. - Session not showing in UI: Ensure your terminal is running in TUI mode. The web interface relies on the TUI's event hooks to synchronize state.
- Cannot connect to diff viewer: The
pidiffserver uses local lockfiles in your project's.pi/tmp/directory (pidiff.port,pidiff.pid) to track the active port. If the server becomes unresponsive or port conflicts occur, run/pidiff stopto clear the lockfiles before starting it again. If a crashed run left apidiff.spawningguard behind, it is cleared automatically afterpidiff_stale_lock_timeout_ms(default 60s). - Session controls greyed out: a session that is not active is shown dimmed, and the info-bar controls are disabled. Start or activate the session in Pi first.
See Installation & Quickstart to learn more about basic chat commands, or read Managing Custom Agents to understand how background async tasks operate.