CLI reference
The Critiq CLI exposes repository checks and rule-authoring commands with pretty terminal output and automation-safe JSON.
#Usage
critiq check [target] [--base <git-ref>] [--head <git-ref>] [--format pretty|json]
critiq rules validate <glob> [--format pretty|json]
critiq rules test [glob] [--format pretty|json]
critiq rules normalize <file> [--format pretty|json]
critiq rules explain <file> [--format pretty|json]
critiq help#Commands
| Command | Purpose |
|---|---|
| critiq check | Scan a repository, directory, or single file with the active Critiq catalog. |
| critiq rules validate | Validate rule YAML contract and semantic checks before relying on rules in automation. |
| critiq rules test | Run fixture-backed rule specs to prove expected rule behavior. |
| critiq rules normalize | Print the canonical normalized form of one concrete rule file. |
| critiq rules explain | Show parsed summary, semantic status, normalized rule, and inferred template variables. |
critiq help | Print the current help message and command syntax. |
#Exit codes
0success.1findings, user/input errors, or validation diagnostics.2internal/runtime errors.