Commands
Full reference for all Clarx CLI commands.
Commands
clarx score
Score a codebase against the AI-First Standard.
clarx score [path] [options]Arguments:
| Argument | Description | Default |
|---|---|---|
path | Directory to analyze | Current directory |
Options:
| Flag | Description | Default |
|---|---|---|
--format | Output format: text, json, markdown (alias md) | text |
--min-score | Exit code 1 if overall score is below this value | none |
--min-pillar-score | Exit code 1 if any pillar score is below this value | none |
--ignore | Comma-separated glob patterns to exclude | none |
--verbose | Include passing rules in output | false |
Exit codes:
| Code | Meaning |
|---|---|
0 | Analysis complete, all thresholds passed |
1 | Score or pillar threshold not met |
2 | Hard 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 --verboseclarx init
Generate a starter clarx-manifest.json based on the current repo structure.
clarx init [path]The command:
- Detects monorepo structure (Turborepo, Nx, Lerna, etc.)
- Identifies common generated directories (
.next,dist,.source, etc.) - Discovers workspaces and reads their READMEs for purpose statements
- Pre-fills
verificationCommandsfrompackage.jsonscripts - Writes
clarx-manifest.jsonand prints a diff for review
Options:
| Flag | Description |
|---|---|
--dry-run | Print the manifest without writing it |
--overwrite | Overwrite 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 B1Output includes:
- Rule description
- Why it matters for AI navigability
- How to fix it
- How to declare an exemption in the manifest (where applicable)