Skip to main content

CLI Reference

Complete reference for all squirex commands and flags.


Scan Commandsโ€‹

CommandDescription
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โ€‹

FlagTypeDescription
-d, --dirstringRequired. Path to Salesforce project directory
--sarifstringWrite SARIF output to this file path
--rulesstringComma-separated rule IDs (e.g. AGENTFORCE-1.1,SC-01)
--no-colorboolDisable colorized terminal output
-V, --versionโ€”Print version and exit

squirex scan-pr flagsโ€‹

FlagTypeDescription
-d, --dirstringRequired. Path to Salesforce project directory
--basestringRequired. Base branch to diff against (e.g. main)
--sarifstringWrite SARIF output to this file path

Diagnostic Commandsโ€‹

CommandDescription
squirex diagnose -d <dir>Deep pipeline diagnostics โ€” graph topology, per-rule timing, linker trace
squirex diagnose -d <dir> --dump-requestAlso write scan-request.json for golden file generation
squirex diagnose -d <dir> | jq .graphInspect semantic graph node/edge counts
squirex diagnose -d <dir> | jq .rulesPer-rule timing and violation counts
squirex diagnose -d <dir> | jq .linkerDropped/dangling edge report

Testing Center Bridgeโ€‹

CommandDescription
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 --validateGenerate + validate spec via sf agent test run
squirex generate-tests --push --target-org <org>Generate + push to Testing Center
squirex generate-tests --jsonOutput as JSON instead of YAML

Apex Runtime Commandsโ€‹

CommandDescription
squirex initGenerate .squirex.json config in current directory
squirex doctorCheck 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 --coveragePrint coverage summary table
squirex run --junit <file>Write JUnit XML report
squirex run --parallelEnable 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โ€‹

CommandDescription
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 analyzeSchema 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โ€‹

FlagDescription
--no-colorDisable colorized output
-V, --versionPrint version and build metadata
-h, --helpShow help for any command

Environment Variablesโ€‹

VariableDescription
SQUIREX_LICENSE_KEYLicense key for private repository scanning
SQUIREX_VERIFIEDSet to 1 to authorize engine execution in CI environments
NO_COLORStandard UNIX no-color convention โ€” disables color output