Back to docs

CLI Reference

Local CLI performs static accessibility, consistency, and UX-pattern checks. Hosted flow execution is not part of local CLI.

Install `/occhio` editor skill

curl -fsSL https://occhio.build/install/skill | bash

Install Local CLI

curl -fsSL https://occhio.build/install | bash

Command surface

`occhio init [--force]`: creates `.occhio/config.yaml` from detected project type.

`occhio scan [path]`: scans files for configured rule categories.

`occhio run`: deprecated, exits non-zero and points users to `occhio scan` and Occhio Cloud.

`scan` options

OptionBehavior
-c, --config <path>Config path (default `.occhio/config.yaml`)
-r, --rules <csv>Run only listed rule IDs
-f, --format <terminal|json|markdown>Output formatter
--fixShows fix suggestions (auto-fix is not implemented)

Exit behavior

Scan exits with code 1 when any critical or high issue exists. Medium/low-only findings still print results but do not block exit.

Config file schema

version: 1
scan:
  include:
    - "src/**/*.tsx"
  exclude:
    - "**/node_modules/**"
  tokens:
    spacing: [0, 1, 2, 4, 8, 16]
    colors:
      primary: "#FF7300"
    typography:
      sizes: ["text-sm", "text-base", "text-lg"]
      weights: ["font-normal", "font-medium", "font-semibold"]
    borderRadius: ["rounded", "rounded-md", "rounded-lg"]
  rules:
    accessibility:
      enabled: true
      severity: high
    consistency:
      enabled: true
      severity: medium
    ux_patterns:
      enabled: true
      severity: low

Available rule IDs

Use these with --rules.

missing-altmissing-labelsfocus-visiblearia-attributescolor-contrastspacingcolorstypographybutton-stylesborder-radiusform-labelserror-statesloading-statesempty-states