CLI commands¶
CRAB installs a single console script, crab, with four subcommands. Activate the virtual
environment first (source .venv/bin/activate); shell tab-completion is registered during install.
crab setup¶
Launches the interactive setup wizard to obtain/build benchmarks and write their receipts.
No arguments. See Installation → benchmark setup.
crab run¶
Runs an experiment: prepares the output directory and submits the Slurm job.
| Argument | Required | Description |
|---|---|---|
config.json |
✅ | Path to the experiment config. Tab-completes .json files. |
-p, --preset |
— | Preset name from config/presets.json. Tab-completes known presets. See resolution order. |
--log-level |
— | DEBUG / INFO / WARNING / ERROR / CRITICAL. Default INFO. |
crab tui¶
Launches the Textual interface. Requires the optional tui dependencies; if missing, the command
offers to install them.
No arguments. See Running an experiment → TUI.
crab export¶
Generates a self-contained HTML dashboard from a results directory — the CSV data is embedded into the file, so the result can be emailed, committed to a repo, or opened directly anywhere without any server or import step.
| Argument | Required | Description |
|---|---|---|
data_dir |
✅ | Path to a results directory containing experiment CSVs. CRAB scans both flat (<dir>/*.csv) and nested (<dir>/<exp>/data_app_*.csv) layouts. |
-o, --output |
— | Output HTML path. Default: crab_export.html in the current directory. |
Example:
The exported file is a self-contained snapshot built from the dashboard template bundled in the package (src/crab/crab_dashboard.html) with the data pre-loaded and the "drop folder" UI hidden. The output file should not be committed to version control. For browsing fresh results from the cluster without exporting, open the template directly — see Reading results → The dashboard.
crab worker (internal)¶
Hidden subcommand executed by the generated Slurm job on the compute nodes — the second phase of the two-phase model. It reads the config the orchestrator wrote into the work directory and runs the experiments.
Do not run crab worker by hand
It is invoked automatically inside the batch job and expects a fully prepared work directory
(config.json + environment.json) and an allocation. It is hidden from the command list and
is not a user-facing command.