@aiready/cli 0.8.1 → 0.9.1

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.8.1 build /Users/pengcao/projects/aiready/packages/cli
3
+ > @aiready/cli@0.9.1 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
@@ -9,15 +9,15 @@
9
9
  CLI Target: es2020
10
10
  CJS Build start
11
11
  ESM Build start
12
- ESM dist/index.mjs 138.00 B
13
- ESM dist/cli.mjs 36.91 KB
14
- ESM dist/chunk-3SG2GLFJ.mjs 3.80 KB
15
- ESM ⚡️ Build success in 47ms
16
- CJS dist/cli.js 43.96 KB
17
12
  CJS dist/index.js 4.93 KB
18
- CJS ⚡️ Build success in 49ms
13
+ CJS dist/cli.js 44.24 KB
14
+ CJS ⚡️ Build success in 22ms
15
+ ESM dist/chunk-3SG2GLFJ.mjs 3.80 KB
16
+ ESM dist/index.mjs 138.00 B
17
+ ESM dist/cli.mjs 37.19 KB
18
+ ESM ⚡️ Build success in 22ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 899ms
20
+ DTS ⚡️ Build success in 616ms
21
21
  DTS dist/cli.d.ts 20.00 B
22
22
  DTS dist/index.d.ts 1.22 KB
23
23
  DTS dist/cli.d.mts 20.00 B
@@ -1,6 +1,6 @@
1
1
 
2
2
  
3
- > @aiready/cli@0.8.1 test /Users/pengcao/projects/aiready/packages/cli
3
+ > @aiready/cli@0.9.1 test /Users/pengcao/projects/aiready/packages/cli
4
4
  > vitest run
5
5
 
6
6
  [?25l
@@ -11,24 +11,24 @@
11
11
 
12
12
   Test Files 0 passed (1)
13
13
   Tests 0 passed (0)
14
-  Start at 18:12:05
15
-  Duration 220ms
14
+  Start at 20:59:54
15
+  Duration 101ms
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 18:12:05
22
-  Duration 726ms
21
+  Start at 20:59:54
22
+  Duration 521ms
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
26
- ✓ should run analysis with only patterns tool 1ms
26
+ ✓ should run analysis with only patterns tool 0ms
27
27
  ✓ should run analysis with only context tool 0ms
28
28
 
29
29
   Test Files  1 passed (1)
30
30
   Tests  3 passed (3)
31
-  Start at  18:12:05
32
-  Duration  804ms (transform 194ms, setup 0ms, import 490ms, tests 2ms, environment 0ms)
31
+  Start at  20:59:54
32
+  Duration  581ms (transform 114ms, setup 0ms, import 378ms, tests 2ms, environment 0ms)
33
33
 
34
34
  [?25h
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
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
6
 
7
- ## �️ Architecture
7
+ ## 🏛️ Architecture
8
8
 
9
9
  ```
10
10
  🎯 USER
@@ -25,14 +25,16 @@ The CLI provides both unified analysis (scan multiple tools at once) and individ
25
25
  ✅ Ready ✅ Ready ✅ Ready 🔜 Soon
26
26
  ```
27
27
 
28
- ## �🌍 Language Support
28
+ ## 🌍 Language Support
29
29
 
30
30
  **Currently Supported (64% market coverage):**
31
+
31
32
  - ✅ **TypeScript** (`.ts`, `.tsx`)
32
33
  - ✅ **JavaScript** (`.js`, `.jsx`)
33
34
  - ✅ **Python** (`.py`) - PEP 8 conventions, import analysis, pattern detection
34
35
 
35
36
  **Roadmap:**
37
+
36
38
  - 🔜 **Java** (Q3 2026) - Maven/Gradle, Spring Framework
37
39
  - 🔜 **Go** (Q4 2026) - Go modules, concurrency patterns
38
40
  - 🔜 **Rust** (Q4 2026) - Cargo, ownership patterns
@@ -56,11 +58,13 @@ aiready scan ./src
56
58
  ### 🎯 Input & Output
57
59
 
58
60
  **Input:** Path to your source code directory
61
+
59
62
  ```bash
60
63
  aiready scan ./src
61
64
  ```
62
65
 
63
66
  **Output:** Terminal report + optional JSON file (saved to `.aiready/` directory)
67
+
64
68
  ```
65
69
  📊 AIReady Scan Results
66
70
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -96,6 +100,7 @@ aiready scan <directory>
96
100
  ```
97
101
 
98
102
  **Options:**
103
+
99
104
  - `-t, --tools <tools>`: Tools to run (comma-separated: patterns,context,consistency) (default: patterns,context)
100
105
  - `--include <patterns>`: File patterns to include (comma-separated)
101
106
  - `--exclude <patterns>`: File patterns to exclude (comma-separated)
@@ -113,6 +118,7 @@ aiready patterns <directory> [options]
113
118
  ```
114
119
 
115
120
  **Options:**
121
+
116
122
  - `-s, --similarity <number>`: Minimum similarity score (0-1) (default: 0.40)
117
123
  - `-l, --min-lines <number>`: Minimum lines to consider (default: 5)
118
124
  - `--include <patterns>`: File patterns to include (comma-separated)
@@ -127,6 +133,7 @@ aiready context <directory> [options]
127
133
  ```
128
134
 
129
135
  **Options:**
136
+
130
137
  - `--max-depth <number>`: Maximum acceptable import depth (default: 5)
131
138
  - `--max-context <number>`: Maximum acceptable context budget (tokens) (default: 10000)
132
139
  - `--include <patterns>`: File patterns to include (comma-separated)
@@ -141,6 +148,7 @@ aiready consistency <directory> [options]
141
148
  ```
142
149
 
143
150
  **Options:**
151
+
144
152
  - `--include <patterns>`: File patterns to include (comma-separated)
145
153
  - `--exclude <patterns>`: File patterns to exclude (comma-separated)
146
154
  - `-o, --output <format>`: Output format: console, json (default: console)
@@ -250,6 +258,7 @@ Human-readable summary with key metrics and issue counts.
250
258
  ### JSON Output
251
259
 
252
260
  Structured data including:
261
+
253
262
  - Full analysis results
254
263
  - Detailed metrics
255
264
  - Issue breakdowns
@@ -263,16 +272,18 @@ Structured data including:
263
272
  ## 🔗 Integration
264
273
 
265
274
  The CLI is designed to integrate with:
275
+
266
276
  - CI/CD pipelines
267
277
  - Pre-commit hooks
268
278
  - IDE extensions
269
279
  - Automated workflows
270
280
 
271
281
  For programmatic usage, see the individual packages:
282
+
272
283
  - [@aiready/pattern-detect](https://www.npmjs.com/package/@aiready/pattern-detect)
273
284
  - [@aiready/context-analyzer](https://www.npmjs.com/package/@aiready/context-analyzer)
274
285
  - [@aiready/consistency](https://www.npmjs.com/package/@aiready/consistency)
275
286
 
276
287
  ## 🌐 Visit Our Website
277
288
 
278
- **Try AIReady tools online and learn more:** [getaiready.dev](https://getaiready.dev)
289
+ **Try AIReady tools online and learn more:** [getaiready.dev](https://getaiready.dev)
package/dist/cli.js CHANGED
@@ -200,7 +200,7 @@ EXAMPLES:
200
200
  if (finalOptions.include) console.log(` include: ${import_chalk.default.bold(truncate(finalOptions.include, 6))}`);
201
201
  if (finalOptions.exclude) console.log(` exclude: ${import_chalk.default.bold(truncate(finalOptions.exclude, 6))}`);
202
202
  if (finalOptions["pattern-detect"] || finalOptions.minSimilarity) {
203
- const pd = finalOptions["pattern-detect"] || {
203
+ const patternDetectConfig = finalOptions["pattern-detect"] || {
204
204
  minSimilarity: finalOptions.minSimilarity,
205
205
  minLines: finalOptions.minLines,
206
206
  approx: finalOptions.approx,
@@ -212,15 +212,15 @@ EXAMPLES:
212
212
  includeTests: finalOptions.includeTests
213
213
  };
214
214
  console.log(import_chalk.default.white("\nPattern-detect settings:"));
215
- console.log(` minSimilarity: ${import_chalk.default.bold(pd.minSimilarity ?? "default")}`);
216
- console.log(` minLines: ${import_chalk.default.bold(pd.minLines ?? "default")}`);
217
- if (pd.approx !== void 0) console.log(` approx: ${import_chalk.default.bold(String(pd.approx))}`);
218
- if (pd.minSharedTokens !== void 0) console.log(` minSharedTokens: ${import_chalk.default.bold(String(pd.minSharedTokens))}`);
219
- if (pd.maxCandidatesPerBlock !== void 0) console.log(` maxCandidatesPerBlock: ${import_chalk.default.bold(String(pd.maxCandidatesPerBlock))}`);
220
- if (pd.batchSize !== void 0) console.log(` batchSize: ${import_chalk.default.bold(String(pd.batchSize))}`);
221
- if (pd.streamResults !== void 0) console.log(` streamResults: ${import_chalk.default.bold(String(pd.streamResults))}`);
222
- if (pd.severity !== void 0) console.log(` severity: ${import_chalk.default.bold(String(pd.severity))}`);
223
- if (pd.includeTests !== void 0) console.log(` includeTests: ${import_chalk.default.bold(String(pd.includeTests))}`);
215
+ console.log(` minSimilarity: ${import_chalk.default.bold(patternDetectConfig.minSimilarity ?? "default")}`);
216
+ console.log(` minLines: ${import_chalk.default.bold(patternDetectConfig.minLines ?? "default")}`);
217
+ if (patternDetectConfig.approx !== void 0) console.log(` approx: ${import_chalk.default.bold(String(patternDetectConfig.approx))}`);
218
+ if (patternDetectConfig.minSharedTokens !== void 0) console.log(` minSharedTokens: ${import_chalk.default.bold(String(patternDetectConfig.minSharedTokens))}`);
219
+ if (patternDetectConfig.maxCandidatesPerBlock !== void 0) console.log(` maxCandidatesPerBlock: ${import_chalk.default.bold(String(patternDetectConfig.maxCandidatesPerBlock))}`);
220
+ if (patternDetectConfig.batchSize !== void 0) console.log(` batchSize: ${import_chalk.default.bold(String(patternDetectConfig.batchSize))}`);
221
+ if (patternDetectConfig.streamResults !== void 0) console.log(` streamResults: ${import_chalk.default.bold(String(patternDetectConfig.streamResults))}`);
222
+ if (patternDetectConfig.severity !== void 0) console.log(` severity: ${import_chalk.default.bold(String(patternDetectConfig.severity))}`);
223
+ if (patternDetectConfig.includeTests !== void 0) console.log(` includeTests: ${import_chalk.default.bold(String(patternDetectConfig.includeTests))}`);
224
224
  }
225
225
  if (finalOptions["context-analyzer"] || finalOptions.maxDepth) {
226
226
  const ca = finalOptions["context-analyzer"] || {
package/dist/cli.mjs CHANGED
@@ -104,7 +104,7 @@ EXAMPLES:
104
104
  if (finalOptions.include) console.log(` include: ${chalk.bold(truncate(finalOptions.include, 6))}`);
105
105
  if (finalOptions.exclude) console.log(` exclude: ${chalk.bold(truncate(finalOptions.exclude, 6))}`);
106
106
  if (finalOptions["pattern-detect"] || finalOptions.minSimilarity) {
107
- const pd = finalOptions["pattern-detect"] || {
107
+ const patternDetectConfig = finalOptions["pattern-detect"] || {
108
108
  minSimilarity: finalOptions.minSimilarity,
109
109
  minLines: finalOptions.minLines,
110
110
  approx: finalOptions.approx,
@@ -116,15 +116,15 @@ EXAMPLES:
116
116
  includeTests: finalOptions.includeTests
117
117
  };
118
118
  console.log(chalk.white("\nPattern-detect settings:"));
119
- console.log(` minSimilarity: ${chalk.bold(pd.minSimilarity ?? "default")}`);
120
- console.log(` minLines: ${chalk.bold(pd.minLines ?? "default")}`);
121
- if (pd.approx !== void 0) console.log(` approx: ${chalk.bold(String(pd.approx))}`);
122
- if (pd.minSharedTokens !== void 0) console.log(` minSharedTokens: ${chalk.bold(String(pd.minSharedTokens))}`);
123
- if (pd.maxCandidatesPerBlock !== void 0) console.log(` maxCandidatesPerBlock: ${chalk.bold(String(pd.maxCandidatesPerBlock))}`);
124
- if (pd.batchSize !== void 0) console.log(` batchSize: ${chalk.bold(String(pd.batchSize))}`);
125
- if (pd.streamResults !== void 0) console.log(` streamResults: ${chalk.bold(String(pd.streamResults))}`);
126
- if (pd.severity !== void 0) console.log(` severity: ${chalk.bold(String(pd.severity))}`);
127
- if (pd.includeTests !== void 0) console.log(` includeTests: ${chalk.bold(String(pd.includeTests))}`);
119
+ console.log(` minSimilarity: ${chalk.bold(patternDetectConfig.minSimilarity ?? "default")}`);
120
+ console.log(` minLines: ${chalk.bold(patternDetectConfig.minLines ?? "default")}`);
121
+ if (patternDetectConfig.approx !== void 0) console.log(` approx: ${chalk.bold(String(patternDetectConfig.approx))}`);
122
+ if (patternDetectConfig.minSharedTokens !== void 0) console.log(` minSharedTokens: ${chalk.bold(String(patternDetectConfig.minSharedTokens))}`);
123
+ if (patternDetectConfig.maxCandidatesPerBlock !== void 0) console.log(` maxCandidatesPerBlock: ${chalk.bold(String(patternDetectConfig.maxCandidatesPerBlock))}`);
124
+ if (patternDetectConfig.batchSize !== void 0) console.log(` batchSize: ${chalk.bold(String(patternDetectConfig.batchSize))}`);
125
+ if (patternDetectConfig.streamResults !== void 0) console.log(` streamResults: ${chalk.bold(String(patternDetectConfig.streamResults))}`);
126
+ if (patternDetectConfig.severity !== void 0) console.log(` severity: ${chalk.bold(String(patternDetectConfig.severity))}`);
127
+ if (patternDetectConfig.includeTests !== void 0) console.log(` includeTests: ${chalk.bold(String(patternDetectConfig.includeTests))}`);
128
128
  }
129
129
  if (finalOptions["context-analyzer"] || finalOptions.maxDepth) {
130
130
  const ca = finalOptions["context-analyzer"] || {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiready/cli",
3
- "version": "0.8.1",
3
+ "version": "0.9.1",
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": "^14.0.0",
13
13
  "chalk": "^5.3.0",
14
- "@aiready/core": "0.8.1",
15
- "@aiready/pattern-detect": "0.10.1",
16
- "@aiready/context-analyzer": "0.8.3",
17
- "@aiready/consistency": "0.7.1"
14
+ "@aiready/core": "0.9.1",
15
+ "@aiready/consistency": "0.8.1",
16
+ "@aiready/pattern-detect": "0.11.1",
17
+ "@aiready/context-analyzer": "0.9.1"
18
18
  },
19
19
  "devDependencies": {
20
20
  "tsup": "^8.3.5",
package/src/cli.ts CHANGED
@@ -139,7 +139,7 @@ EXAMPLES:
139
139
  if (finalOptions.exclude) console.log(` exclude: ${chalk.bold(truncate(finalOptions.exclude, 6))}`);
140
140
 
141
141
  if (finalOptions['pattern-detect'] || finalOptions.minSimilarity) {
142
- const pd = finalOptions['pattern-detect'] || {
142
+ const patternDetectConfig = finalOptions['pattern-detect'] || {
143
143
  minSimilarity: finalOptions.minSimilarity,
144
144
  minLines: finalOptions.minLines,
145
145
  approx: finalOptions.approx,
@@ -151,15 +151,15 @@ EXAMPLES:
151
151
  includeTests: (finalOptions as any).includeTests,
152
152
  };
153
153
  console.log(chalk.white('\nPattern-detect settings:'));
154
- console.log(` minSimilarity: ${chalk.bold(pd.minSimilarity ?? 'default')}`);
155
- console.log(` minLines: ${chalk.bold(pd.minLines ?? 'default')}`);
156
- if (pd.approx !== undefined) console.log(` approx: ${chalk.bold(String(pd.approx))}`);
157
- if (pd.minSharedTokens !== undefined) console.log(` minSharedTokens: ${chalk.bold(String(pd.minSharedTokens))}`);
158
- if (pd.maxCandidatesPerBlock !== undefined) console.log(` maxCandidatesPerBlock: ${chalk.bold(String(pd.maxCandidatesPerBlock))}`);
159
- if (pd.batchSize !== undefined) console.log(` batchSize: ${chalk.bold(String(pd.batchSize))}`);
160
- if (pd.streamResults !== undefined) console.log(` streamResults: ${chalk.bold(String(pd.streamResults))}`);
161
- if (pd.severity !== undefined) console.log(` severity: ${chalk.bold(String(pd.severity))}`);
162
- if (pd.includeTests !== undefined) console.log(` includeTests: ${chalk.bold(String(pd.includeTests))}`);
154
+ console.log(` minSimilarity: ${chalk.bold(patternDetectConfig.minSimilarity ?? 'default')}`);
155
+ console.log(` minLines: ${chalk.bold(patternDetectConfig.minLines ?? 'default')}`);
156
+ if (patternDetectConfig.approx !== undefined) console.log(` approx: ${chalk.bold(String(patternDetectConfig.approx))}`);
157
+ if (patternDetectConfig.minSharedTokens !== undefined) console.log(` minSharedTokens: ${chalk.bold(String(patternDetectConfig.minSharedTokens))}`);
158
+ if (patternDetectConfig.maxCandidatesPerBlock !== undefined) console.log(` maxCandidatesPerBlock: ${chalk.bold(String(patternDetectConfig.maxCandidatesPerBlock))}`);
159
+ if (patternDetectConfig.batchSize !== undefined) console.log(` batchSize: ${chalk.bold(String(patternDetectConfig.batchSize))}`);
160
+ if (patternDetectConfig.streamResults !== undefined) console.log(` streamResults: ${chalk.bold(String(patternDetectConfig.streamResults))}`);
161
+ if (patternDetectConfig.severity !== undefined) console.log(` severity: ${chalk.bold(String(patternDetectConfig.severity))}`);
162
+ if (patternDetectConfig.includeTests !== undefined) console.log(` includeTests: ${chalk.bold(String(patternDetectConfig.includeTests))}`);
163
163
  }
164
164
 
165
165
  if (finalOptions['context-analyzer'] || finalOptions.maxDepth) {