A lightweight CLI tool to monitor your Claude Code sessions across multiple projects.
- Live dashboard showing all active Claude Code sessions
- Web dashboard with
--webflag for rich session inspection in the browser - History view to browse past sessions with activity summaries
- Process detection distinguishes running vs inactive sessions
- Ghost detection identifies orphaned Claude processes
- Last message display shows recent Claude responses
- Git branch display shows current branch for each session
- Status indicators: Working, Needs Input, Waiting
- Session badges: Desktop [D], Unsandboxed [!S], Ghost [ghost]
- Zero dependencies - single binary, easy to install
- Cross-platform - macOS and Linux
brew tap yepzdk/tools
brew install csmDownload the latest binary from Releases and add to your PATH.
git clone https://github.com/yepzdk/claude-sessions-monitor.git
cd claude-sessions-monitor
make install# Live view (default)
csm
# Live view with web dashboard
csm --web
# Web dashboard on custom port
csm --web --port 3000
# List sessions once
csm -l
# Output as JSON
csm -l -json
# Show session history (last 7 days)
csm -history
# Show session history for last 30 days
csm -history -days 30
# Find and kill ghost (orphaned) processes
csm -kill-ghosts
# Custom refresh interval
csm -interval 5s
# Show version
csm -v| Key | Action |
|---|---|
h |
Switch to history view |
l |
Switch to live view |
w |
Open web dashboard in browser (when --web is active) |
Ctrl+C |
Quit |
Start with csm --web to run the web dashboard alongside the terminal UI. The dashboard is available at http://localhost:9847 by default.
Features:
- Live sessions with status indicators, context bars, and auto-refresh via SSE
- History view with search/filter and date grouping
- Session detail panels with metrics (token usage, tool breakdown, turn count) and full message timeline
- Timeline filters to show All, Assistant, or User messages
- Embedded in the binary via
go:embed— no external files or build step needed
| Symbol | Status | Description |
|---|---|---|
| ● | Working | Session is actively processing |
| ▲ | Needs Input | Waiting for user to approve a tool use |
| ◉ | Waiting | Turn completed, waiting for next prompt |
| ◌ | Inactive | No Claude process running (shown in history) |
Claude Code Sessions
● Working: 1 ▲ Needs Input: 1 ◉ Waiting: 0
STATUS PROJECT LAST ACTIVITY LAST MESSAGE
───────────────────────────────────────────────────────────────────────────────────────────
● Working myorg/api-server @main 5s ago Implementing auth middleware
▲ Needs Input work/claude-sessions-monitor @feat 12s ago Let me check the git status
h: history | Ctrl+C: quit
# Build for current platform
make build
# Build for all platforms (darwin/linux, amd64/arm64)
make build-all
# Clean build artifacts
make cleanThe tool monitors ~/.claude/projects/ where Claude Code stores session logs. It parses the JSONL log files to determine each session's current state based on the most recent entries.
MIT