seunggabi/claude-dashboard: k9s-style TUI for managing Claude Code sessions via tmux


k9s-style TUI for managing Claude Code sessions with real-time monitoring, conversation history, and process-based session detection.

License: MIT
GitHub Stars
Go
Latest Release
tmux


claude-dashboard demo

# Install via Go
go install github.com/seunggabi/claude-dashboard/cmd/claude-dashboard@latest

# Add Go bin to PATH (if not already configured)
export PATH="$HOME/go/bin:$PATH"

# To make it permanent, add to your shell profile:
# echo 'export PATH="$HOME/go/bin:$PATH"' >> ~/.zshrc   # zsh
# echo 'export PATH="$HOME/go/bin:$PATH"' >> ~/.bashrc  # bash

Or build from source:

git clone https://github.com/seunggabi/claude-dashboard.git
cd claude-dashboard
make install

Upgrade to latest:

go install github.com/seunggabi/claude-dashboard/cmd/claude-dashboard@latest

First run:

claude-dashboard   # Launch the TUI dashboard

Running multiple Claude Code sessions across different projects quickly becomes unmanageable:

  • Lost sessions – Terminal closed? Session gone. What was Claude doing?
  • No overview – Which session is active? How long has it been running? What are resource usage patterns?
  • Context switching – Constantly hunting through terminal tabs, tmux windows, and scattered .jsonl logs.
  • Session discovery – Sessions hidden in tmux, terminal tabs, or started by other tools.

claude-dashboard gives you a single pane of glass for all your Claude Code sessions:

  • Unified session detection – Finds Claude sessions in tmux, terminal tabs, and anywhere in the process tree
  • Conversation history – View Claude’s past interactions directly from the dashboard
  • Real-time monitoring – CPU, memory, status, and uptime at a glance
  • Session persistence – Sessions keep running in tmux; detach anytime and come back
  • Single binary – One go install and you’re done

Every Claude Code session runs inside tmux. Close your terminal, shut your laptop – sessions keep running. Come back anytime and re-attach exactly where you left off.

Column Description
Name Session identifier
Project Project directory name
Status ● active / ○ idle / ◎ waiting / ⊘ terminal
Uptime Time since session creation
CPU CPU usage (process tree)
Memory Memory usage (process tree)
Path Working directory

If you’ve used k9s, you’ll feel right at home. Vim-style navigation, single-key actions, instant feedback.

Key Action
enter Attach to session
n Create new session
K Kill session (with confirmation)
l View session logs
d Session detail view
/ Filter / search sessions
r Manual refresh
? Help overlay
/ k Move cursor up
/ j Move cursor down
esc Go back / cancel
q Quit

View all Claude Code sessions in a table with real-time status, resource usage, and uptime. Auto-refreshes every 2 seconds. Includes sessions from:

  • Managed cd-* prefix sessions
  • Existing tmux sessions with “claude” in the name
  • Claude processes detected anywhere in the process tree via BFS scan
  • Claude running in terminal tabs (read-only, shown as ⊘ terminal)

Press l to view Claude’s conversation history from captured .jsonl files in ~/.claude/projects/. Features:

  • Scrollable viewport for reading past interactions
  • Works for both tmux and terminal sessions
  • Automatically parses conversation structure
  • No attachment needed – read-only access to conversation state

Press enter to attach to any session (tmux sessions only; terminal sessions are read-only). Use Ctrl+B d (tmux detach) to return to the dashboard. Sessions continue running in the background.

Press n to create a new session interactively. Enter a name and project directory – claude-dashboard creates a tmux session running claude in that directory.

Use the new command from your shell:

# Auto-generate name from current directory (~/project/foo → cd-project-foo)
claude-dashboard new

# Explicit session name
claude-dashboard new my-project

# Specify working directory
claude-dashboard new --path ~/my/project

# Pass arguments to claude
claude-dashboard new --args "--model opus"

If a session with the same name already exists, it automatically attaches to it instead of creating a new one.

Combine options freely: claude-dashboard new my-project --path ~/code/foo --args "--model sonnet"

Press K to terminate a session. Always shows a confirmation prompt before killing (safety first).

Press / to filter sessions by name, project, status, or path. Press esc to clear the filter.

Press d for a detailed view showing PID, CPU, memory, path, start time, attached status, and session type.

Type Pattern Example Detection Method
Managed sessions cd- prefix cd-my-project Dashboard creates these
Named tmux sessions Contains “claude” claude-api-work tmux session list
Process-based detection No naming requirement Any Claude process BFS process tree scan
Terminal sessions No naming requirement Claude in terminal tab Terminal process detection

Session creation:

  • TUI: Press n in the dashboard to create a new cd-* prefixed session
  • CLI: Use claude-dashboard new [name] to create from the command line
  • Existing: Any tmux session with “claude” in the name is detected automatically
  • Process-based: Claude running anywhere in the process tree is found via BFS scan
  • Terminal: Claude running in a regular terminal tab is detected (read-only, shown as ⊘ terminal)

Status varies by session type:

Status determined by analyzing tmux pane content:

Status Indicator Detection
● active Green Output is streaming
○ idle Gray Prompt visible, no activity
◎ waiting Amber Input prompt or Y/n question
? unknown Unable to determine

Terminal sessions (outside tmux) are shown with status:

Status Indicator Detection
⊘ terminal Blue Claude process detected in terminal

Terminal sessions are read-only: you can view conversation history via l but cannot attach. Use tmux sessions for interactive work.

~/.claude-dashboard/config.yaml:

refresh_interval: 2s       # Auto-refresh interval
session_prefix: "cd-"      # Prefix for managed sessions
default_dir: ""            # Default project directory for new sessions
log_history: 1000          # Number of log lines to capture
  • Go 1.25+ (for building)
  • tmux (session backend)
# macOS
brew install tmux

# Ubuntu/Debian
sudo apt install tmux
# Launch the interactive TUI dashboard
claude-dashboard
# Create with auto-generated name from current path (~/project/foo → cd-project-foo)
claude-dashboard new

# Create with explicit name
claude-dashboard new my-project

# Create in a specific directory
claude-dashboard new my-project --path ~/code/foo

# Pass arguments to claude (e.g., --model opus)
claude-dashboard new my-project --args "--model opus"

# Combine options
claude-dashboard new my-project --path ~/code/foo --args "--model sonnet"
# Attach to a session directly (skip TUI)
claude-dashboard attach cd-my-project
# Show version
claude-dashboard --version

# Show help
claude-dashboard --help
claude-dashboard/
├── cmd/claude-dashboard/main.go      # CLI entry point
├── internal/
│   ├── app/                          # Bubble Tea application
│   │   ├── app.go                    # Main model, Update, View
│   │   └── keys.go                   # Keybinding definitions
│   ├── session/                      # Session management
│   │   ├── session.go                # Session data model
│   │   ├── detector.go               # Discover sessions from tmux/terminal/processes
│   │   └── manager.go                # CRUD operations
│   ├── tmux/                         # tmux integration
│   │   ├── client.go                 # Command wrapper
│   │   └── parser.go                 # Output parser
│   ├── conversation/                 # Conversation history
│   │   └── reader.go                 # Parse .jsonl files from ~/.claude/projects/
│   ├── ui/                           # View components
│   │   ├── dashboard.go              # Session table
│   │   ├── logs.go                   # Log viewer (viewport)
│   │   ├── detail.go                 # Detail view
│   │   ├── create.go                 # New session form
│   │   ├── help.go                   # Help overlay
│   │   └── statusbar.go             # Status bar
│   ├── monitor/                      # Resource monitoring
│   │   ├── process.go                # CPU/memory via ps, process tree BFS
│   │   └── ticker.go                 # Periodic refresh
│   ├── config/config.go              # YAML configuration
│   └── styles/styles.go              # Lipgloss styles
├── LICENSE                           # MIT
├── Makefile                          # build, install, clean
└── .goreleaser.yml                   # Release automation
  • Bubble Tea – Elm architecture TUI framework
  • Bubbles – TUI components (table, viewport, textinput)
  • Lipgloss – Style definitions
  • tmux – Terminal multiplexer for session persistence

Contributions are welcome! Please open an issue or submit a pull request.

Star History Chart

MIT



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *