Local Dashboard
Everything about klaro dashboard — a local web UI over your own .klaro/ data.
← Back to KlaroShield
Installation
The dashboard ships as part of @klaroshield/sdk — no separate install.
npm install @klaroshield/sdk
Starting the dashboard
Run it from any directory that has a
.klaro/ folder (i.e. one your wrapped calls have already run in at least once):npx klaro dashboard # or on a specific port: npx klaro dashboard --port 4000It opens your default browser automatically (macOS/Windows/Linux). If that fails for any reason, the URL is printed so you can open it manually. Ctrl+C stops the server.
Architecture
A single Node built-in
http.createServer — no Express, no bundler, no build step, and no third-party dependency in the request path at all. Two routes: / serves one self-contained HTML/CSS/JS page, and /api/data returns the current computed dashboard state as JSON. The page polls /api/data every 3 seconds.Storage location
Reads directly from
.klaro/logs.jsonl, .klaro/budget.jsonl, and .klaro/budget-config.json in the directory you ran the command from — the same files klaro stats and klaro doctor read. Nothing is written by the dashboard itself; it's read-only.Performance
The whole page is one HTML file with inline CSS/JS — no framework runtime, no hydration. Each
/api/data call re-parses the JSONL files fresh; for very large log files this means the 3-second poll does real file I/O each time, which is fine for a local dev tool run for a few minutes but isn't tuned as a long-running production process.Security
Binds to your machine only. No authentication layer exists because none is needed — the only thing that can reach it is a browser on the same machine (or an explicitly port-forwarded network, which is on you, not the SDK). No data leaves your process; there is no telemetry call, no analytics beacon, and no external request anywhere in the dashboard's code path.
Privacy
Redacted request rows show a badge naming which rule fired (e.g. "PII", "secrets") and how many matches — never the raw value. This is deliberate: showing a raw-vs-redacted diff would require persisting the exact sensitive value the SDK exists to avoid persisting, so that feature doesn't exist and won't.
Customization
Currently one option:
--port / -p (default 3456). The page itself isn't currently configurable (no themes, no column selection) — it's a diagnostic tool, not a dashboard builder.Troubleshooting
Port already in use: pass a different port —
Empty dashboard / "No calls recorded yet": the dashboard reads whatever's already in
npx klaro dashboard --port 4000.Empty dashboard / "No calls recorded yet": the dashboard reads whatever's already in
.klaro/logs.jsonl in the current directory — run it from the same directory your wrapped AI calls run in, after at least one call has gone through klaro.wrap(...).