CLI Usage

This page documents the recommended command-line workflow.

Command overview

  • faultcore doctor: validates runtime health and interceptor probing.

  • faultcore run: executes a command with runtime setup for fault injection.

  • faultcore report: renders an HTML report from a run artifact.

Quick start

uv run faultcore doctor
uv run faultcore run -- python -c "print('faultcore ready')"
uv run faultcore run --run-json artifacts/run.json -- pytest -q
uv run faultcore report --input artifacts/run.json --output artifacts/report.html

faultcore doctor

uv run faultcore doctor
  • On Linux, exit code 0 means interceptor probing succeeded.

  • Use this command first when diagnosing runtime setup issues.

faultcore run

uv run faultcore run -- <command ...>

Common patterns:

uv run faultcore run -- python examples/1_http_requests.py
uv run faultcore run --run-json artifacts/run.json -- pytest -q
uv run faultcore run --no-strict -- python your_script.py

Behavior notes:

  • Linux default is strict probing mode.

  • --no-strict is intended for preload/debug scenarios.

  • With --run-json, metadata is written for report generation.

faultcore report

uv run faultcore report --input artifacts/run.json --output artifacts/report.html

Optional event controls:

uv run faultcore report --input artifacts/run.json --output artifacts/report.latest.html --max-events 200 --reverse-events

CI-friendly flow

sh lint.sh
sh build.sh
uv run faultcore run --run-json artifacts/run.json -- pytest -q
uv run faultcore report --input artifacts/run.json --output artifacts/report.html