CLI Reference
Complete reference for all squirex commands and flags.
Scan Commandsโ
| Command | Description |
|---|---|
squirex scan -d <dir> | Full workspace scan โ all security rules, SARIF to stdout |
squirex scan -d <dir> --sarif <file> | Save SARIF output to a file |
squirex scan -d <dir> --rules <ids> | Run specific rules (comma-separated IDs) |
squirex scan-pr -d <dir> --base <branch> | PR-scoped scan โ violations filtered to diff lines only |
squirex scan flagsโ
| Flag | Type | Description |
|---|---|---|
-d, --dir | string | Required. Path to Salesforce project directory |
--sarif | string | Write SARIF output to this file path |
--rules | string | Comma-separated rule IDs (e.g. AGENTFORCE-1.1,SC-01) |
--no-color | bool | Disable colorized terminal output |
-V, --version | โ | Print version and exit |
squirex scan-pr flagsโ
| Flag | Type | Description |
|---|---|---|
-d, --dir | string | Required. Path to Salesforce project directory |
--base | string | Required. Base branch to diff against (e.g. main) |
--sarif | string | Write SARIF output to this file path |
Diagnostic Commandsโ
| Command | Description |
|---|---|
squirex diagnose -d <dir> | Deep pipeline diagnostics โ graph topology, per-rule timing, linker trace |
squirex diagnose -d <dir> --dump-request | Also write scan-request.json for golden file generation |
squirex diagnose -d <dir> | jq .graph | Inspect semantic graph node/edge counts |
squirex diagnose -d <dir> | jq .rules | Per-rule timing and violation counts |
squirex diagnose -d <dir> | jq .linker | Dropped/dangling edge report |
Testing Center Bridgeโ
| Command | Description |
|---|---|
squirex generate-tests -d <dir> | Scan + generate Agentforce DX test YAML |
squirex generate-tests --sarif <file> | Convert existing SARIF to DX tests |
squirex generate-tests --rules <ids> | Generate tests for specific rules only |
squirex generate-tests --validate | Generate + validate spec via sf agent test run |
squirex generate-tests --push --target-org <org> | Generate + push to Testing Center |
squirex generate-tests --json | Output as JSON instead of YAML |
Apex Runtime Commandsโ
| Command | Description |
|---|---|
squirex init | Generate .squirex.json config in current directory |
squirex doctor | Check environment โ Node.js, Go interpreter, project config |
squirex run -d <dir> | Run all Apex tests in directory |
squirex run --method <class.method> | Run a single test method |
squirex run --coverage | Print coverage summary table |
squirex run --junit <file> | Write JUnit XML report |
squirex run --parallel | Enable parallel test execution |
squirex run --mock-data <file> | Seed SObject records from JSON before test run |
squirex run --coverage-report <file> | Write LCOV or JSON coverage report |
Analysis Commandsโ
| Command | Description |
|---|---|
squirex conflict -b <b1,b2> | Predict merge conflicts between two branches |
squirex impact -f <files> | Dependency impact โ which tests are affected by a file change |
squirex schema analyze | Schema inference analysis โ inferred SObject/field types |
squirex formula eval -e <expr> | Evaluate a Salesforce formula expression locally |
squirex flow run -f <file> | Execute a Flow definition locally |
Global Flagsโ
| Flag | Description |
|---|---|
--no-color | Disable colorized output |
-V, --version | Print version and build metadata |
-h, --help | Show help for any command |
Environment Variablesโ
| Variable | Description |
|---|---|
SQUIREX_LICENSE_KEY | License key for private repository scanning |
SQUIREX_VERIFIED | Set to 1 to authorize engine execution in CI environments |
NO_COLOR | Standard UNIX no-color convention โ disables color output |