Skip to content

Latest commit

 

History

29 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

claude-dashboard

Requires Node 20+, macOS (uses ps/lsof for live-session detection), and the Claude Code CLI.

Local dashboard for Claude Code sessions on this machine: live session monitoring, history, usage charts, one-click resume commands, and on-demand LLM usage analysis.

claude-dashboard screenshot

Screenshot shows sample data. Named sessions (via /rename) display their custom name; everything else falls back to the session's first prompt.

Run

npm install
npm run dev

Open http://localhost:5173. API server runs on :3456.

How it works

  • Reads transcripts from ~/.claude/projects/*/*.jsonl (incremental, append-only parsing).
  • Detects live sessions by matching claude processes (ps + lsof cwd) to transcript directories; falls back to "modified in last 2 minutes" if process detection is unavailable.
  • "Analyze my usage" runs claude -p headless over a digest of the last 14 days and caches the report to server/data/last-analysis.json.

Security

  • The server binds to 127.0.0.1 only (never 0.0.0.0) and enforces a Host allowlist to prevent DNS-rebinding attacks.
  • POST /api/analyze requires the x-claude-dashboard: 1 header (the UI sends it automatically); bare curl without the header is rejected with 403.

Test

npm test

All tests live in server/test/ and are run with vitest.

Spec: docs/superpowers/specs/2026-06-11-claude-dashboard-design.md

License

MIT — see LICENSE.

Known limitations (v1)

  1. Same-directory concurrent sessions: Two concurrent Claude sessions in the same working directory appear as a single active session — cwd (from lsof) is the only signal used to match a process to a transcript, so the most-recently-active transcript in that directory wins.
  2. Subagent transcripts not counted: Transcripts stored under projects/*/<session>/subagents/ are not scanned. Token usage and session counts reflect only top-level session files.
  3. Sessions and stats panels load once per page load: The Recent Sessions table and Charts panel fetch data once at startup and do not auto-refresh — reload the page to see new data. The Active Sessions panel auto-polls every 5 seconds.

About

Local web dashboard for Claude Code sessions: live monitoring, history, usage charts, resume commands, and LLM usage analysis

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages