Real-time CLI dashboard for Claude Code tool events
Project description
Claude Dashboard
Real-time CLI dashboard for Claude Code tool events with an integrated logging library for plugin developers.
Features
- Multi-file monitoring: Watches all
.jsonlfiles in the.claude/logs/directory - Real-time updates: Live dashboard refresh every second
- Separate sections: Each log file displayed in its own section
- Tool statistics: Aggregated statistics across all log files
- Color-coded tools: Easy visual identification of different tools
Installation
Using UV (recommended):
uv add claude-dashboard
Or install from source:
cd plugins/claude-dashboard
uv pip install -e .
CLI Usage
Basic Usage
Run the dashboard from any directory containing a .claude/logs/ folder:
claude-dash
Options
# Show version
claude-dash --version
# Specify a custom logs directory
claude-dash --logs-dir /path/to/logs
# Watch a single log file
claude-dash --log-file /path/to/file.jsonl
Dashboard Layout
The dashboard displays events from multiple log files in separate sections:
┌─────────────────────────────────────────────────────────────────┐
│ Claude Code Observability Dashboard │
├─────────────────────────────────────────────────────────────────┤
│ observability │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ Time │ Type │ Tool │ Details │ │
│ │ 14:32:01 │ Pre │ Bash │ git status │ │
│ │ 14:32:02 │ Post │ Bash │ git status │ │
│ └─────────────────────────────────────────────────────────────┘ │
├─────────────────────────────────────────────────────────────────┤
│ bash-safety │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ Time │ Type │ Tool │ Details │ │
│ │ 14:32:01 │ warn │ Bash │ Blocked: rm -rf │ │
│ └─────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
Library Usage
The claude-dashboard package also provides a logging library for plugin developers to write consistent JSONL logs.
Quick Start
from pathlib import Path
from claude_dashboard import get_logger, log_event
import logging
# Create a logger for your plugin
logger = get_logger(
plugin_name="my-plugin",
log_file=Path(".claude/logs/my-plugin.jsonl")
)
# Log events using the standard logging interface
logger.info("Plugin started", extra={"event": "startup"})
logger.warning("Something needs attention", extra={
"event": "warning_issued",
"details": {"key": "value"}
})
# Or use the convenience function
log_event(
logger,
level=logging.INFO,
message="Task completed",
event="task_complete",
duration_ms=150,
result="success"
)
API Reference
get_logger(plugin_name, log_file, level=DEBUG, max_bytes=None)
Create and configure a logger for a plugin.
Parameters:
plugin_name(str): Identifier for the plugin (e.g., "bash-safety", "observability")log_file(Path): Path to the JSONL log filelevel(int): Logging level (default:logging.DEBUG)max_bytes(int, optional): Max file size before rotation (not implemented yet)
Returns: Configured logging.Logger instance
Example:
from pathlib import Path
from claude_dashboard import get_logger
logger = get_logger("my-plugin", Path(".claude/logs/my-plugin.jsonl"))
log_event(logger, level, message, event, **kwargs)
Convenience function to log an event with standard fields.
Parameters:
logger(Logger): Logger instance fromget_logger()level(int): Logging level (e.g.,logging.INFO,logging.WARNING)message(str): Human-readable messageevent(str): Event type in snake_case (e.g., "command_blocked", "test_completed")**kwargs: Additional plugin-specific fields
Example:
import logging
from claude_dashboard import log_event
log_event(
logger,
level=logging.WARNING,
message="Command blocked for safety",
event="command_blocked",
command="rm -rf /",
reasons=["dangerous_pattern"]
)
PluginJsonFormatter
Custom JSON formatter class that adds plugin name and ISO timestamp to every log record.
Fields added automatically:
timestamp: ISO 8601 timestamp with timezoneplugin: Plugin name specified during logger creationlevel: Log level (INFO, WARNING, etc.)event: Event type (defaults to log level name if not provided)
Log Output Format
Each log entry is a JSON object on its own line (JSONL format):
{"timestamp": "2024-01-15T14:32:01.123456+00:00", "level": "INFO", "plugin": "my-plugin", "event": "startup", "message": "Plugin started"}
{"timestamp": "2024-01-15T14:32:02.456789+00:00", "level": "WARNING", "plugin": "my-plugin", "event": "command_blocked", "message": "Blocked dangerous command", "command": "rm -rf /", "reasons": ["dangerous_pattern"]}
Development
Running from source
cd plugins/claude-dashboard
uv run claude-dash
Running tests
uv run pytest
License
MIT License - see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claude_dashboard-0.2.0.tar.gz.
File metadata
- Download URL: claude_dashboard-0.2.0.tar.gz
- Upload date:
- Size: 24.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7605988adce7df51852786914603267298ccdb9e03c06bf57e22071f27d13316
|
|
| MD5 |
64df959dd2c69dc9ff29958c58ca6c51
|
|
| BLAKE2b-256 |
5383111ced908ac96ae6ac0bf02846bdaae9b635ec554f59edbd35869c84b213
|
Provenance
The following attestation bundles were made for claude_dashboard-0.2.0.tar.gz:
Publisher:
publish.yml on Danielratmiroff/claude-dashboard
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_dashboard-0.2.0.tar.gz -
Subject digest:
7605988adce7df51852786914603267298ccdb9e03c06bf57e22071f27d13316 - Sigstore transparency entry: 782209753
- Sigstore integration time:
-
Permalink:
Danielratmiroff/claude-dashboard@cdcac54bdc36a8dd821be9b9d53ae914e75b6804 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Danielratmiroff
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cdcac54bdc36a8dd821be9b9d53ae914e75b6804 -
Trigger Event:
release
-
Statement type:
File details
Details for the file claude_dashboard-0.2.0-py3-none-any.whl.
File metadata
- Download URL: claude_dashboard-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
913e241c9f028f47deb6eb8d1808b0e30cbe83897b3376d8b1c6875b041fcde7
|
|
| MD5 |
1f243b9491788c89bdcf9ae0c7957954
|
|
| BLAKE2b-256 |
3d50735d63b2ea55a9b6b0c213837c3922a2615fb34609ecd3eed94acadcf12b
|
Provenance
The following attestation bundles were made for claude_dashboard-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on Danielratmiroff/claude-dashboard
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_dashboard-0.2.0-py3-none-any.whl -
Subject digest:
913e241c9f028f47deb6eb8d1808b0e30cbe83897b3376d8b1c6875b041fcde7 - Sigstore transparency entry: 782209755
- Sigstore integration time:
-
Permalink:
Danielratmiroff/claude-dashboard@cdcac54bdc36a8dd821be9b9d53ae914e75b6804 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Danielratmiroff
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cdcac54bdc36a8dd821be9b9d53ae914e75b6804 -
Trigger Event:
release
-
Statement type: