How nerdatwork24x7/pi_scope works
Pi Scope is a local observability dashboard and control surface for AI coding-agent sessions. An agent extension—or another event-producing tool—sends telemetry to the server; the server stores events and broadcasts them for live viewing and replay. From the dashboard, users can also chat with an agent and operate on the host workspace through terminal, file review, checkpoints, and Git tools. The README documents these major capabilities; some endpoint wiring is not visible in the sampled excerpts, so uncertain links are omitted.
Main entry points: server.ts Scope server · app.js Dashboard shell · stt.ts Speech transcription · main.js Electron launcher
Components 25
Telemetry capture
- Pi extension
extension/pi-scope.ts - LLM capture parser
shared/capture.ts
Local service
- Scope server
apps/scope/server.ts - Event database
apps/scope/db.ts - Event model
shared/types.ts - API key settings
apps/scope/api-keys.ts
Browser dashboard
- Dashboard shell
apps/scope/public/app.js - Chat view
apps/scope/public/chat.js - Trajectory view
apps/scope/public/trajectory.js - Settings view
apps/scope/public/settings.js - Terminal view
apps/scope/public/terminal.js - File review
apps/scope/public/files.js - Git client
apps/scope/public/git.js - Checkpoints view
apps/scope/public/checkpoints.js
Workspace controls
- Agent chat runtime
apps/scope/chat.ts - Shell service
apps/scope/terminal.ts - Speech transcription
apps/scope/stt.ts - Workspace files
- Git repository
Desktop launcher
- Electron launcher
apps/scope-launcher/main.js - Server lifecycle
apps/scope-launcher/scope-control.js
Other components
- Developer
- Pi agent
- Event producer
- Groq transcription API
Connections 32
- Developer → Pi agent: runs
- Pi agent → Pi extension: emits events
- Pi extension → Scope server: POSTs telemetry
- Event producer → Scope server: POSTs events
- Event producer → Scope server: POSTs LLM payloads
- Scope server → LLM capture parser: parses payloads
- Scope server → Event database: stores events
- Scope server → Event database: reads sessions
- Scope server → Dashboard shell: streams events
- Dashboard shell → Scope server: requests data
- Developer → Dashboard shell: uses
- Chat view → Scope server: sends prompts
- Scope server → Agent chat runtime: dispatches chat
- Agent chat runtime → Pi agent: controls process
- Trajectory view → Scope server: requests history
- Settings view → Scope server: reads and updates
- Scope server → API key settings: reads keys
- Terminal view → Scope server: opens terminal
- Scope server → Shell service: handles terminal
- Shell service → Workspace files: runs shell commands
- File review → Scope server: requests file diffs
- Scope server → Workspace files: reads and writes
- Git client → Scope server: requests Git actions
- Scope server → Git repository: runs Git operations
- Checkpoints view → Scope server: manages checkpoints
- Scope server → Git repository: creates and restores
- Scope server → Speech transcription: handles transcription
- Speech transcription → API key settings: reads stored key
- Speech transcription → Groq transcription API: sends audio
- Electron launcher → Server lifecycle: starts server
- Server lifecycle → Scope server: spawns or reuses
- Electron launcher → Dashboard shell: opens dashboard