Strix (STRIX) — interface
What this is
strix/interface is everything a human (or a CI job) actually touches: the command
line, the live interactive terminal view, and the local web dashboard for browsing
finished runs. It doesn't do any testing itself — its whole job is to collect
arguments, hand off to strix/core, and render what comes back.
What flows through it
Technical details
Package: strix/interface/
Depends on: strix.core.runner (run_strix_scan, the sole scan entry point),
strix.config, strix.report.state.
Depended on by: nothing inside strix/ — this is the outermost layer, the
process entry point (strix console script).
Files at a glance
| File | Role |
|---|---|
main.py |
main() — top-level dispatch: strix view, strix auth, or a scan. |
cli_args.py |
parse_arguments() — the full argparse surface (--target, --instruction, --scan-mode, --max-budget-usd, --max-turns, --resume, -n, etc.). |
scan_setup.py |
prepare_run() — resolves run_name, clones repo targets, computes local_sources/API-spec staging/diff-scope, persists the initial run record. |
cli.py |
run_cli() — headless mode: builds scan_config, sets up ReportState, calls run_strix_scan() under a Rich Live status panel, prints the final report, exits 2 if findings exist. |
interactive.py |
run_tui() — async: launches and supervises the Go TUI, itself calling run_strix_scan(). |
auth_cli.py |
strix auth login/status/logout — ChatGPT-subscription auth flow (_CodexResponsesModel in config/models.py). |
environment.py |
validate_environment(), warm_up_llm() — preflight checks (Docker installed, model connectivity) run before a scan starts. |
update_check.py |
Background version-check + update prompt. |
tui/ |
Go Bubble Tea frontend (cmd/strix-tui) + a Python IPC backend (backend/server.py, controller.py, protocol.py) streaming live agent-tree/tool-call/vulnerability events. (Go internals not read line-by-line — role inferred from file/directory structure.) |
viewer/ |
strix view — a stdlib ThreadingHTTPServer (server.py) serving a prebuilt React/Vite SPA and JSON endpoints that read strix_runs/<run>/ straight off disk (transcript.py), plus auth.py (local token gating) and report_pdf.py (PDF export). |
Files & functions, explained
Flow from strix --target X to a running scan (see ../design/data-flow.md for
the full numbered sequence): main() → parse_arguments() → Docker
preflight/image pull → _bootstrap_scan(args) (validate_environment(),
warm_up_llm() for non-interactive runs, persist_current() writes resolved config
back to ~/.strix/cli-config.json, scan_setup.prepare_run(args)) → dispatch to
cli.run_cli(args) or interactive.run_tui(args) → both ultimately call
core.runner.run_strix_scan(...).
Related: STRIX — Architecture (HLD), core.md, ../design/data-flow.md,
../process/runbooks/run-a-detection-scan.md.