@aiready/cli 0.7.11 → 0.7.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
 
2
2
  
3
- > @aiready/cli@0.7.11 build /Users/pengcao/projects/aiready/packages/cli
3
+ > @aiready/cli@0.7.14 build /Users/pengcao/projects/aiready/packages/cli
4
4
  > tsup src/index.ts src/cli.ts --format cjs,esm --dts
5
5
 
6
6
  CLI Building entry: src/cli.ts, src/index.ts
@@ -10,14 +10,14 @@
10
10
  CJS Build start
11
11
  ESM Build start
12
12
  CJS dist/index.js 4.55 KB
13
- CJS dist/cli.js 28.45 KB
14
- CJS ⚡️ Build success in 13ms
13
+ CJS dist/cli.js 28.47 KB
14
+ CJS ⚡️ Build success in 30ms
15
+ ESM dist/cli.mjs 22.00 KB
15
16
  ESM dist/index.mjs 138.00 B
16
- ESM dist/cli.mjs 21.98 KB
17
17
  ESM dist/chunk-AGAMURT4.mjs 3.42 KB
18
- ESM ⚡️ Build success in 14ms
18
+ ESM ⚡️ Build success in 30ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 459ms
20
+ DTS ⚡️ Build success in 680ms
21
21
  DTS dist/cli.d.ts 20.00 B
22
22
  DTS dist/index.d.ts 991.00 B
23
23
  DTS dist/cli.d.mts 20.00 B
@@ -1,6 +1,6 @@
1
1
 
2
2
  
3
- > @aiready/cli@0.7.11 test /Users/pengcao/projects/aiready/packages/cli
3
+ > @aiready/cli@0.7.14 test /Users/pengcao/projects/aiready/packages/cli
4
4
  > vitest run
5
5
 
6
6
  [?25l
@@ -11,15 +11,15 @@
11
11
 
12
12
   Test Files 0 passed (1)
13
13
   Tests 0 passed (0)
14
-  Start at 01:49:11
14
+  Start at 17:35:18
15
15
   Duration 0ms
16
16
  [?2026l[?2026h
17
17
   ❯ src/__tests__/cli.test.ts 0/3
18
18
 
19
19
   Test Files 0 passed (1)
20
20
   Tests 0 passed (3)
21
-  Start at 01:49:11
22
-  Duration 203ms
21
+  Start at 17:35:18
22
+  Duration 300ms
23
23
  [?2026l ✓ src/__tests__/cli.test.ts (3 tests) 2ms
24
24
  ✓ CLI Unified Analysis (3)
25
25
  ✓ should run unified analysis with both tools 1ms
@@ -28,7 +28,7 @@
28
28
 
29
29
   Test Files  1 passed (1)
30
30
   Tests  3 passed (3)
31
-  Start at  01:49:11
32
-  Duration  275ms (transform 49ms, setup 0ms, import 203ms, tests 2ms, environment 0ms)
31
+  Start at  17:35:18
32
+  Duration  314ms (transform 52ms, setup 0ms, import 233ms, tests 2ms, environment 0ms)
33
33
 
34
34
  [?25h
package/README.md CHANGED
@@ -1,36 +1,82 @@
1
1
  # @aiready/cli
2
2
 
3
- Unified CLI for AIReady analysis tools. Provides both unified analysis and individual tool access.
3
+ > **Unified CLI for AIReady analysis tools - Run all AI-readiness checks from a single command**
4
4
 
5
- ## Installation
5
+ The CLI provides both unified analysis (scan multiple tools at once) and individual tool access for pattern detection, context analysis, and consistency checking.
6
+
7
+ ## 🚀 Quick Start
8
+
9
+ **Zero config, works out of the box:**
6
10
 
7
11
  ```bash
12
+ # Run without installation (recommended)
13
+ npx @aiready/cli scan ./src
14
+
15
+ # Or install globally for simpler command and faster runs
8
16
  npm install -g @aiready/cli
9
- # or
10
- pnpm add -g @aiready/cli
11
- # or
12
- yarn global add @aiready/cli
17
+ aiready scan ./src
13
18
  ```
14
19
 
15
- ## Usage
20
+ ### 🎯 Input & Output
21
+
22
+ **Input:** Path to your source code directory
23
+ ```bash
24
+ aiready scan ./src
25
+ ```
16
26
 
17
- ### Unified Analysis
27
+ **Output:** Terminal report + optional JSON file (saved to `.aiready/` directory)
28
+ ```
29
+ 📊 AIReady Scan Results
30
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
31
+ 🔍 Pattern Detection
32
+ 📁 Files analyzed: 47
33
+ ⚠️ Duplicate patterns: 12 files with 23 issues
34
+ 💰 Wasted tokens: 8,450
35
+
36
+ 📦 Context Analysis
37
+ 📁 Files analyzed: 47
38
+ ⚠️ High context cost: 8 files
39
+ 🔗 Deep import chains: 5 files
40
+ ```
18
41
 
19
- Run both pattern detection and context analysis:
42
+ ### Smart Defaults (Zero Config)
43
+
44
+ - ✅ **Auto-excludes** test files (`**/*.test.*`, `**/*.spec.*`, `**/__tests__/**`)
45
+ - ✅ **Auto-excludes** build outputs (`dist/`, `build/`, `.next/`, `cdk.out/`)
46
+ - ✅ **Auto-excludes** dependencies (`node_modules/`)
47
+ - ✅ **Adaptive thresholds**: Adjusts issue detection based on codebase size
48
+ - ✅ **Unified reporting**: Combines results from all tools into one view
49
+
50
+ > Override defaults with `--include` or `--exclude` options as needed
51
+
52
+ ## 📦 Commands
53
+
54
+ ### Unified Scan
55
+
56
+ Run multiple analysis tools in one command:
20
57
 
21
58
  ```bash
22
59
  aiready scan <directory>
23
60
  ```
24
61
 
62
+ **Options:**
63
+ - `-t, --tools <tools>`: Tools to run (comma-separated: patterns,context,consistency) (default: patterns,context)
64
+ - `--include <patterns>`: File patterns to include (comma-separated)
65
+ - `--exclude <patterns>`: File patterns to exclude (comma-separated)
66
+ - `-o, --output <format>`: Output format: console, json (default: console)
67
+ - `--output-file <path>`: Output file path (defaults to `.aiready/aiready-scan-YYYY-MM-DD.json`)
68
+
25
69
  ### Individual Tools
26
70
 
71
+ Access each tool directly for focused analysis:
72
+
27
73
  #### Pattern Detection
28
74
 
29
75
  ```bash
30
76
  aiready patterns <directory> [options]
31
77
  ```
32
78
 
33
- Options:
79
+ **Options:**
34
80
  - `-s, --similarity <number>`: Minimum similarity score (0-1) (default: 0.40)
35
81
  - `-l, --min-lines <number>`: Minimum lines to consider (default: 5)
36
82
  - `--include <patterns>`: File patterns to include (comma-separated)
@@ -44,7 +90,7 @@ Options:
44
90
  aiready context <directory> [options]
45
91
  ```
46
92
 
47
- Options:
93
+ **Options:**
48
94
  - `--max-depth <number>`: Maximum acceptable import depth (default: 5)
49
95
  - `--max-context <number>`: Maximum acceptable context budget (tokens) (default: 10000)
50
96
  - `--include <patterns>`: File patterns to include (comma-separated)
@@ -52,34 +98,39 @@ Options:
52
98
  - `-o, --output <format>`: Output format: console, json (default: console)
53
99
  - `--output-file <path>`: Output file path (defaults to `.aiready/context-report-YYYY-MM-DD.json`)
54
100
 
55
- ### Unified Scan Options
101
+ #### Consistency Analysis
56
102
 
57
103
  ```bash
58
- aiready scan <directory> [options]
104
+ aiready consistency <directory> [options]
59
105
  ```
60
106
 
61
- Options:
62
- - `-t, --tools <tools>`: Tools to run (comma-separated: patterns,context) (default: patterns,context)
107
+ **Options:**
63
108
  - `--include <patterns>`: File patterns to include (comma-separated)
64
109
  - `--exclude <patterns>`: File patterns to exclude (comma-separated)
65
110
  - `-o, --output <format>`: Output format: console, json (default: console)
66
- - `--output-file <path>`: Output file path (defaults to `.aiready/aiready-scan-YYYY-MM-DD.json`)
111
+ - `--output-file <path>`: Output file path (defaults to `.aiready/consistency-report-YYYY-MM-DD.json`)
67
112
 
68
113
  > **📁 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`.
69
114
 
70
- ## Examples
115
+ ## 💡 Examples
71
116
 
72
- ### Quick Analysis
117
+ ### Basic Usage
73
118
 
74
119
  ```bash
75
- # Analyze current directory with both tools
120
+ # Analyze current directory with all tools
76
121
  aiready scan .
77
122
 
123
+ # Run specific tools only
124
+ aiready scan . --tools patterns,context
125
+
78
126
  # Analyze only patterns
79
127
  aiready patterns .
80
128
 
81
129
  # Analyze only context costs
82
130
  aiready context .
131
+
132
+ # Analyze only consistency
133
+ aiready consistency .
83
134
  ```
84
135
 
85
136
  ### Advanced Usage
@@ -99,22 +150,12 @@ aiready scan . --output json --output-file custom-results.json
99
150
 
100
151
  # Run only pattern analysis with custom similarity threshold
101
152
  aiready patterns . --similarity 0.6 --min-lines 10
102
- ```
103
-
104
- ### Default Exclusions
105
-
106
- By default, these common build and output directories are excluded from analysis:
107
-
108
- - Dependencies: `**/node_modules/**`
109
- - Build outputs: `**/dist/**`, `**/build/**`, `**/out/**`, `**/output/**`, etc.
110
- - Framework caches: `**/.next/**`, `**/.nuxt/**`, `**/.cache/**`, `**/.turbo/**`
111
- - Test/coverage: `**/coverage/**`, `**/.nyc_output/**`, `**/.jest/**`
112
- - Version control/IDE: `**/.git/**`, `**/.vscode/**`, `**/.idea/**`
113
- - Build artifacts: `**/*.min.js`, `**/*.bundle.js`, `**/*.tsbuildinfo`
114
153
 
115
- Use `--include` and `--exclude` options to customize file selection.
154
+ # Run context analysis with custom thresholds
155
+ aiready context . --max-depth 3 --max-context 5000
156
+ ```
116
157
 
117
- ### Configuration
158
+ ## ⚙️ Configuration
118
159
 
119
160
  AIReady supports configuration files to persist your settings. Create one of these files in your project root:
120
161
 
@@ -125,7 +166,7 @@ AIReady supports configuration files to persist your settings. Create one of the
125
166
  - `aiready.config.js`
126
167
  - `.aireadyrc.js`
127
168
 
128
- #### Example Configuration
169
+ ### Example Configuration
129
170
 
130
171
  ```json
131
172
  {
@@ -154,7 +195,7 @@ AIReady supports configuration files to persist your settings. Create one of the
154
195
 
155
196
  Configuration values are merged with defaults, and CLI options take precedence over config file settings.
156
197
 
157
- ### CI/CD Integration
198
+ ## 🔄 CI/CD Integration
158
199
 
159
200
  ```bash
160
201
  # JSON output for automated processing
@@ -164,7 +205,7 @@ aiready scan . --output json --output-file aiready-results.json
164
205
  aiready scan . && echo "No issues found" || echo "Issues detected"
165
206
  ```
166
207
 
167
- ## Output Formats
208
+ ## 📊 Output Formats
168
209
 
169
210
  ### Console Output
170
211
 
@@ -178,12 +219,12 @@ Structured data including:
178
219
  - Issue breakdowns
179
220
  - Execution timing
180
221
 
181
- ## Exit Codes
222
+ ## 🚦 Exit Codes
182
223
 
183
224
  - `0`: Success, no critical issues
184
225
  - `1`: Analysis failed or critical issues found
185
226
 
186
- ## Integration
227
+ ## 🔗 Integration
187
228
 
188
229
  The CLI is designed to integrate with:
189
230
  - CI/CD pipelines
@@ -194,4 +235,8 @@ The CLI is designed to integrate with:
194
235
  For programmatic usage, see the individual packages:
195
236
  - [@aiready/pattern-detect](https://www.npmjs.com/package/@aiready/pattern-detect)
196
237
  - [@aiready/context-analyzer](https://www.npmjs.com/package/@aiready/context-analyzer)
197
- - [@aiready/consistency](https://www.npmjs.com/package/@aiready/consistency)
238
+ - [@aiready/consistency](https://www.npmjs.com/package/@aiready/consistency)
239
+
240
+ ## 🌐 Visit Our Website
241
+
242
+ **Try AIReady tools online and learn more:** [getaiready.dev](https://getaiready.dev)
package/dist/cli.js CHANGED
@@ -140,7 +140,7 @@ var import_fs2 = require("fs");
140
140
  var packageJson = JSON.parse((0, import_fs2.readFileSync)((0, import_path.join)(__dirname, "../package.json"), "utf8"));
141
141
  var program = new import_commander.Command();
142
142
  program.name("aiready").description("AIReady - Unified AI-readiness analysis tools").version(packageJson.version).addHelpText("after", "\nCONFIGURATION:\n Supports config files: aiready.json, aiready.config.json, .aiready.json, .aireadyrc.json, aiready.config.js, .aireadyrc.js\n CLI options override config file settings");
143
- program.command("scan").description("Run unified analysis on a codebase").argument("<directory>", "Directory to analyze").option("-t, --tools <tools>", "Tools to run (comma-separated: patterns,context,consistency)", "patterns,context,consistency").option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").action(async (directory, options) => {
143
+ program.command("scan").description("Run unified analysis on a codebase").argument("[directory]", "Directory to analyze", ".").option("-t, --tools <tools>", "Tools to run (comma-separated: patterns,context,consistency)", "patterns,context,consistency").option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").action(async (directory, options) => {
144
144
  console.log(import_chalk.default.blue("\u{1F680} Starting AIReady unified analysis...\n"));
145
145
  const startTime = Date.now();
146
146
  try {
@@ -189,7 +189,7 @@ program.command("scan").description("Run unified analysis on a codebase").argume
189
189
  (0, import_core.handleCLIError)(error, "Analysis");
190
190
  }
191
191
  });
192
- program.command("patterns").description("Run pattern detection analysis").argument("<directory>", "Directory to analyze").option("-s, --similarity <number>", "Minimum similarity score (0-1)", "0.40").option("-l, --min-lines <number>", "Minimum lines to consider", "5").option("--max-candidates <number>", "Maximum candidates per block (performance tuning)").option("--min-shared-tokens <number>", "Minimum shared tokens for candidates (performance tuning)").option("--full-scan", "Disable smart defaults for comprehensive analysis (slower)").option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").action(async (directory, options) => {
192
+ program.command("patterns").description("Run pattern detection analysis").argument("[directory]", "Directory to analyze", ".").option("-s, --similarity <number>", "Minimum similarity score (0-1)", "0.40").option("-l, --min-lines <number>", "Minimum lines to consider", "5").option("--max-candidates <number>", "Maximum candidates per block (performance tuning)").option("--min-shared-tokens <number>", "Minimum shared tokens for candidates (performance tuning)").option("--full-scan", "Disable smart defaults for comprehensive analysis (slower)").option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").action(async (directory, options) => {
193
193
  console.log(import_chalk.default.blue("\u{1F50D} Analyzing patterns...\n"));
194
194
  const startTime = Date.now();
195
195
  try {
@@ -281,7 +281,7 @@ program.command("patterns").description("Run pattern detection analysis").argume
281
281
  (0, import_core.handleCLIError)(error, "Pattern analysis");
282
282
  }
283
283
  });
284
- program.command("context").description("Run context window cost analysis").argument("<directory>", "Directory to analyze").option("--max-depth <number>", "Maximum acceptable import depth", "5").option("--max-context <number>", "Maximum acceptable context budget (tokens)", "10000").option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").action(async (directory, options) => {
284
+ program.command("context").description("Run context window cost analysis").argument("[directory]", "Directory to analyze", ".").option("--max-depth <number>", "Maximum acceptable import depth", "5").option("--max-context <number>", "Maximum acceptable context budget (tokens)", "10000").option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").action(async (directory, options) => {
285
285
  console.log(import_chalk.default.blue("\u{1F9E0} Analyzing context costs...\n"));
286
286
  const startTime = Date.now();
287
287
  try {
@@ -406,7 +406,7 @@ program.command("context").description("Run context window cost analysis").argum
406
406
  (0, import_core.handleCLIError)(error, "Context analysis");
407
407
  }
408
408
  });
409
- program.command("consistency").description("Check naming, patterns, and architecture consistency").argument("<directory>", "Directory to analyze").option("--naming", "Check naming conventions (default: true)").option("--no-naming", "Skip naming analysis").option("--patterns", "Check code patterns (default: true)").option("--no-patterns", "Skip pattern analysis").option("--min-severity <level>", "Minimum severity: info|minor|major|critical", "info").option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json, markdown", "console").option("--output-file <path>", "Output file path (for json/markdown)").action(async (directory, options) => {
409
+ program.command("consistency").description("Check naming, patterns, and architecture consistency").argument("[directory]", "Directory to analyze", ".").option("--naming", "Check naming conventions (default: true)").option("--no-naming", "Skip naming analysis").option("--patterns", "Check code patterns (default: true)").option("--no-patterns", "Skip pattern analysis").option("--min-severity <level>", "Minimum severity: info|minor|major|critical", "info").option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json, markdown", "console").option("--output-file <path>", "Output file path (for json/markdown)").action(async (directory, options) => {
410
410
  console.log(import_chalk.default.blue("\u{1F50D} Analyzing consistency...\n"));
411
411
  const startTime = Date.now();
412
412
  try {
package/dist/cli.mjs CHANGED
@@ -14,7 +14,7 @@ import { readFileSync } from "fs";
14
14
  var packageJson = JSON.parse(readFileSync(join(__dirname, "../package.json"), "utf8"));
15
15
  var program = new Command();
16
16
  program.name("aiready").description("AIReady - Unified AI-readiness analysis tools").version(packageJson.version).addHelpText("after", "\nCONFIGURATION:\n Supports config files: aiready.json, aiready.config.json, .aiready.json, .aireadyrc.json, aiready.config.js, .aireadyrc.js\n CLI options override config file settings");
17
- program.command("scan").description("Run unified analysis on a codebase").argument("<directory>", "Directory to analyze").option("-t, --tools <tools>", "Tools to run (comma-separated: patterns,context,consistency)", "patterns,context,consistency").option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").action(async (directory, options) => {
17
+ program.command("scan").description("Run unified analysis on a codebase").argument("[directory]", "Directory to analyze", ".").option("-t, --tools <tools>", "Tools to run (comma-separated: patterns,context,consistency)", "patterns,context,consistency").option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").action(async (directory, options) => {
18
18
  console.log(chalk.blue("\u{1F680} Starting AIReady unified analysis...\n"));
19
19
  const startTime = Date.now();
20
20
  try {
@@ -63,7 +63,7 @@ program.command("scan").description("Run unified analysis on a codebase").argume
63
63
  handleCLIError(error, "Analysis");
64
64
  }
65
65
  });
66
- program.command("patterns").description("Run pattern detection analysis").argument("<directory>", "Directory to analyze").option("-s, --similarity <number>", "Minimum similarity score (0-1)", "0.40").option("-l, --min-lines <number>", "Minimum lines to consider", "5").option("--max-candidates <number>", "Maximum candidates per block (performance tuning)").option("--min-shared-tokens <number>", "Minimum shared tokens for candidates (performance tuning)").option("--full-scan", "Disable smart defaults for comprehensive analysis (slower)").option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").action(async (directory, options) => {
66
+ program.command("patterns").description("Run pattern detection analysis").argument("[directory]", "Directory to analyze", ".").option("-s, --similarity <number>", "Minimum similarity score (0-1)", "0.40").option("-l, --min-lines <number>", "Minimum lines to consider", "5").option("--max-candidates <number>", "Maximum candidates per block (performance tuning)").option("--min-shared-tokens <number>", "Minimum shared tokens for candidates (performance tuning)").option("--full-scan", "Disable smart defaults for comprehensive analysis (slower)").option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").action(async (directory, options) => {
67
67
  console.log(chalk.blue("\u{1F50D} Analyzing patterns...\n"));
68
68
  const startTime = Date.now();
69
69
  try {
@@ -155,7 +155,7 @@ program.command("patterns").description("Run pattern detection analysis").argume
155
155
  handleCLIError(error, "Pattern analysis");
156
156
  }
157
157
  });
158
- program.command("context").description("Run context window cost analysis").argument("<directory>", "Directory to analyze").option("--max-depth <number>", "Maximum acceptable import depth", "5").option("--max-context <number>", "Maximum acceptable context budget (tokens)", "10000").option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").action(async (directory, options) => {
158
+ program.command("context").description("Run context window cost analysis").argument("[directory]", "Directory to analyze", ".").option("--max-depth <number>", "Maximum acceptable import depth", "5").option("--max-context <number>", "Maximum acceptable context budget (tokens)", "10000").option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").action(async (directory, options) => {
159
159
  console.log(chalk.blue("\u{1F9E0} Analyzing context costs...\n"));
160
160
  const startTime = Date.now();
161
161
  try {
@@ -280,7 +280,7 @@ program.command("context").description("Run context window cost analysis").argum
280
280
  handleCLIError(error, "Context analysis");
281
281
  }
282
282
  });
283
- program.command("consistency").description("Check naming, patterns, and architecture consistency").argument("<directory>", "Directory to analyze").option("--naming", "Check naming conventions (default: true)").option("--no-naming", "Skip naming analysis").option("--patterns", "Check code patterns (default: true)").option("--no-patterns", "Skip pattern analysis").option("--min-severity <level>", "Minimum severity: info|minor|major|critical", "info").option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json, markdown", "console").option("--output-file <path>", "Output file path (for json/markdown)").action(async (directory, options) => {
283
+ program.command("consistency").description("Check naming, patterns, and architecture consistency").argument("[directory]", "Directory to analyze", ".").option("--naming", "Check naming conventions (default: true)").option("--no-naming", "Skip naming analysis").option("--patterns", "Check code patterns (default: true)").option("--no-patterns", "Skip pattern analysis").option("--min-severity <level>", "Minimum severity: info|minor|major|critical", "info").option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json, markdown", "console").option("--output-file <path>", "Output file path (for json/markdown)").action(async (directory, options) => {
284
284
  console.log(chalk.blue("\u{1F50D} Analyzing consistency...\n"));
285
285
  const startTime = Date.now();
286
286
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiready/cli",
3
- "version": "0.7.11",
3
+ "version": "0.7.14",
4
4
  "description": "Unified CLI for AIReady analysis tools",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -11,10 +11,10 @@
11
11
  "dependencies": {
12
12
  "commander": "^12.1.0",
13
13
  "chalk": "^5.3.0",
14
- "@aiready/core": "0.7.4",
15
- "@aiready/consistency": "0.6.6",
16
- "@aiready/pattern-detect": "0.9.10",
17
- "@aiready/context-analyzer": "0.7.6"
14
+ "@aiready/core": "0.7.5",
15
+ "@aiready/context-analyzer": "0.7.7",
16
+ "@aiready/pattern-detect": "0.9.11",
17
+ "@aiready/consistency": "0.6.8"
18
18
  },
19
19
  "devDependencies": {
20
20
  "tsup": "^8.3.5",
@@ -27,6 +27,14 @@
27
27
  "code-analysis"
28
28
  ],
29
29
  "license": "MIT",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "https://github.com/caopengau/aiready-cli.git"
33
+ },
34
+ "homepage": "https://github.com/caopengau/aiready-cli",
35
+ "bugs": {
36
+ "url": "https://github.com/caopengau/aiready-cli/issues"
37
+ },
30
38
  "scripts": {
31
39
  "build": "tsup src/index.ts src/cli.ts --format cjs,esm --dts",
32
40
  "dev": "tsup src/index.ts src/cli.ts --format cjs,esm --dts --watch",
package/src/cli.ts CHANGED
@@ -21,7 +21,7 @@ program
21
21
  program
22
22
  .command('scan')
23
23
  .description('Run unified analysis on a codebase')
24
- .argument('<directory>', 'Directory to analyze')
24
+ .argument('[directory]', 'Directory to analyze', '.')
25
25
  .option('-t, --tools <tools>', 'Tools to run (comma-separated: patterns,context,consistency)', 'patterns,context,consistency')
26
26
  .option('--include <patterns>', 'File patterns to include (comma-separated)')
27
27
  .option('--exclude <patterns>', 'File patterns to exclude (comma-separated)')
@@ -95,7 +95,7 @@ program
95
95
  program
96
96
  .command('patterns')
97
97
  .description('Run pattern detection analysis')
98
- .argument('<directory>', 'Directory to analyze')
98
+ .argument('[directory]', 'Directory to analyze', '.')
99
99
  .option('-s, --similarity <number>', 'Minimum similarity score (0-1)', '0.40')
100
100
  .option('-l, --min-lines <number>', 'Minimum lines to consider', '5')
101
101
  .option('--max-candidates <number>', 'Maximum candidates per block (performance tuning)')
@@ -234,7 +234,7 @@ program
234
234
  program
235
235
  .command('context')
236
236
  .description('Run context window cost analysis')
237
- .argument('<directory>', 'Directory to analyze')
237
+ .argument('[directory]', 'Directory to analyze', '.')
238
238
  .option('--max-depth <number>', 'Maximum acceptable import depth', '5')
239
239
  .option('--max-context <number>', 'Maximum acceptable context budget (tokens)', '10000')
240
240
  .option('--include <patterns>', 'File patterns to include (comma-separated)')
@@ -393,7 +393,7 @@ program
393
393
  program
394
394
  .command('consistency')
395
395
  .description('Check naming, patterns, and architecture consistency')
396
- .argument('<directory>', 'Directory to analyze')
396
+ .argument('[directory]', 'Directory to analyze', '.')
397
397
  .option('--naming', 'Check naming conventions (default: true)')
398
398
  .option('--no-naming', 'Skip naming analysis')
399
399
  .option('--patterns', 'Check code patterns (default: true)')