LOKI LogoLOKIv1.10.0

loki run

Launch an autonomous chaos session against a target URL.

Usage

bash
loki run <URL> [flags]

Flags

FlagTypeDefaultDescription
--duration, -dint10Execution duration in seconds (falls back to target.timeout_seconds in .loki/config.yaml).
--headedboolfalseRun browser in visible mode (default is headless).
--persona, -prage-clicker | novice-chaotic | network-tormentor | adversary | swarm | all | none—Synthetic chaos persona to simulate (falls back to chaos.default_persona in .loki/config.yaml or rage-clicker when omitted).
--swarm, -sboolfalseRun Swarm Mode (orchestrates all 4 chaos personas in coordinated assault waves).
--journey, -jstring—Recorded journey blueprint name (from .loki/journeys/) to guide the chaos mutation attack.
--browser, -bchromium | firefox | webkitchromiumBrowser engine to run the chaos attack in.
--device, -mstring—Mobile device alias from devices.py, e.g. iphone-15, pixel-7, ipad-pro, galaxy-s24.
--orientationportrait | landscapeportraitScreen orientation for mobile device emulation.
--concurrency, -cint1Open N independent browser lanes and fire the same action simultaneously to probe for race conditions.
--target-selectorstring—CSS selector for the --concurrency probe's synchronized click.
--api-chaos / --no-api-chaosbooltrueEnable or disable API semantic fault injection (500s, corrupt JSON, delays, schema stripping).
--fault-ratefloat0.3Probability (0.0 to 1.0) of injecting faults into eligible API requests.
--auth-chaos / --no-auth-chaosbooltrueEnable or disable mid-flight auth token invalidation and cookie eviction.
--rules / --no-rules, -r / -nrbooltrueEvaluate business assertions in .loki/rules.md using AI reasoning.
--report / --no-reportbooltrueGenerate standalone visual HTML report with video and AI scorecard.
--open, -oboolfalseAutomatically open the generated HTML report in the default browser.
--auto-heal, -HboolfalseAutonomously synthesize, apply, and verify a code patch if crashes are detected.
--ciboolfalseStrict CI/CD gate (exits with code 1 on crashes or rule violations and writes GITHUB_STEP_SUMMARY).
--strictboolfalseFail with exit code 1 if any crash or business rule violation is detected.
--authorizedboolfalseConfirm ownership/permission for non-localhost URLs without an interactive prompt.
--seedintrandomSeed for pseudo-random number generators to achieve deterministic chaos behavior.

Examples

bash
# Standard unguided assault (reads target.default_url from .loki/config.yaml if omitted)
loki run http://localhost:8000 --duration 10 --headed
# Swarm mode across all 4 personas + auto-open HTML report
loki run http://localhost:8000 --swarm --open
# Mobile emulation in landscape + skip AI business rules evaluation
loki run http://localhost:8000 --device iphone-15 --orientation landscape --no-rules
# Guided mutation assault using a recorded journey blueprint
loki run http://localhost:8000 --journey checkout_flow --persona adversary --seed 42
# Concurrency race probe: 5 synchronized browser lanes clicking #pay-button simultaneously
loki run http://localhost:8000 --concurrency 5 --target-selector "#pay-button"
# Custom API & Auth Chaos tuning
loki run http://localhost:8000 -p network-tormentor --api-chaos --fault-rate 0.5 --auth-chaos
# Closed-loop auto-healing on crash
loki run http://localhost:8000 --auto-heal
# Non-interactive CI/CD quality gate against an authorized staging host
loki run https://staging.example.com --authorized --ci --strict --no-report

Command builder

generated command
loki run http://localhost:8000 --swarm