@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.
- package/.turbo/turbo-build.log +8 -8
- package/.turbo/turbo-test.log +8 -8
- package/README.md +14 -3
- package/dist/cli.js +10 -10
- package/dist/cli.mjs +10 -10
- package/package.json +5 -5
- package/src/cli.ts +10 -10
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @aiready/cli@0.
|
|
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
|
[34mCLI[39m Building entry: src/cli.ts, src/index.ts
|
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
[34mCLI[39m Target: es2020
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
11
|
[34mESM[39m Build start
|
|
12
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m138.00 B[39m
|
|
13
|
-
[32mESM[39m [1mdist/cli.mjs [22m[32m36.91 KB[39m
|
|
14
|
-
[32mESM[39m [1mdist/chunk-3SG2GLFJ.mjs [22m[32m3.80 KB[39m
|
|
15
|
-
[32mESM[39m ⚡️ Build success in 47ms
|
|
16
|
-
[32mCJS[39m [1mdist/cli.js [22m[32m43.96 KB[39m
|
|
17
12
|
[32mCJS[39m [1mdist/index.js [22m[32m4.93 KB[39m
|
|
18
|
-
[32mCJS[39m
|
|
13
|
+
[32mCJS[39m [1mdist/cli.js [22m[32m44.24 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 22ms
|
|
15
|
+
[32mESM[39m [1mdist/chunk-3SG2GLFJ.mjs [22m[32m3.80 KB[39m
|
|
16
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m138.00 B[39m
|
|
17
|
+
[32mESM[39m [1mdist/cli.mjs [22m[32m37.19 KB[39m
|
|
18
|
+
[32mESM[39m ⚡️ Build success in 22ms
|
|
19
19
|
DTS Build start
|
|
20
|
-
DTS ⚡️ Build success in
|
|
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
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @aiready/cli@0.
|
|
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
|
[2m Test Files [22m[1m[32m0 passed[39m[22m[90m (1)[39m
|
|
13
13
|
[2m Tests [22m[1m[32m0 passed[39m[22m[90m (0)[39m
|
|
14
|
-
[2m Start at [
|
|
15
|
-
[2m Duration [
|
|
14
|
+
[2m Start at [22m20:59:54
|
|
15
|
+
[2m Duration [22m101ms
|
|
16
16
|
[?2026l[?2026h[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K
|
|
17
17
|
[1m[33m ❯ [39m[22msrc/__tests__/cli.test.ts[2m 0/3[22m
|
|
18
18
|
|
|
19
19
|
[2m Test Files [22m[1m[32m0 passed[39m[22m[90m (1)[39m
|
|
20
20
|
[2m Tests [22m[1m[32m0 passed[39m[22m[90m (3)[39m
|
|
21
|
-
[2m Start at [
|
|
22
|
-
[2m Duration [
|
|
21
|
+
[2m Start at [22m20:59:54
|
|
22
|
+
[2m Duration [22m521ms
|
|
23
23
|
[?2026l[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K [32m✓[39m src/__tests__/cli.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 2[2mms[22m[39m
|
|
24
24
|
[32m✓[39m CLI Unified Analysis [2m(3)[22m
|
|
25
25
|
[32m✓[39m should run unified analysis with both tools[32m 1[2mms[22m[39m
|
|
26
|
-
[32m✓[39m should run analysis with only patterns tool[32m
|
|
26
|
+
[32m✓[39m should run analysis with only patterns tool[32m 0[2mms[22m[39m
|
|
27
27
|
[32m✓[39m should run analysis with only context tool[32m 0[2mms[22m[39m
|
|
28
28
|
|
|
29
29
|
[2m Test Files [22m [1m[32m1 passed[39m[22m[90m (1)[39m
|
|
30
30
|
[2m Tests [22m [1m[32m3 passed[39m[22m[90m (3)[39m
|
|
31
|
-
[2m Start at [22m
|
|
32
|
-
[2m Duration [22m
|
|
31
|
+
[2m Start at [22m 20:59:54
|
|
32
|
+
[2m Duration [22m 581ms[2m (transform 114ms, setup 0ms, import 378ms, tests 2ms, environment 0ms)[22m
|
|
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
|
-
##
|
|
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
|
-
##
|
|
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
|
|
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(
|
|
216
|
-
console.log(` minLines: ${import_chalk.default.bold(
|
|
217
|
-
if (
|
|
218
|
-
if (
|
|
219
|
-
if (
|
|
220
|
-
if (
|
|
221
|
-
if (
|
|
222
|
-
if (
|
|
223
|
-
if (
|
|
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
|
|
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(
|
|
120
|
-
console.log(` minLines: ${chalk.bold(
|
|
121
|
-
if (
|
|
122
|
-
if (
|
|
123
|
-
if (
|
|
124
|
-
if (
|
|
125
|
-
if (
|
|
126
|
-
if (
|
|
127
|
-
if (
|
|
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.
|
|
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.
|
|
15
|
-
"@aiready/
|
|
16
|
-
"@aiready/
|
|
17
|
-
"@aiready/
|
|
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
|
|
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(
|
|
155
|
-
console.log(` minLines: ${chalk.bold(
|
|
156
|
-
if (
|
|
157
|
-
if (
|
|
158
|
-
if (
|
|
159
|
-
if (
|
|
160
|
-
if (
|
|
161
|
-
if (
|
|
162
|
-
if (
|
|
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) {
|