documentation

Set up Pi Scope.

Everything you need to run the server, feed it an agent, and find the exact command, flag or environment variable you came for. For what the app looks like and what it does, see the showcase.

Prerequisites

Pi Scope is two pieces: a server + dashboard you open, and a pi extension that feeds it agent telemetry. Here is exactly what each path needs.

Path What you need Install anything?
Linux desktop (AppImage) A Linux desktop, x86_64 No — Node 24 is bundled inside
Linux / macOS Node.js 24+, git Yes — Node.js 24+, then clone it and run ./pi-scope
Windows Windows 10/11 + Node.js 24+, git Yes — Node.js 24+, then clone it and run .\pi-scope.cmd
From source (developers) Node.js 24+, git Yes — Node.js 24+, then the same clone and launcher
Feed it agent data The pi coding agent — bundled No — Pi Scope ships its own pi
Any other tool Anything that can POST /events A ~10 line script

Node 24+ is the only real requirement — Pi Scope uses node:sqlite, which ships inside Node 24, so there are zero native build steps in the default path. Linux, macOS and Windows all run the same server, dashboard and desktop window; ./pi-scope is the cross-platform launcher (.\pi-scope.cmd on Windows) — one Node script, one shim per platform — so every mode and flag below is the same on all three.

Install Node.js 24+

Pi Scope runs on Node 24 or newer — it uses the built-in node:sqlite, which arrived in 24, so there is no compiler and no native build step anywhere, but an older Node will refuse to start. Check what you already have:

node -v                              # v24.x or newer — nothing to do

Windows — the official LTS installer, or nvm-windows if you keep several Node versions side by side:

winget install --id OpenJS.NodeJS.LTS -e
# or, with nvm-windows:
winget install --id CoreyButler.NVMforWindows -e
nvm install 24 && nvm use 24

macOS — Homebrew, which installs the current release (Node 26 satisfies "24 or newer"):

brew install node                    # or: brew install node@24  (pins the LTS)

macOS & Linux — nvm, per-user and version-pinned. No root, and no pipeline into a shell:

git clone https://github.com/nvm-sh/nvm.git ~/.nvm
cd ~/.nvm && git checkout v0.40.8
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"     # put these two lines in ~/.bashrc / ~/.zshrc
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm install 24                       # then: nvm alias default 24

Anything that gets you a node of 24 or newer works — nodejs.org/en/download has per-platform installers and standalone archives. The launcher finds Node the way your shell does (nvm-aware on macOS and Linux, PATH on Windows) and stops with a clear message if the version is too old.

Install & run

With Node 24+ in place, get the server running first, then point an agent at it.

Zero-install AppImage (Linux, easiest)

chmod +x Pi-Scope-1.0.0.AppImage
./Pi-Scope-1.0.0.AppImage

Clone and run

git clone https://github.com/NerdAtWork24X7/Pi_Scope.git Pi_Scope
cd Pi_Scope && ./pi-scope              # desktop app (Electron window)

Nothing to install first: ./pi-scope is the cross-platform launcher (.\pi-scope.cmd on Windows) — one Node script, one shim per platform — and it fetches Pi Scope's dependencies on first launch — Electron for the desktop window, the build tooling, and Pi Scope's own copy of the pi coding agent (~220 MB under ~/.pi-scope/pi) — plus the shared Python environment (~/.pi-scope/.venv, built with uv) and the Playwright browsers (~/.pi-scope/playwright-browsers) that the web-fetch extension, video-creator skill and browser extension share. Node 24+ is the only prerequisite. Prefer the terminal or a server? The same launcher runs headless — ./pi-scope --web opens the WebUI in your browser, ./pi-scope --server stays in the foreground; every mode and flag is listed under Launcher flags. On a machine with no display (a server, container or SSH session) the desktop window cannot open, so start with ./pi-scope --server.

Windows

git clone https://github.com/NerdAtWork24X7/Pi_Scope.git Pi_Scope
cd Pi_Scope
.\pi-scope.cmd                          # desktop app (Electron window)

pi-scope.cmd is the same launcher, for a double-click and for cmd.exe. Windows needs no build tools: the native modules ship prebuilt, and the terminal, the bundled pi (installed as pi.cmd) and the Office all run through cmd.exe with every argument escaped.

First-run agent template

