CLI Reference¶
All commands read reports from --dir DIR if given, otherwise from
$SAFEDUMP_DIR, otherwise from ~/.safedump:
safedump view¶
View a crash report in the terminal or export as HTML.
safedump view [file] # View latest or specific report
safedump view --json # Output raw JSON (pipe to jq)
safedump view --html [output.html] # Export as self-contained HTML
If no file is specified, the most recent report is used.
safedump list¶
List recent crash reports with optional filtering.
safedump list # Last 20 reports
safedump list --count 50 # Last 50 reports
safedump list --type KeyError # Filter by exception type
safedump list --since 7d # Reports from last 7 days
safedump list --since 2026-07-01 # Reports since date
safedump list --search "timeout" # Search in type/message
Time filters accept ISO dates (2026-07-01) and human-readable
durations (7d, 24h, 30m).
safedump stats¶
Show aggregate crash statistics.
Output includes total crash count, breakdown by exception type, daily distribution, and top crash sites.
safedump doctor¶
Diagnose common configuration issues.
Checks performed:
- Python version compatibility
- Output directory writability
- Exception hook installation status
- Crash report integrity
- Rich terminal viewer availability
safedump serve¶
Start a local web server for browsing crash reports.
safedump serve # http://127.0.0.1:4567
safedump serve --port 8080 # Custom port
safedump serve --host 0.0.0.0 # Network accessible
The server is intentionally minimal (stdlib http.server). See Local Web Server for its security model.
No authentication, no sessions, no JavaScript framework.
safedump clean¶
Delete old crash reports.
safedump test¶
Verify Safedump is working.
Deliberately captures a test exception and writes a report to the report directory, then reads it back. It does not need safedump.install(). Use it to check that reports can be written.
safedump --version¶
Print the Safedump version.