CLI Reference
Complete reference for the dashcam CLI.
CLI Reference
The dashcam CLI is the primary interface for installing, running, and managing Dashcam. Every command is designed to be fast, predictable, and safe — no command modifies your project code, and destructive operations always require explicit flags.
You can run commands directly via npx:
npx dashcam <command> [options]Or install globally:
npm install -g dashcam-dev
dashcam <command> [options]dashcam init
Install hooks into Claude Code and initialize the Dashcam data directory.
dashcam init [--remote <user@host>]What it does:
- Creates the
~/.dashcam/directory structure - Initializes the SQLite database (
~/.dashcam/dashcam.db) with the full schema - Merges Dashcam hooks into
~/.claude/settings.json(preserves existing hooks) - Creates the captures directory (
~/.dashcam/captures/) - Runs a validation check (equivalent to
dashcam doctor)
| Option | Description |
|---|---|
--remote <user@host> | Install hooks on a remote server via SSH |
dashcam init
# ✓ Created ~/.dashcam/
# ✓ Initialized database
# ✓ Installed hooks into ~/.claude/settings.json
# ✓ All checks passedRunning dashcam init multiple times is safe. It will not duplicate hooks or overwrite existing data.
dashcam start
Start the Dashcam daemon and dashboard server.
dashcam start [options]The daemon starts listening for hook events, watching JSONL files, managing windows, and serving the dashboard. Everything runs in a single Bun process.
| Option | Description | Default |
|---|---|---|
--port <number> | Port for HTTP and WebSocket server | 57580 |
--host <string> | Bind address | 127.0.0.1 |
--loki | Enable the Loki Mode bridge | false |
--squad | Enable the Claude Squad bridge | false |
dashcam start # Default: localhost:57580
dashcam start --port 8080 # Custom port
dashcam start --host 0.0.0.0 # Allow remote connections
dashcam start --loki # With Loki Mode bridge
dashcam start --loki --squad # Multiple bridgesAfter starting, open http://localhost:57580 in your browser.
The daemon writes a PID file to ~/.dashcam/dashcam.pid for process management.
dashcam stop
Stop the running Dashcam daemon.
dashcam stopPerforms a clean shutdown:
- Closes all WebSocket connections
- Stops file watchers and bridges
- Checkpoints the SQLite WAL
- Removes the PID file
If the daemon is not running, the command exits cleanly with a message.
dashcam status
Show the current state of the Dashcam daemon.
dashcam statusDisplays:
- Daemon status (running/stopped)
- Port and PID
- Active sessions and agent count
- Current window state and time remaining
- Database size and capture storage usage
- Bridge status (if any enabled)
dashcam status
# Daemon: running (PID 12345, port 57580)
# Sessions: 2 active, 47 total
# Window: ACTIVE (3h 12m remaining)
# Agents: 3 active
# Database: 12.4 MB
# Captures: 234 MB (142 screenshots, 8 videos)
# Bridges: loki (connected)dashcam import
Import historical Claude Code JSONL session files into the Dashcam database.
dashcam import [--since <date>]Scans ~/.claude/projects/ for existing .jsonl files and ingests all events. Duplicate events are detected by ID and skipped, so running import multiple times is safe.
| Option | Description | Default |
|---|---|---|
--since <date> | Only import sessions after this date (ISO 8601) | Import all |
dashcam import # Import everything
dashcam import --since 2026-03-01 # Import recent sessions onlyImport runs once and exits. It does not start the daemon or dashboard. Use dashcam start after importing to browse the sessions.
dashcam export
Export a session as a portable JSON or HTML report.
dashcam export <session-id> [--format json|html]| Option | Description | Default |
|---|---|---|
--format <type> | Output format: json for raw data, html for a self-contained report | json |
dashcam export sess_01JQXYZ # Export as JSON to stdout
dashcam export sess_01JQXYZ --format html > report.htmlThe HTML export produces a self-contained, single-file report with embedded screenshots and an interactive timeline — useful for sharing with teammates or archiving completed work.
dashcam prune
Clean old data and captures to reclaim disk space.
dashcam prune [--older-than <duration>]| Option | Description | Default |
|---|---|---|
--older-than <duration> | Delete data older than this duration (7d, 30d, 90d) | 30d |
dashcam prune # Prune data older than 30 days
dashcam prune --older-than 7d # Prune data older than 7 days
dashcam prune --older-than 90d # Keep 3 months of historyPrune removes:
- Screenshot and video files from
~/.dashcam/captures/ - Corresponding
capturestable rows - Events and sessions older than the threshold
- Empty windows with no remaining sessions
Pruned data cannot be recovered. Consider exporting important sessions before pruning.
dashcam doctor
Run a health check to verify your Dashcam installation.
dashcam doctorChecks:
- Hooks are installed in
~/.claude/settings.json ~/.dashcam/directory exists with correct permissions- SQLite database is valid and migrations are current
- Playwright is available for screenshot capture
- Disk space usage for captures directory
- Daemon connectivity (if running)
dashcam doctor
# ✓ Hooks installed in ~/.claude/settings.json
# ✓ Database valid (v3, 47 sessions, 3,241 events)
# ✓ Captures directory exists (234 MB used)
# ✓ Playwright available (chromium)
# ⚠ Captures directory exceeds 200 MB — consider running dashcam prune
# ✓ Daemon running on port 57580dashcam uninstall
Remove Dashcam hooks and optionally delete all data.
dashcam uninstall [--delete-data]| Option | Description | Default |
|---|---|---|
--delete-data | Also delete ~/.dashcam/ directory (database, captures, config) | false |
Without --delete-data, only the hooks in ~/.claude/settings.json are removed. Your session history, screenshots, and database are preserved.
dashcam uninstall # Remove hooks only
dashcam uninstall --delete-data # Remove hooks + all data--delete-data permanently removes all session history, screenshots, videos, and configuration. This cannot be undone.
dashcam version
Display the installed Dashcam version.
dashcam versiondashcam version
# dashcam-dev v0.1.0