Unified CLI for AIReady analysis tools
npm install @aiready/cli> Unified CLI for AIReady analysis tools - Run all AI-readiness checks from a single command
The CLI provides both unified analysis (scan multiple tools at once) and individual tool access for pattern detection, context analysis, and consistency checking.
```
šÆ USER
ā
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā šļø CLI (@aiready/cli) ā¬
YOU ARE HERE ā
ā Unified Interface & Orchestration ā
āāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā
ā¼
š¢ HUB (core)
ā
āāāāāāāāāāāāā¼āāāāāāāāāāāā¬āāāāāāāāāāāā
ā¼ ā¼ ā¼ ā¼
š PATTERN š¦ CONTEXT š§ CONSIST š DOC
DETECT ANALYZER ENCY DRIFT
ā
Ready ā
Ready ā
Ready š Soon
Currently Supported (64% market coverage):
- ā
TypeScript (.ts, .tsx).js
- ā
JavaScript (, .jsx).py
- ā
Python () - PEP 8 conventions, import analysis, pattern detection
Roadmap:
- š Java (Q3 2026) - Maven/Gradle, Spring Framework
- š Go (Q4 2026) - Go modules, concurrency patterns
- š Rust (Q4 2026) - Cargo, ownership patterns
- š C# (Q1 2027) - .NET, LINQ patterns
Mixed-language projects are fully supported - the tool automatically detects and analyzes each file type appropriately.
Zero config, works out of the box:
`bashRun without installation (recommended)
npx @aiready/cli scan ./src
$3
Input: Path to your source code directory
`bash
aiready scan ./src
`Output: Terminal report + optional JSON file (saved to
.aiready/ directory)`
š AIReady Scan Results
āāāāāāāāāāāāāāāāāāāāāāāāāāā
š Pattern Detection
š Files analyzed: 47
ā ļø Duplicate patterns: 12 files with 23 issues
š° Wasted tokens: 8,450š¦ Context Analysis
š Files analyzed: 47
ā ļø High context cost: 8 files
š Deep import chains: 5 files
`$3
- ā
Auto-excludes test files (
/.test., /.spec., /__tests__/)
- ā
Auto-excludes build outputs (dist/, build/, .next/, cdk.out/)
- ā
Auto-excludes dependencies (node_modules/)
- ā
Adaptive thresholds: Adjusts issue detection based on codebase size
- ā
Unified reporting: Combines results from all tools into one view> Override defaults with
--include or --exclude options as neededš¦ Commands
$3
Run multiple analysis tools in one command:
`bash
aiready scan
`Options:
-
-t, --tools : Tools to run (comma-separated: patterns,context,consistency) (default: patterns,context)
- --include : File patterns to include (comma-separated)
- --exclude : File patterns to exclude (comma-separated)
- -o, --output : Output format: console, json (default: console)
- --output-file : Output file path (defaults to .aiready/aiready-scan-YYYY-MM-DD.json)$3
Access each tool directly for focused analysis:
#### Pattern Detection
`bash
aiready patterns [options]
`Options:
-
-s, --similarity : Minimum similarity score (0-1) (default: 0.40)
- -l, --min-lines : Minimum lines to consider (default: 5)
- --include : File patterns to include (comma-separated)
- --exclude : File patterns to exclude (comma-separated)
- -o, --output : Output format: console, json (default: console)
- --output-file : Output file path (defaults to .aiready/pattern-report-YYYY-MM-DD.json)#### Context Analysis
`bash
aiready context [options]
`Options:
-
--max-depth : Maximum acceptable import depth (default: 5)
- --max-context : Maximum acceptable context budget (tokens) (default: 10000)
- --include : File patterns to include (comma-separated)
- --exclude : File patterns to exclude (comma-separated)
- -o, --output : Output format: console, json (default: console)
- --output-file : Output file path (defaults to .aiready/context-report-YYYY-MM-DD.json)#### Consistency Analysis
`bash
aiready consistency [options]
`Options:
-
--include : File patterns to include (comma-separated)
- --exclude : File patterns to exclude (comma-separated)
- -o, --output : Output format: console, json (default: console)
- --output-file : Output file path (defaults to .aiready/consistency-report-YYYY-MM-DD.json)> š Output Files: By default, all output files are saved to the
.aiready/ directory in your project root with timestamped filenames. You can override this with --output-file.š” Examples
$3
`bash
Analyze current directory with all tools
aiready scan .Run specific tools only
aiready scan . --tools patterns,contextAnalyze only patterns
aiready patterns .Analyze only context costs
aiready context .Analyze only consistency
aiready consistency .
`$3
`bash
Analyze specific file types
aiready scan ./src --include "/.ts,/.js"Exclude test files
aiready scan . --exclude "/.test.,/.spec."Save results to JSON file (.aiready/ directory by default)
aiready scan . --output jsonSave to custom location
aiready scan . --output json --output-file custom-results.jsonRun only pattern analysis with custom similarity threshold
aiready patterns . --similarity 0.6 --min-lines 10Run context analysis with custom thresholds
aiready context . --max-depth 3 --max-context 5000
`āļø Configuration
AIReady supports configuration files to persist your settings. Create one of these files in your project root:
-
aiready.json
- aiready.config.json
- .aiready.json
- .aireadyrc.json
- aiready.config.js
- .aireadyrc.js$3
`json
{
"scan": {
"include": ["*/.{ts,tsx,js,jsx}"],
"exclude": ["/test/", "/.test.", "/.spec."]
},
"tools": {
"pattern-detect": {
"minSimilarity": 0.5,
"minLines": 8,
"approx": false
},
"context-analyzer": {
"maxDepth": 4,
"maxContextBudget": 8000,
"includeNodeModules": false
}
},
"output": {
"format": "console",
"file": "aiready-report.json"
}
}
`Configuration values are merged with defaults, and CLI options take precedence over config file settings.
š CI/CD Integration
`bash
JSON output for automated processing
aiready scan . --output json --output-file aiready-results.jsonExit with error code if issues found
aiready scan . && echo "No issues found" || echo "Issues detected"
`š Output Formats
$3
Human-readable summary with key metrics and issue counts.
$3
Structured data including:
- Full analysis results
- Detailed metrics
- Issue breakdowns
- Execution timing
š¦ Exit Codes
-
0: Success, no critical issues
- 1`: Analysis failed or critical issues foundThe CLI is designed to integrate with:
- CI/CD pipelines
- Pre-commit hooks
- IDE extensions
- Automated workflows
For programmatic usage, see the individual packages:
- @aiready/pattern-detect
- @aiready/context-analyzer
- @aiready/consistency
Try AIReady tools online and learn more: getaiready.dev