Dashcam
CLI Reference

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:

Terminal
npx dashcam <command> [options]

Or install globally:

Terminal
npm install -g dashcam-dev
dashcam <command> [options]

dashcam init

Install hooks into Claude Code and initialize the Dashcam data directory.

Terminal
dashcam init [--remote <user@host>]

What it does:

  1. Creates the ~/.dashcam/ directory structure
  2. Initializes the SQLite database (~/.dashcam/dashcam.db) with the full schema
  3. Merges Dashcam hooks into ~/.claude/settings.json (preserves existing hooks)
  4. Creates the captures directory (~/.dashcam/captures/)
  5. Runs a validation check (equivalent to dashcam doctor)
OptionDescription
--remote <user@host>Install hooks on a remote server via SSH
Example
dashcam init
# ✓ Created ~/.dashcam/
# ✓ Initialized database
# ✓ Installed hooks into ~/.claude/settings.json
# ✓ All checks passed

Running dashcam init multiple times is safe. It will not duplicate hooks or overwrite existing data.


dashcam start

Start the Dashcam daemon and dashboard server.

Terminal
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.

OptionDescriptionDefault
--port <number>Port for HTTP and WebSocket server57580
--host <string>Bind address127.0.0.1
--lokiEnable the Loki Mode bridgefalse
--squadEnable the Claude Squad bridgefalse
Examples
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 bridges

After 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.

Terminal
dashcam stop

Performs a clean shutdown:

  1. Closes all WebSocket connections
  2. Stops file watchers and bridges
  3. Checkpoints the SQLite WAL
  4. 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.

Terminal
dashcam status

Displays:

  • 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)
Example output
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.

Terminal
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.

OptionDescriptionDefault
--since <date>Only import sessions after this date (ISO 8601)Import all
Examples
dashcam import                         # Import everything
dashcam import --since 2026-03-01     # Import recent sessions only

Import 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.

Terminal
dashcam export <session-id> [--format json|html]
OptionDescriptionDefault
--format <type>Output format: json for raw data, html for a self-contained reportjson
Examples
dashcam export sess_01JQXYZ          # Export as JSON to stdout
dashcam export sess_01JQXYZ --format html > report.html

The 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.

Terminal
dashcam prune [--older-than <duration>]
OptionDescriptionDefault
--older-than <duration>Delete data older than this duration (7d, 30d, 90d)30d
Examples
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 history

Prune removes:

  • Screenshot and video files from ~/.dashcam/captures/
  • Corresponding captures table 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.

Terminal
dashcam doctor

Checks:

  • 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)
Example output
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 57580

dashcam uninstall

Remove Dashcam hooks and optionally delete all data.

Terminal
dashcam uninstall [--delete-data]
OptionDescriptionDefault
--delete-dataAlso 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.

Examples
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.

Terminal
dashcam version
Example output
dashcam version
# dashcam-dev v0.1.0

On this page