Pi Scope runs its bundled pi in its own agent dir (~/.pi-scope/agent, or SCOPE_AGENT_DIR). The repo ships a starter config — settings, skills, extensions, agents and themes — in examples/pi_local/agent, and the launcher seeds it on first run: the template is copied in whenever the agent dir has no extensions/ yet — the tell that nothing has set it up. The launcher (./pi-scope) applies that rule, so an agent dir the server created on first boot (with a little state of its own, such as auth.json) is still seeded.

Once the dir has extensions it is left alone, so a configured agent dir is never disturbed, and the launcher never overwrites an existing file. The skills' large, platform-specific .venv and the obscura *.tar.gz bundles are skipped.

What is Windows-aware (and what is not)

Running the server directly (developers)

./pi-scope --dev --server               # server with --watch, no Electron window

--dev only adds --watch; it does not by itself leave desktop mode, so pair it with --server (or --web) — on its own it still opens the Electron window. Open the URL it prints (http://127.0.0.1:43190/?token=<uuid>) and you are looking at a live (empty) dashboard. The DB defaults to db/scope.db (relative to the repo root); override with SCOPE_PORT, SCOPE_HOST, SCOPE_DB_PATH or SCOPE_AUTH_TOKEN. Prefer the raw entry point? The server is apps/scope-server/server.ts, run under Node 24.

Launcher flags

./pi-scope is the single entry point for every mode — it finds Node (nvm-aware on Linux/macOS), boots the server and the app together, and on Ctrl-C stops only the server it started. Windows runs the same modes through .\pi-scope.cmd. The one exception to "no setup": desktop mode fetches its dependencies once, on first run only, to get Electron. The server is started at most once: if one is already healthy on the target port, its token is adopted instead of a second instance being spawned, and a server orphaned by a kill -9 is reaped on the next run.

./pi-scope                              # desktop app (Electron window, default)
./pi-scope --web                        # headless server + open the WebUI in a browser
./pi-scope --server                     # headless server only, stays in the foreground
./pi-scope --dev --server               # server with --watch (--dev needs --server/--web)
./pi-scope --keep-server                # leave the server up after the script exits
./pi-scope --port 8080 --host 127.0.0.1 # bind local-only (default is all interfaces)
./pi-scope --db /path/to/scope.db --token my-token

On Windows the same flags go to the launcher shim:

.\pi-scope.cmd                           # desktop app (Electron window, default)
.\pi-scope.cmd --web                     # headless server + open the WebUI in a browser
.\pi-scope.cmd --server                  # headless server only, stays in the foreground
.\pi-scope.cmd --dev --server            # server with --watch (--dev needs --server/--web)
.\pi-scope.cmd --keep-server             # leave the server up after the script exits
.\pi-scope.cmd --port 8080 --host 127.0.0.1

Per-machine defaults can live in apps/scope-desktop/scope.env (see scope.env.example); real environment variables always win. This matters for the desktop icon, which inherits no shell environment.

Port already in use (running a second instance)

The desktop app checks its port before it boots. If something is already there, it does not silently take over or fail — it shows a small console-styled popup that names what holds the port and offers these ways forward:

The popup also lists every Pi Scope server this machine has listening right now — port, version and pid — each with its own Kill button, so a stray instance started earlier can be shut down from the same place. The list is found by probing the configured port and the ones above it, plus any port named by a scope_token.<port> file left by an isolated instance; each one is asked to shut down gracefully using its own token. If you free the busy port this way, the popup switches to Continue on <port> and you can start here after all.

To pin a different port permanently, set SCOPE_PORT (see Server environment variables). The headless launcher (./pi-scope) keeps its own rule: it reuses a healthy server on the target port and never prompts.

Take a test drive (no agent needed)

Want to see it before wiring up an agent? Seed the dashboard with a realistic demo session — a coder adding dark mode, its tester subagent, and a second project with a failed command:

# server running? then:
node docs/seed-demo.mjs

Instantly populated — click around every view. Re-running is safe (events are idempotent).

Attach a real agent

The dashboard comes alive when a pi agent feeds it. This extension hooks the agent lifecycle and streams telemetry, auto-discovering the server's auth token.

Pi Scope bundles its own pi coding agent. The Chat view, the git-commit-message generator and the in-browser Terminal all launch that bundled copy — with the Pi Scope extension force-loaded — so there is nothing to install and a separate global pi is never used. The bundled agent is installed into Pi Scope's own data directory — ~/.pi-scope/pi (%USERPROFILE%\.pi-scope\pi on Windows) — where Settings → Update can replace it in place; a packaged app seeds that copy from the read-only resources/pi it ships, so a first launch needs nothing downloaded and no global pi at all. Point elsewhere with SCOPE_PI_BIN.

The same Settings → Update tab lists the external coding harnesses Chat can drive (claude, codex, gemini, opencode, cline, kilo, aider, cursor-agent) once they are installed on this machine. Each row shows the version the CLI reports and its published release; Update runs that CLI's own updater (claude update, opencode upgrade, …) so an npm, native or Homebrew install stays the install it was. Gemini CLI, which ships no updater command, is updated through npm. Only harnesses Pi Scope can find are listed, and a custom harness defined in Settings → Plugins → Workflow is never touched.

The picker above the Chat composer switches a conversation to any installed harness, and every reply keeps the glyph of the CLI that produced it. A harness that publishes commands fills the composer's / menu; ACP (Agent Client Protocol) sessions (Gemini CLI, opencode, Kilo Code) also advertise their own modes and take model switches over the protocol. Cline's ACP server cannot answer a prompt, so its turns run its headless mode instead (its models and commands are still read over ACP), with the reasoning it streams dimmed into the thinking lane rather than the reply. External turns are recorded like Pi's, so the conversation appears in the workspace rail and replays in Single and Trajectory.

The bundled agent also keeps its own agent dir (~/.pi-scope/agent, see SCOPE_AGENT_DIR). Its settings, API keys, model store, sessions and extensions live there, so it never reads or writes your global pi agent dir — the two installations do not interfere, and a pi-scope.ts listed in your global config can't collide with the force-loaded copy.

The steps below are only for a pi you installed yourself and run outside Pi Scope (for example in your own terminal). That agent runs as normal — nothing to learn, no new commands.

One session

pi -e /path/to/Pi_Scope/extension/pi-scope.ts

Every session — add it to your agent config

// your pi agent dir's settings.json
{
  "extensions": [
    "/absolute/path/to/Pi_Scope/extension/pi-scope.ts"
  ]
}

Or copy extension/pi-scope.ts into your pi agent dir's extensions/ folder and list it as "+extensions/pi-scope.ts".

The extension finds the token from tmp/scope_token (dev) or ~/.pi-scope/scope_token (AppImage), so you usually set nothing else. Point it elsewhere with --obs-server-url or OBS_SERVER_URL (default http://127.0.0.1:43190). Full flag and event reference: extension/README.md.

Any tool can feed it

Just POST JSON events to /events:

{ "event_id": "evt-1", "session_id": "sess-1", "seq": 0,
  "ts": "2026-09-07T12:00:00.000Z", "type": "user_message",
  "payload": { "text": "hi agent" } }

Use it from your phone

Pi Scope binds every interface by default, so a phone on the same Wi-Fi can open the Chat view live, alongside the desktop — no configuration needed.

1. Start it and scan the QR

Start Pi Scope and click the phone icon in the header. A QR appears — point your phone's camera at it and Pi Scope opens in a mobile layout, not a shrunk copy of the desktop screen. The QR carries only the address; the phone then asks for the short-lived pairing code printed beside it, and trades that code for a short-lived access token plus a refresh token it keeps. It works like a one-time password: six digits, two minutes, spent by the first phone that uses it — the panel then shows the next one — so one code pairs exactly one device, and a photo of the QR alone is not a way in. The phone never receives this server's master token: its access token lapses in half an hour and is renewed silently from the refresh token, which the panel can disconnect. The same URL can be opened by hand at https://<lan-ip>:43201/m (the HTTPS port is the HTTP port + 1). If the machine has more than one network interface (Wi-Fi, ethernet, docker), pick the address the phone can actually reach.

The link is HTTPS, so the code and the tokens it buys are encrypted on the Wi-Fi. This machine signs its own certificate — no authority issues one for a LAN address — so the phone shows “your connection is not private” on the first open: tap Advanced → Proceed (Safari: Show Details → visit this website) and the phone layout works. That warning is expected once per browser session and is not a connection failure; SCOPE_TLS=0 turns the HTTPS listener off.

To drop the warning for good — and to be allowed to install the app, which Chrome only offers on an origin it trusts — trust the local CA once. Open http://<lan-ip>:<port>/scope-ca.crt (the plain-HTTP port; the certificate is public), then on Android: Settings → Security → Encryption & credentials → Install a certificate → CA certificate, and pick the downloaded file. On iOS: install the profile under Settings → General → VPN & Device Management, then enable it in General → About → Certificate Trust Settings. The CA survives restarts and address changes — only the server certificate behind it is re-minted. Point SCOPE_TLS_CERT/SCOPE_TLS_KEY at a certificate the phone already trusts to skip this step entirely.

2. Install it like an app

With the CA trusted (above — the install is not offered without it), add the phone layout to the home screen — Chrome: ⋮ → Add to Home screen; iOS Safari: Share → Add to Home Screen. It then launches full-screen without an address bar, with its own icon and splash screen, straight into the phone layout. Nothing extra is downloaded for this: the app stays live from this machine, so the service worker behind it caches exactly one thing — a “can’t reach your computer” card shown when a launch cannot find the server, instead of a blank page.

Keep it on this machine only (optional)

The LAN bind is what makes the QR reachable. To go back to a this-machine-only bind, set SCOPE_HOST=127.0.0.1 — in apps/scope-desktop/scope.env (read at launch, so it works from the desktop icon too), or in the environment (SCOPE_HOST=127.0.0.1 ./run.sh, or SCOPE_HOST=127.0.0.1 node server.ts in apps/scope-server). Real environment variables always win over the file. With a loopback bind the phone panel explains that a QR would open nothing rather than showing a dead one.

What the mobile layout is

The layout is chosen at the document, three ways:

How you open it What you get
/m (the QR) The pairing screen, then the mobile layout once the code is typed
/?token=… on a phone The mobile layout (User-Agent / Client Hint)
/?token=…&ui=desktop The desktop UI, even on a phone

The 🖥 button in the mobile header opens the same session in the desktop layout; ui=mobile does the reverse, so neither is a one-way door.

This exposes a shell. Because Pi Scope binds every interface by default, anyone on that network who knows the token can drive your agents. The mobile layout is smaller than the desktop UI, not harmless: prompts run real commands on this host, it can retarget a project's team/mode, and it can delete sessions — and the desktop layout (reachable with ui=desktop) adds Terminal, a real shell, plus file edits and git operations. Only run on a network you trust (or set SCOPE_HOST=127.0.0.1 to stay local). The QR carries no credential at all — it is the address, and the six-digit code beside it is typed on the phone (two minutes, single use: it dies the moment a phone spends it), which then keeps the token in its own storage. The phone hop is HTTPS (self-signed), so the code and token are encrypted on the Wi-Fi — that stops a passive listener on the network, not someone who controls the access point. The token is minted randomly at boot; pin SCOPE_AUTH_TOKEN in scope.env if you want a stable value across restarts.

Screenshots & video

The images on the showcase were captured from a live instance. The video walkthroughs are MP4s in the repo:

Server environment variables

Var Default Description
SCOPE_PORT 43190 HTTP port
SCOPE_HOST 0.0.0.0 Bind address. Defaults to all interfaces (serves your LAN, so the phone QR works); 127.0.0.1 keeps it local-only
SCOPE_TLS_PORT SCOPE_PORT + 1 Port of the phone-facing HTTPS listener. The desktop window, the launcher's health probes and the tests keep using the plain-HTTP port
SCOPE_TLS enabled 0 disables the phone-facing HTTPS listener; phones then get a plain http:// link
SCOPE_TLS_CERT / SCOPE_TLS_KEY generated Serve this certificate/key pair instead of the self-signed one (set both) — e.g. a mkcert or internal-CA pair the phone already trusts
SCOPE_TLS_DIR ~/.pi-scope/tls Where the generated pair is cached; re-minted when the machine's LAN addresses change, because the certificate names them
SCOPE_DB_PATH db/scope.db SQLite database path
SCOPE_AUTH_TOKEN random UUID Bearer token for auth
SCOPE_FILE_ROOT project root Comma-separated allowed roots for /files/* and /checkpoints/*
SCOPE_AGENT_DIR ~/.pi-scope/agent Pi Scope's own pi agent dir (settings, API keys, model store, sessions). The bundled pi is pinned here via PI_CODING_AGENT_DIR, so it never touches the global pi agent dir
SCOPE_SETTINGS_JSON <agentDir>/settings.json Override the pi settings file the agent-team sidebar reads/writes
SCOPE_SKILLS_DIR <agentDir>/skills Override the skills directory scanned for the agent-team sidebar
SCOPE_PLUGINS_DIR ~/.pi-scope/plugins Where user plugins live. Enable/disable state is in plugins.json and every plugin's own settings live in .data/<id>.json (api.store). A user plugin with a built-in's id overrides it, which is how one is swapped or upgraded
SCOPE_BUILTIN_PLUGINS_DIR beside the server module Override where the built-in feature plugins are discovered (the packaged build ships them in server-bundle/plugins)
SCOPE_EXTRA_PATH — Colon-separated extra dirs prepended to PATH for chat-spawned pi subprocesses (e.g. a non-standard venv: SCOPE_EXTRA_PATH=/path/to/.venv/bin)
SCOPE_PYTHON_VENV <agentDir>/../.venv The shared Python venv, built with uv on launch by pi-python-install.mjs, for every Python-dependent element (web-fetch, video-creator). Derived from the agent dir's parent — ~/.pi-scope/.venv under Pi Scope, ~/.pi/.venv under a global pi. Its bin is prepended to the chat/agent PATH. Override to relocate it
PLAYWRIGHT_BROWSERS_PATH <agentDir>/../playwright-browsers Where Playwright's Chromium build lives. Installed on launch by pi-python-install.mjs and shared by the browser extension and the Python elements. Derived from the agent dir's parent. An inherited value wins; the user's shell rc / Playwright's default cache is used only when Pi Scope's own dir has no build
SCOPE_PI_BIN bundled pi Override the pi executable Pi Scope launches for Chat, commit messages and subagents
SCOPE_PI_BUNDLE_DIR auto-detected Where the bundled pi lives. Auto-detected as ~/.pi-scope/pi (the install Pi Scope seeds and updates), then an older checkout's apps/scope-desktop/pi-bundle; the packaged launcher also uses it to point at its read-only resources/pi when the managed copy cannot be seeded
SCOPE_PI_REGISTRY https://registry.npmjs.org npm registry used by Settings → Update to look for a newer bundled pi
SCOPE_NPM_BIN npm npm executable Settings → Update runs (bundled pi and npm-managed harnesses)
SCOPE_HARNESS_REGISTRY https://registry.npmjs.org npm registry the harness cards use to find each CLI's newest release
SCOPE_HARNESS_PYPI https://pypi.org PyPI base URL used for Aider's release check
SCOPE_PYTHON_BIN python3 Python used for a PyPI-managed harness update
SCOPE_MODEL_CATALOG on Set to off to stop the app refreshing pi's model catalogs while it is open. Pi Scope runs pi with PI_OFFLINE=1, so pi no longer refreshes them by itself in-app — Settings → Models → Model update still refreshes them on demand
SCOPE_MODELS_STORE <agentDir>/models-store.json Override pi's model store path (read for pricing/context windows)
SCOPE_MODEL_UPDATE_CACHE <agentDir>/model-update-cache.json Override the pi-updater release cache path
SCOPE_MODELS_DEV_URL https://models.dev/api.json Catalog the release cache is refreshed from (point at a mirror for air-gapped installs)

Chat-spawned pi subprocesses also get the workspace venv bin dirs prepended to PATH, and PLAYWRIGHT_BROWSERS_PATH restored from the user's shell rc files (or Playwright's default cache dirs) when the server env lacks it — so web-fetch finds its Chromium browser even when the server was launched from a GUI session that never sourced the shell rc.

The full HTTP API — all endpoints, auth rules and the SSE stream — is documented in apps/scope-server/README.md.

Tips & FAQ

For AI agents & contributors

This repository is structured so an AI coding agent can onboard quickly. The server API, environment variables and full endpoint list live in apps/scope-server/README.md; the telemetry extension and its flags are documented in extension/README.md.

Every feature is a plugin, so the fastest way to change Pi Scope's behaviour is usually to write one rather than edit the core. Start with apps/scope-server/plugins/README.md — it covers manifests, the api.route / api.onEvent / api.store / api.log API, client bundles and where state is persisted — and copy the working example in examples/plugins/hello-insights/.

License & bundled assets

Pi Scope itself is MIT licensed. A few third-party assets ship with it under their own terms:

← Back to the showcase, or read the README on GitHub.