cxas lint¶
cxas lint checks your app directory for best-practice violations, structural problems, and schema errors across 60+ rules, so you can catch issues in code review rather than at runtime.
Usage¶
cxas lint [--app-dir DIR]
[--fix]
[--only CATEGORY]
[--rule IDS]
[--json]
[--list-rules]
[--validate-only]
[--agent DIR]
[--tool DIR]
[--toolset DIR]
[--guardrail DIR]
[--evaluation DIR]
[--evaluation-expectations DIR]
Options¶
| Option | Required | Default | Description |
|---|---|---|---|
--app-dir DIR | No | . (current directory) | Path to the root of the app directory to lint. The linter discovers the app structure automatically. |
--fix | No | false | Print fix suggestions alongside each issue. Does not automatically modify files. |
--only CATEGORY | No | — | Limit linting to a single category. See Rule Categories below. |
--rule IDS | No | — | Run only specific rules. Accepts a comma-separated list of rule IDs (e.g., I003,C005). |
--json | No | false | Output results as a JSON array instead of the human-readable format. Useful for integrating with other tools. |
--list-rules | No | false | Print all available lint rules with their IDs, categories, and descriptions, then exit. |
--validate-only | No | false | Run only structure, config, and schema rules. Skips instruction quality and eval checks. |
--agent DIR | No | — | Validate a single agent directory against the CES schema instead of linting the whole app. |
--tool DIR | No | — | Validate a single tool directory. |
--toolset DIR | No | — | Validate a single toolset directory. |
--guardrail DIR | No | — | Validate a single guardrail directory. |
--evaluation DIR | No | — | Validate a single evaluation directory. |
--evaluation-expectations DIR | No | — | Validate a single evaluation expectations directory. |
Rule Categories¶
| Category | Prefix | Description |
|---|---|---|
instructions | I | Agent instruction quality, clarity, length, and formatting. |
callbacks | CB | Callback file structure, naming, and implementation patterns. |
tools | T | Tool definition quality, parameter descriptions, and schema correctness. |
evals | E | Evaluation structure, turn count, and expectation quality. |
config | C | app.yaml/app.json configuration correctness. |
structure | S | Directory layout, required files, and naming conventions. |
schema | SC | JSON/YAML schema validation against the CES resource schemas. |
Examples¶
Lint the current directory:
Lint a specific app directory and show fix suggestions:
Run only instruction-quality rules:
Run specific rules by ID:
Output results as JSON (for CI dashboards or custom reporters):
List all available rules:
Quick structural validation only (no instruction or eval checks):
Validate a single agent directory:
Validate a single tool:
Use in CI to fail the build on any lint issue:
Related Commands¶
cxas init— Bootstrap a project with the skills and configs that help you write lint-clean agents.cxas push— Push your linted app to CX Agent Studio.cxas ci-test— Full CI lifecycle (addcxas lintas a step beforecxas ci-testfor maximum coverage).