# Command line

`crushtest.sh` on macOS and Linux (`java -jar CrushTest.jar` anywhere):

| Command | What it does |
|---|---|
| `crushtest` | opens CrushTest (its window, or the browser) |
| `crushtest controller [--bind ADDR] [--port N] [--no-window]` | serves the UI to other machines over HTTPS; set its password first with `set-password` |
| `crushtest agent [--port 47920] [--bind 0.0.0.0] [--allow host:port,...] [--new-code]` | a load machine; prints its pairing code |
| `crushtest monitor (--monitor-pid N \| --monitor-find TEXT) [--monitor-disk FOLDER,...] [--port 47921]` | samples a server process on this machine |
| `crushtest run --server S --profile P [--compare S2] [--rounds N] [--agents a,b] [--no-local] [--tag T] [--confirm NAME] [--dry-run] [--report FILE.pdf\|.html]` | a run; exit 0 done, 1 a regression, 2 failed, aborted or the preflight failed |
| `crushtest preflight --server S [--profile P]` | the preflight only |
| `crushtest cleanup --server S [--dismiss]` | removes what CrushTest's ledger says it made on that server; `--dismiss` forgets what can no longer be removed |
| `crushtest report RUN_ID [--out FILE.pdf\|.html]` | a run's report |
| `crushtest compare --a ID,ID --b ID,ID [--out FILE.pdf\|.html]` | a comparison report |
| `crushtest export RUN_ID [--out FILE.zip]` | the run's folder as a zip, user names masked |
| `crushtest calibrate --server S [--protocol sftp]` | how far this load setup goes before it is the limit |
| `crushtest set-password` | the controller's password for other machines |
| `crushtest license status` | the license and this controller's node id |
| `crushtest license activate TOKEN` | activates with the support portal's token |
| `crushtest license request [--out FILE]` | the activation request for a machine without internet access |
| `crushtest license import FILE` | imports the license file the portal gave for that request |
| `crushtest license checkin` | checks in with the license service now |
| `crushtest license release` | gives this controller's seat back |
| `crushtest -version`, `crushtest -help` | the version, this list |

Servers and profiles are set up in the UI; the command line uses them by name.
