Clarx

Commands

Full reference for all Clarx CLI commands.

Commands

clarx score

Score a codebase against the AI-First Standard.

clarx score [path] [options]

Arguments:

ArgumentDescriptionDefault
pathDirectory to analyzeCurrent directory

Options:

FlagDescriptionDefault
--formatOutput format: text, json, markdown (alias md)text
--min-scoreExit code 1 if overall score is below this valuenone
--min-pillar-scoreExit code 1 if any pillar score is below this valuenone
--ignoreComma-separated glob patterns to excludenone
--verboseInclude passing rules in outputfalse

Exit codes:

CodeMeaning
0Analysis complete, all thresholds passed
1Score or pillar threshold not met
2Hard failure rules triggered

Examples:

# Score current directory
clarx score

# Score a specific path
clarx score ./my-repo

# CI gate: fail if score < 70
clarx score --min-score 70

# JSON output for programmatic use
clarx score --format json > clarx-report.json

# Markdown report to stdout
clarx score --format markdown

# Fail if any pillar drops below 60
clarx score --min-pillar-score 60

# Show passing rules too
clarx score --verbose

clarx init

Generate a starter clarx-manifest.json based on the current repo structure.

clarx init [path]

The command:

  1. Detects monorepo structure (Turborepo, Nx, Lerna, etc.)
  2. Identifies common generated directories (.next, dist, .source, etc.)
  3. Discovers workspaces and reads their READMEs for purpose statements
  4. Pre-fills verificationCommands from package.json scripts
  5. Writes clarx-manifest.json and prints a diff for review

Options:

FlagDescription
--dry-runPrint the manifest without writing it
--overwriteOverwrite an existing manifest

clarx explain

Print the full description, rationale, and remediation guidance for a rule.

clarx explain <rule-id>

Examples:

clarx explain C2
clarx explain O1
clarx explain B1

Output includes:

  • Rule description
  • Why it matters for AI navigability
  • How to fix it
  • How to declare an exemption in the manifest (where applicable)