Reference

CLI reference

The Critiq CLI exposes repository checks and rule-authoring commands with pretty terminal output and automation-safe JSON.

#Usage

bash
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

CommandPurpose
critiq checkScan a repository, directory, or single file with the active Critiq catalog.
critiq rules validateValidate rule YAML contract and semantic checks before relying on rules in automation.
critiq rules testRun fixture-backed rule specs to prove expected rule behavior.
critiq rules normalizePrint the canonical normalized form of one concrete rule file.
critiq rules explainShow parsed summary, semantic status, normalized rule, and inferred template variables.
critiq helpPrint the current help message and command syntax.

#Exit codes

  • 0 success.
  • 1 findings, user/input errors, or validation diagnostics.
  • 2 internal/runtime errors.