VOPR CLI Reference
On this page
- Quick Reference
- Commands
- 1. run - Run Simulations
- 2. repro - Reproduce Failure
- 3. show - Display Failure Summary
- 4. scenarios - List Scenarios
- 5. stats - Display Statistics
- 6. timeline - Visualize Timeline
- 7. bisect - Binary Search for First Failing Event
- 8. minimize - Delta Debugging
- 9. dashboard - Web Coverage Dashboard
- 10. tui - Interactive Terminal UI
- Integration with Justfile
- Output Formats
- Human (default)
- JSON
- Compact
- Exit Codes
- Environment Variables
- Related Documentation
VOPR (Viewstamped Operation Replication) is a deterministic simulation testing tool for Kimberlite. It provides 10 commands for running simulations, debugging failures, and analyzing coverage.
Quick Reference
# Run simulations
# Reproduce a failure
# Show failure details
# List scenarios
# Display statistics
# Visualize timeline
# Find first failing event
# Minimize test case
# Web dashboard
# Interactive TUI
Commands
1. run - Run Simulations
Run a simulation with fault injection and invariant checking.
Usage
Options
--scenario <SCENARIO>- Scenario to run (default: baseline)- See
vopr scenariosfor full list of 46 scenarios - Examples: baseline, combined, multi_tenant_isolation, byzantine_view_change_merge
- See
--iterations <N>- Number of iterations (default: 1000)--seed <SEED>- Random seed for determinism (default: random)--faults <FAULTS>- Comma-separated fault types to inject- Options: network, storage, crash, clock, byzantine
- Example:
--faults network,storage,crash
--output <FORMAT>- Output format: human, json, compact (default: human)--verbose, -v- Verbose output--save-failures- Save failure bundles as .kmb files
Examples
# Run baseline scenario with 10k iterations
# Run with specific seed (for reproduction)
# Enable all fault types
# Save failures for debugging
# Quiet mode with JSON output (for CI)
Exit Codes
0- All simulations passed1- One or more failures detected2- Invalid arguments or configuration error
2. repro - Reproduce Failure
Reproduce a failure from a .kmb (Kimberlite Bundle) file.
Usage
Arguments
<BUNDLE_FILE>- Path to .kmb failure bundle
Options
--verbose, -v- Show detailed execution trace--output <FORMAT>- Output format: human, json, compact--check-invariants- Re-check all invariants (default: true)--no-check-invariants- Skip invariant checking
Examples
# Reproduce a failure
# Reproduce with verbose output
# Reproduce and output as JSON
Bundle File Format
.kmb files are compressed (zstd) binary bundles containing:
- Random seed
- Scenario configuration
- Full event log
- Failure details
- Coverage metrics
Size: Typically 50-500KB per failure.
3. show - Display Failure Summary
Display a human-readable summary of a failure bundle.
Usage
Arguments
<BUNDLE_FILE>- Path to .kmb failure bundle
Options
--events- Show event timeline--coverage- Show coverage metrics--invariants- Show invariant violations--output <FORMAT>- Output format: human, json, compact--detailed- Show full details (implies all flags)
Examples
# Show summary
# Show with event timeline
# Show everything
# Export as JSON
Output Sections
- Metadata: Scenario, seed, timestamp, duration
- Failure Summary: Which invariant failed and why
- Event Timeline (if
--events): Sequence of events leading to failure - Coverage (if
--coverage): Code paths exercised - Invariants (if
--invariants): All invariant check results
4. scenarios - List Scenarios
List all 46 available test scenarios.
Usage
Options
--filter <PATTERN>- Filter scenarios by name pattern--phase <PHASE>- Filter by phase (0-10)--output <FORMAT>- Output format: human, json, compact--describe- Show detailed descriptions
Examples
# List all scenarios
# List with descriptions
# Filter Byzantine scenarios
# Show Phase 1 scenarios only
# Export as JSON
Scenario Phases
- Phase 0: Core (6) - Baseline, swizzle clogging, gray failures, multi-tenant isolation, time compression, combined
- Phase 1: Byzantine (11) - Protocol attacks (split brain, malicious leader, equivocation, etc.)
- Phase 2: Corruption (3) - Bit flips, checksum validation, silent disk failures
- Phase 3: Crash/Recovery (3) - Crash during commit, view change, corrupt log recovery
- Phase 4: Gray Failures (2) - Slow disk, intermittent network
- Phase 5: Race Conditions (2) - Concurrent view changes, commit during DVC
- Phase 6: Clock (3) - Clock drift, offset exceeded, NTP failure
- Phase 7: Client Sessions (3) - Session crash, view change lockout, eviction
- Phase 8: Repair/Timeout (5) - Repair budget, EWMA selection, sync timeout, primary abdicate, commit stall
- Phase 9: Scrubbing (4) - Scrub detects corruption, completes tour, rate limited, triggers repair
- Phase 10: Reconfiguration (3) - Add replicas, remove replicas, during partition
Total: 46 scenarios (as of v0.4.0)
See /docs-internal/vopr/scenarios.md for full scenario documentation (contributor docs).
5. stats - Display Statistics
Display coverage and invariant checking statistics.
Usage
Options
--detailed- Show per-scenario breakdowns--coverage- Show code coverage metrics--invariants- Show invariant check counts--output <FORMAT>- Output format: human, json, compact
Examples
# Show overall statistics
# Show detailed per-scenario stats
# Show only coverage metrics
# Export as JSON for analysis
Metrics Displayed
- Simulation Throughput: Iterations per second
- Coverage: State coverage, message coverage, fault coverage, path coverage
- Invariants: Check counts, pass/fail rates
- Performance: Average time per iteration, p99 latency
- Per-Scenario: Individual scenario statistics (if
--detailed)
6. timeline - Visualize Timeline
Visualize simulation timeline as an ASCII Gantt chart.
Usage
Arguments
<BUNDLE_FILE>- Path to .kmb failure bundle
Options
--width <COLS>- Terminal width in columns (default: auto-detect)--show-messages- Annotate with message types--show-faults- Highlight injected faults--output <FILE>- Save to file instead of stdout
Examples
# Show timeline
# Show with message annotations
# Show with fault highlighting
# Save to file
Timeline Format
Replica 0 |====== VIEW=0 ======|.........|== VIEW=1 ==|
Replica 1 |====== VIEW=0 ======|XXXXXXXXX|== VIEW=1 ==|
Replica 2 |====== VIEW=0 ======|.........|== VIEW=1 ==|
0ms 100ms 150ms 200ms
Legend:
=== Active/healthy
XXX Crashed/partitioned
... Silent (no messages)
^^^ Fault injection
>>> Message sent
7. bisect - Binary Search for First Failing Event
Find the first event that triggers an invariant violation using binary search.
Usage
Arguments
<BUNDLE_FILE>- Path to .kmb failure bundle
Options
--verbose, -v- Show binary search progress--output <FORMAT>- Output format: human, json, compact
Examples
# Find first failing event
# Show search progress
# Export result as JSON
Algorithm
- Start with full event log (N events)
- Run simulation with first N/2 events
- If passes: failure is in second half, continue with events [N/2, N]
- If fails: failure is in first half, continue with events [0, N/2]
- Repeat until single failing event found
Complexity: O(log N) simulations where N = number of events.
Output
Binary search progress:
[0..1000] - FAIL (checking first 500)
[0..500] - PASS (checking 500..750)
[500..750] - FAIL (checking 500..625)
[500..625] - PASS (checking 625..687)
...
[672..673] - FAIL
First failing event: #672
Event type: NetworkPartition
Details: Replica 1 isolated from quorum
8. minimize - Delta Debugging
Minimize a test case by removing events while preserving failure.
Usage
Arguments
<BUNDLE_FILE>- Path to .kmb failure bundle
Options
--strategy <STRATEGY>- Minimization strategy: linear, binary, delta (default: delta)--output <FILE>- Save minimized bundle to file--verbose, -v- Show minimization progress
Examples
# Minimize using delta debugging
# Use binary minimization (faster)
# Save minimized bundle
Strategies
- Linear: Remove one event at a time (slow, best result)
- Binary: Remove half at a time (fast, good result)
- Delta (default): Delta debugging algorithm (balanced)
Delta Debugging Algorithm
- Start with N events
- Split into 2 chunks, try removing each chunk
- If removing a chunk preserves failure, use that smaller set
- If neither works, split into 4 chunks and repeat
- Continue until no more events can be removed
Result: Minimal event sequence that still triggers the failure.
9. dashboard - Web Coverage Dashboard
Launch a web dashboard for exploring coverage and invariant metrics.
Usage
Options
--port <PORT>- Port to listen on (default: 8080)--host <HOST>- Host to bind to (default: 127.0.0.1)--data-dir <DIR>- Directory with .kmb bundles (default: ./failures/)
Examples
# Launch dashboard on default port
# Launch on custom port
# Point to specific failures directory
Dashboard Features
- Coverage Heatmap: Visual representation of code coverage by scenario
- Invariant Matrix: Which scenarios test which invariants
- Failure Timeline: Chronological view of all failures
- Scenario Explorer: Drill down into individual scenario results
- Interactive Filters: Filter by phase, fault type, invariant
URL Structure
http://localhost:8080/ # Home
http://localhost:8080/scenarios # All scenarios
http://localhost:8080/scenarios/:id # Specific scenario details
http://localhost:8080/failures # All failures
http://localhost:8080/failures/:id # Failure details
http://localhost:8080/coverage # Coverage heatmap
http://localhost:8080/invariants # Invariant matrix
10. tui - Interactive Terminal UI
Launch an interactive terminal user interface for exploring simulations.
Usage
Options
--data-dir <DIR>- Directory with .kmb bundles (default: ./failures/)
Examples
# Launch TUI
# Point to specific directory
TUI Features
- Scenario Selection: Interactive picker for choosing scenarios
- Live Progress: Real-time simulation progress with ETA
- Failure Navigation: Browse failures with arrow keys
- Event Timeline: Step through events with playback controls
- Coverage View: Live coverage metrics during simulation
- Log Viewer: Searchable, filterable log output
Keyboard Shortcuts
Navigation:
↑/↓ or j/k - Move selection up/down
←/→ or h/l - Switch panels
Enter - Select item
Esc - Go back
q - Quit
Playback (Timeline view):
Space - Play/pause
n - Next event
p - Previous event
0 - Jump to start
$ - Jump to end
Search:
/ - Search
n - Next match
N - Previous match
Other:
r - Refresh
f - Toggle filter
s - Sort by column
? - Show help
Panels
- Scenarios: Browse and run scenarios
- Failures: View recent failures
- Timeline: Step through failure events
- Coverage: Live coverage metrics
- Logs: Searchable log output
Integration with Justfile
The VOPR CLI integrates with the project’s Justfile for convenience:
# Run VOPR with default scenario
# List all scenarios
# Run specific scenario with iteration count
# Quick smoke test (100 iterations)
# Full test suite (all scenarios, 10k iterations each)
# Reproduce from bundle
See justfile for full list of VOPR shortcuts.
Output Formats
All commands support three output formats via --output:
Human (default)
Rich, colored terminal output with Unicode box drawing:
✓ Scenario: baseline
Iterations: 1000
Duration: 2.3s
Throughput: 434 sims/sec
✓ All invariants passed
JSON
Machine-readable JSON for tooling integration:
Compact
One-line summary for logs:
baseline 1000 2.3s 434/s ✓
Exit Codes
All commands use consistent exit codes:
0- Success (all checks passed)1- Failure detected (invariant violation, test failure)2- Invalid arguments or configuration error3- IO error (bundle not found, permission denied, etc.)
Environment Variables
VOPR_DATA_DIR- Default directory for .kmb bundles (default: ./failures/)VOPR_SEED- Default random seed (default: random)VOPR_ITERATIONS- Default iteration count (default: 1000)VOPR_NO_COLOR- Disable colored output (default: auto-detect TTY)RUST_LOG- Log level (debug, info, warn, error)
Related Documentation
- VOPR Testing Overview - User-facing testing overview
- VOPR Deep Dive - Internal implementation details (contributors)
- All 46 Scenarios - Complete scenario documentation (contributors)
- VOPR Deployment - AWS testing infrastructure (contributors)
- Writing Scenarios - How to add new scenarios (contributors)
Last updated: 2026-02-05 (v0.4.0)