@aiready/cli 0.15.4 → 0.15.5
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/dist/cli.js +79 -9
- package/dist/cli.mjs +79 -9
- package/package.json +21 -16
package/dist/cli.js
CHANGED
|
@@ -2386,11 +2386,21 @@ defineScanCommand(program);
|
|
|
2386
2386
|
definePatternsCommand(program);
|
|
2387
2387
|
defineContextCommand(program);
|
|
2388
2388
|
defineConsistencyCommand(program);
|
|
2389
|
-
program.command("init").description("Generate a default configuration (aiready.json)").option(CLI_CONSTANTS.OPTIONS.FORCE, "Overwrite existing configuration file").option(
|
|
2389
|
+
program.command("init").description("Generate a default configuration (aiready.json)").option(CLI_CONSTANTS.OPTIONS.FORCE, "Overwrite existing configuration file").option(
|
|
2390
|
+
CLI_CONSTANTS.OPTIONS.JS,
|
|
2391
|
+
"Generate configuration as a JavaScript file (aiready.config.js)"
|
|
2392
|
+
).option(
|
|
2393
|
+
CLI_CONSTANTS.OPTIONS.FULL,
|
|
2394
|
+
"Generate a full configuration with all available options"
|
|
2395
|
+
).action(async (options) => {
|
|
2390
2396
|
const format = options.js ? CLI_CONSTANTS.FORMATS.JS : CLI_CONSTANTS.FORMATS.JSON;
|
|
2391
2397
|
await initAction({ force: !!options.force, format, full: !!options.full });
|
|
2392
2398
|
});
|
|
2393
|
-
program.command(CLI_CONSTANTS.ALIASES.VISUALISE).description("Alias for visualize (British spelling)").argument(
|
|
2399
|
+
program.command(CLI_CONSTANTS.ALIASES.VISUALISE).description("Alias for visualize (British spelling)").argument(
|
|
2400
|
+
"[directory]",
|
|
2401
|
+
"Directory to analyze",
|
|
2402
|
+
CLI_CONSTANTS.DEFAULT_DIRECTORY
|
|
2403
|
+
).option(
|
|
2394
2404
|
CLI_CONSTANTS.OPTIONS.REPORT,
|
|
2395
2405
|
"Report path (auto-detects latest .aiready/aiready-report-*.json if not provided)"
|
|
2396
2406
|
).option(
|
|
@@ -2413,7 +2423,11 @@ program.command(CLI_CONSTANTS.ALIASES.VISUALISE).description("Alias for visualiz
|
|
|
2413
2423
|
dev: !!options.dev
|
|
2414
2424
|
});
|
|
2415
2425
|
});
|
|
2416
|
-
program.command(CLI_CONSTANTS.ALIASES.VISUALIZE).description("Generate interactive visualization from an AIReady report").argument(
|
|
2426
|
+
program.command(CLI_CONSTANTS.ALIASES.VISUALIZE).description("Generate interactive visualization from an AIReady report").argument(
|
|
2427
|
+
"[directory]",
|
|
2428
|
+
"Directory to analyze",
|
|
2429
|
+
CLI_CONSTANTS.DEFAULT_DIRECTORY
|
|
2430
|
+
).option(
|
|
2417
2431
|
CLI_CONSTANTS.OPTIONS.REPORT,
|
|
2418
2432
|
"Report path (auto-detects latest .aiready/aiready-report-*.json if not provided)"
|
|
2419
2433
|
).option(
|
|
@@ -2436,26 +2450,82 @@ program.command(CLI_CONSTANTS.ALIASES.VISUALIZE).description("Generate interacti
|
|
|
2436
2450
|
dev: !!options.dev
|
|
2437
2451
|
});
|
|
2438
2452
|
});
|
|
2439
|
-
program.command("change-amplification").description("Analyze graph metrics for change amplification").argument(
|
|
2453
|
+
program.command("change-amplification").description("Analyze graph metrics for change amplification").argument(
|
|
2454
|
+
"[directory]",
|
|
2455
|
+
"Directory to analyze",
|
|
2456
|
+
CLI_CONSTANTS.DEFAULT_DIRECTORY
|
|
2457
|
+
).option(
|
|
2458
|
+
CLI_CONSTANTS.OPTIONS.INCLUDE,
|
|
2459
|
+
"File patterns to include (comma-separated)"
|
|
2460
|
+
).option(
|
|
2461
|
+
CLI_CONSTANTS.OPTIONS.EXCLUDE,
|
|
2462
|
+
"File patterns to exclude (comma-separated)"
|
|
2463
|
+
).option(
|
|
2464
|
+
"-o, --output <format>",
|
|
2465
|
+
"Output format: console, json",
|
|
2466
|
+
CLI_CONSTANTS.FORMATS.CONSOLE
|
|
2467
|
+
).option(CLI_CONSTANTS.OPTIONS.OUTPUT_FILE, "Output file path (for json)").action(async (directory, options) => {
|
|
2440
2468
|
await (0, import_cli.changeAmplificationAction)(directory, options);
|
|
2441
2469
|
});
|
|
2442
|
-
program.command("testability").description("Analyze test coverage and AI readiness").argument(
|
|
2470
|
+
program.command("testability").description("Analyze test coverage and AI readiness").argument(
|
|
2471
|
+
"[directory]",
|
|
2472
|
+
"Directory to analyze",
|
|
2473
|
+
CLI_CONSTANTS.DEFAULT_DIRECTORY
|
|
2474
|
+
).option(
|
|
2475
|
+
CLI_CONSTANTS.OPTIONS.MIN_COVERAGE,
|
|
2476
|
+
"Minimum acceptable coverage ratio",
|
|
2477
|
+
"0.3"
|
|
2478
|
+
).option(
|
|
2479
|
+
CLI_CONSTANTS.OPTIONS.INCLUDE,
|
|
2480
|
+
"File patterns to include (comma-separated)"
|
|
2481
|
+
).option(
|
|
2482
|
+
CLI_CONSTANTS.OPTIONS.EXCLUDE,
|
|
2483
|
+
"File patterns to exclude (comma-separated)"
|
|
2484
|
+
).option(
|
|
2485
|
+
"-o, --output <format>",
|
|
2486
|
+
"Output format: console, json",
|
|
2487
|
+
CLI_CONSTANTS.FORMATS.CONSOLE
|
|
2488
|
+
).option(CLI_CONSTANTS.OPTIONS.OUTPUT_FILE, "Output file path (for json)").action(async (directory, options) => {
|
|
2443
2489
|
await testabilityAction(directory, options);
|
|
2444
2490
|
});
|
|
2445
|
-
program.command("contract").description("Analyze structural contract enforcement and defensive coding").argument(
|
|
2491
|
+
program.command("contract").description("Analyze structural contract enforcement and defensive coding").argument(
|
|
2492
|
+
"[directory]",
|
|
2493
|
+
"Directory to analyze",
|
|
2494
|
+
CLI_CONSTANTS.DEFAULT_DIRECTORY
|
|
2495
|
+
).option(
|
|
2446
2496
|
CLI_CONSTANTS.OPTIONS.MIN_CHAIN_DEPTH,
|
|
2447
2497
|
"Minimum optional chain depth to flag",
|
|
2448
2498
|
"3"
|
|
2449
|
-
).option(
|
|
2499
|
+
).option(
|
|
2500
|
+
CLI_CONSTANTS.OPTIONS.INCLUDE,
|
|
2501
|
+
"File patterns to include (comma-separated)"
|
|
2502
|
+
).option(
|
|
2503
|
+
CLI_CONSTANTS.OPTIONS.EXCLUDE,
|
|
2504
|
+
"File patterns to exclude (comma-separated)"
|
|
2505
|
+
).option(
|
|
2506
|
+
"-o, --output <format>",
|
|
2507
|
+
"Output format: console, json",
|
|
2508
|
+
CLI_CONSTANTS.FORMATS.CONSOLE
|
|
2509
|
+
).option(CLI_CONSTANTS.OPTIONS.OUTPUT_FILE, "Output file path (for json)").action(async (directory, options) => {
|
|
2450
2510
|
await contractEnforcementAction(directory, options);
|
|
2451
2511
|
});
|
|
2452
2512
|
program.command("upload").description("Upload an AIReady report JSON to the platform").argument("<file>", "Report JSON file to upload").option(CLI_CONSTANTS.OPTIONS.API_KEY, "Platform API key").option(CLI_CONSTANTS.OPTIONS.REPO_ID, "Platform repository ID (optional)").option(CLI_CONSTANTS.OPTIONS.SERVER, "Custom platform URL").addHelpText("after", UPLOAD_HELP_TEXT).action(async (file, options) => {
|
|
2453
2513
|
await uploadAction(file, options);
|
|
2454
2514
|
});
|
|
2455
|
-
program.command("remediate").description("Suggest AI-ready refactors based on a scan report").argument(
|
|
2515
|
+
program.command("remediate").description("Suggest AI-ready refactors based on a scan report").argument(
|
|
2516
|
+
"[directory]",
|
|
2517
|
+
"Directory to remediate",
|
|
2518
|
+
CLI_CONSTANTS.DEFAULT_DIRECTORY
|
|
2519
|
+
).option(CLI_CONSTANTS.OPTIONS.REPORT, "AIReady report JSON file").option(
|
|
2520
|
+
CLI_CONSTANTS.OPTIONS.TOOL,
|
|
2521
|
+
"Filter by tool: patterns, context, consistency"
|
|
2522
|
+
).option(CLI_CONSTANTS.OPTIONS.SERVER, "Custom platform URL").addHelpText("after", REMEDIATE_HELP_TEXT).action(async (directory, options) => {
|
|
2456
2523
|
await remediateAction(directory, options);
|
|
2457
2524
|
});
|
|
2458
|
-
program.command("bug").description("Report a bug or provide feedback (Agent-friendly)").argument("[message]", "Short description of the issue").option(CLI_CONSTANTS.OPTIONS.TYPE, "Issue type: bug, feature, metric", "bug").option(
|
|
2525
|
+
program.command("bug").description("Report a bug or provide feedback (Agent-friendly)").argument("[message]", "Short description of the issue").option(CLI_CONSTANTS.OPTIONS.TYPE, "Issue type: bug, feature, metric", "bug").option(
|
|
2526
|
+
CLI_CONSTANTS.OPTIONS.SUBMIT,
|
|
2527
|
+
"Submit the issue directly using the GitHub CLI (gh)"
|
|
2528
|
+
).addHelpText("after", BUG_HELP_TEXT).action(async (message, options) => {
|
|
2459
2529
|
await bugAction(message, { ...options, submit: !!options.submit });
|
|
2460
2530
|
});
|
|
2461
2531
|
program.parse();
|
package/dist/cli.mjs
CHANGED
|
@@ -2094,11 +2094,21 @@ defineScanCommand(program);
|
|
|
2094
2094
|
definePatternsCommand(program);
|
|
2095
2095
|
defineContextCommand(program);
|
|
2096
2096
|
defineConsistencyCommand(program);
|
|
2097
|
-
program.command("init").description("Generate a default configuration (aiready.json)").option(CLI_CONSTANTS.OPTIONS.FORCE, "Overwrite existing configuration file").option(
|
|
2097
|
+
program.command("init").description("Generate a default configuration (aiready.json)").option(CLI_CONSTANTS.OPTIONS.FORCE, "Overwrite existing configuration file").option(
|
|
2098
|
+
CLI_CONSTANTS.OPTIONS.JS,
|
|
2099
|
+
"Generate configuration as a JavaScript file (aiready.config.js)"
|
|
2100
|
+
).option(
|
|
2101
|
+
CLI_CONSTANTS.OPTIONS.FULL,
|
|
2102
|
+
"Generate a full configuration with all available options"
|
|
2103
|
+
).action(async (options) => {
|
|
2098
2104
|
const format = options.js ? CLI_CONSTANTS.FORMATS.JS : CLI_CONSTANTS.FORMATS.JSON;
|
|
2099
2105
|
await initAction({ force: !!options.force, format, full: !!options.full });
|
|
2100
2106
|
});
|
|
2101
|
-
program.command(CLI_CONSTANTS.ALIASES.VISUALISE).description("Alias for visualize (British spelling)").argument(
|
|
2107
|
+
program.command(CLI_CONSTANTS.ALIASES.VISUALISE).description("Alias for visualize (British spelling)").argument(
|
|
2108
|
+
"[directory]",
|
|
2109
|
+
"Directory to analyze",
|
|
2110
|
+
CLI_CONSTANTS.DEFAULT_DIRECTORY
|
|
2111
|
+
).option(
|
|
2102
2112
|
CLI_CONSTANTS.OPTIONS.REPORT,
|
|
2103
2113
|
"Report path (auto-detects latest .aiready/aiready-report-*.json if not provided)"
|
|
2104
2114
|
).option(
|
|
@@ -2121,7 +2131,11 @@ program.command(CLI_CONSTANTS.ALIASES.VISUALISE).description("Alias for visualiz
|
|
|
2121
2131
|
dev: !!options.dev
|
|
2122
2132
|
});
|
|
2123
2133
|
});
|
|
2124
|
-
program.command(CLI_CONSTANTS.ALIASES.VISUALIZE).description("Generate interactive visualization from an AIReady report").argument(
|
|
2134
|
+
program.command(CLI_CONSTANTS.ALIASES.VISUALIZE).description("Generate interactive visualization from an AIReady report").argument(
|
|
2135
|
+
"[directory]",
|
|
2136
|
+
"Directory to analyze",
|
|
2137
|
+
CLI_CONSTANTS.DEFAULT_DIRECTORY
|
|
2138
|
+
).option(
|
|
2125
2139
|
CLI_CONSTANTS.OPTIONS.REPORT,
|
|
2126
2140
|
"Report path (auto-detects latest .aiready/aiready-report-*.json if not provided)"
|
|
2127
2141
|
).option(
|
|
@@ -2144,26 +2158,82 @@ program.command(CLI_CONSTANTS.ALIASES.VISUALIZE).description("Generate interacti
|
|
|
2144
2158
|
dev: !!options.dev
|
|
2145
2159
|
});
|
|
2146
2160
|
});
|
|
2147
|
-
program.command("change-amplification").description("Analyze graph metrics for change amplification").argument(
|
|
2161
|
+
program.command("change-amplification").description("Analyze graph metrics for change amplification").argument(
|
|
2162
|
+
"[directory]",
|
|
2163
|
+
"Directory to analyze",
|
|
2164
|
+
CLI_CONSTANTS.DEFAULT_DIRECTORY
|
|
2165
|
+
).option(
|
|
2166
|
+
CLI_CONSTANTS.OPTIONS.INCLUDE,
|
|
2167
|
+
"File patterns to include (comma-separated)"
|
|
2168
|
+
).option(
|
|
2169
|
+
CLI_CONSTANTS.OPTIONS.EXCLUDE,
|
|
2170
|
+
"File patterns to exclude (comma-separated)"
|
|
2171
|
+
).option(
|
|
2172
|
+
"-o, --output <format>",
|
|
2173
|
+
"Output format: console, json",
|
|
2174
|
+
CLI_CONSTANTS.FORMATS.CONSOLE
|
|
2175
|
+
).option(CLI_CONSTANTS.OPTIONS.OUTPUT_FILE, "Output file path (for json)").action(async (directory, options) => {
|
|
2148
2176
|
await changeAmplificationAction(directory, options);
|
|
2149
2177
|
});
|
|
2150
|
-
program.command("testability").description("Analyze test coverage and AI readiness").argument(
|
|
2178
|
+
program.command("testability").description("Analyze test coverage and AI readiness").argument(
|
|
2179
|
+
"[directory]",
|
|
2180
|
+
"Directory to analyze",
|
|
2181
|
+
CLI_CONSTANTS.DEFAULT_DIRECTORY
|
|
2182
|
+
).option(
|
|
2183
|
+
CLI_CONSTANTS.OPTIONS.MIN_COVERAGE,
|
|
2184
|
+
"Minimum acceptable coverage ratio",
|
|
2185
|
+
"0.3"
|
|
2186
|
+
).option(
|
|
2187
|
+
CLI_CONSTANTS.OPTIONS.INCLUDE,
|
|
2188
|
+
"File patterns to include (comma-separated)"
|
|
2189
|
+
).option(
|
|
2190
|
+
CLI_CONSTANTS.OPTIONS.EXCLUDE,
|
|
2191
|
+
"File patterns to exclude (comma-separated)"
|
|
2192
|
+
).option(
|
|
2193
|
+
"-o, --output <format>",
|
|
2194
|
+
"Output format: console, json",
|
|
2195
|
+
CLI_CONSTANTS.FORMATS.CONSOLE
|
|
2196
|
+
).option(CLI_CONSTANTS.OPTIONS.OUTPUT_FILE, "Output file path (for json)").action(async (directory, options) => {
|
|
2151
2197
|
await testabilityAction(directory, options);
|
|
2152
2198
|
});
|
|
2153
|
-
program.command("contract").description("Analyze structural contract enforcement and defensive coding").argument(
|
|
2199
|
+
program.command("contract").description("Analyze structural contract enforcement and defensive coding").argument(
|
|
2200
|
+
"[directory]",
|
|
2201
|
+
"Directory to analyze",
|
|
2202
|
+
CLI_CONSTANTS.DEFAULT_DIRECTORY
|
|
2203
|
+
).option(
|
|
2154
2204
|
CLI_CONSTANTS.OPTIONS.MIN_CHAIN_DEPTH,
|
|
2155
2205
|
"Minimum optional chain depth to flag",
|
|
2156
2206
|
"3"
|
|
2157
|
-
).option(
|
|
2207
|
+
).option(
|
|
2208
|
+
CLI_CONSTANTS.OPTIONS.INCLUDE,
|
|
2209
|
+
"File patterns to include (comma-separated)"
|
|
2210
|
+
).option(
|
|
2211
|
+
CLI_CONSTANTS.OPTIONS.EXCLUDE,
|
|
2212
|
+
"File patterns to exclude (comma-separated)"
|
|
2213
|
+
).option(
|
|
2214
|
+
"-o, --output <format>",
|
|
2215
|
+
"Output format: console, json",
|
|
2216
|
+
CLI_CONSTANTS.FORMATS.CONSOLE
|
|
2217
|
+
).option(CLI_CONSTANTS.OPTIONS.OUTPUT_FILE, "Output file path (for json)").action(async (directory, options) => {
|
|
2158
2218
|
await contractEnforcementAction(directory, options);
|
|
2159
2219
|
});
|
|
2160
2220
|
program.command("upload").description("Upload an AIReady report JSON to the platform").argument("<file>", "Report JSON file to upload").option(CLI_CONSTANTS.OPTIONS.API_KEY, "Platform API key").option(CLI_CONSTANTS.OPTIONS.REPO_ID, "Platform repository ID (optional)").option(CLI_CONSTANTS.OPTIONS.SERVER, "Custom platform URL").addHelpText("after", UPLOAD_HELP_TEXT).action(async (file, options) => {
|
|
2161
2221
|
await uploadAction(file, options);
|
|
2162
2222
|
});
|
|
2163
|
-
program.command("remediate").description("Suggest AI-ready refactors based on a scan report").argument(
|
|
2223
|
+
program.command("remediate").description("Suggest AI-ready refactors based on a scan report").argument(
|
|
2224
|
+
"[directory]",
|
|
2225
|
+
"Directory to remediate",
|
|
2226
|
+
CLI_CONSTANTS.DEFAULT_DIRECTORY
|
|
2227
|
+
).option(CLI_CONSTANTS.OPTIONS.REPORT, "AIReady report JSON file").option(
|
|
2228
|
+
CLI_CONSTANTS.OPTIONS.TOOL,
|
|
2229
|
+
"Filter by tool: patterns, context, consistency"
|
|
2230
|
+
).option(CLI_CONSTANTS.OPTIONS.SERVER, "Custom platform URL").addHelpText("after", REMEDIATE_HELP_TEXT).action(async (directory, options) => {
|
|
2164
2231
|
await remediateAction(directory, options);
|
|
2165
2232
|
});
|
|
2166
|
-
program.command("bug").description("Report a bug or provide feedback (Agent-friendly)").argument("[message]", "Short description of the issue").option(CLI_CONSTANTS.OPTIONS.TYPE, "Issue type: bug, feature, metric", "bug").option(
|
|
2233
|
+
program.command("bug").description("Report a bug or provide feedback (Agent-friendly)").argument("[message]", "Short description of the issue").option(CLI_CONSTANTS.OPTIONS.TYPE, "Issue type: bug, feature, metric", "bug").option(
|
|
2234
|
+
CLI_CONSTANTS.OPTIONS.SUBMIT,
|
|
2235
|
+
"Submit the issue directly using the GitHub CLI (gh)"
|
|
2236
|
+
).addHelpText("after", BUG_HELP_TEXT).action(async (message, options) => {
|
|
2167
2237
|
await bugAction(message, { ...options, submit: !!options.submit });
|
|
2168
2238
|
});
|
|
2169
2239
|
program.parse();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiready/cli",
|
|
3
|
-
"version": "0.15.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.15.5",
|
|
4
|
+
"description": "The unified CLI for Agentic Readiness. Optimize codebases for AI agents like Cursor, Windsurf, and Claude. Detect semantic duplicates, analyze context fragmentation, and improve agentic leverage.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -24,18 +24,18 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"chalk": "^5.3.0",
|
|
26
26
|
"commander": "^14.0.0",
|
|
27
|
-
"@aiready/agent-grounding": "0.14.
|
|
28
|
-
"@aiready/
|
|
29
|
-
"@aiready/
|
|
30
|
-
"@aiready/
|
|
31
|
-
"@aiready/deps": "0.14.
|
|
32
|
-
"@aiready/doc-drift": "0.14.
|
|
33
|
-
"@aiready/contract-enforcement": "0.2.
|
|
34
|
-
"@aiready/
|
|
35
|
-
"@aiready/
|
|
36
|
-
"@aiready/
|
|
37
|
-
"@aiready/
|
|
38
|
-
"@aiready/visualizer": "0.7.
|
|
27
|
+
"@aiready/agent-grounding": "0.14.5",
|
|
28
|
+
"@aiready/core": "0.24.5",
|
|
29
|
+
"@aiready/context-analyzer": "0.22.5",
|
|
30
|
+
"@aiready/consistency": "0.21.5",
|
|
31
|
+
"@aiready/deps": "0.14.5",
|
|
32
|
+
"@aiready/doc-drift": "0.14.5",
|
|
33
|
+
"@aiready/contract-enforcement": "0.2.5",
|
|
34
|
+
"@aiready/change-amplification": "0.14.5",
|
|
35
|
+
"@aiready/ai-signal-clarity": "0.14.5",
|
|
36
|
+
"@aiready/testability": "0.7.5",
|
|
37
|
+
"@aiready/pattern-detect": "0.17.5",
|
|
38
|
+
"@aiready/visualizer": "0.7.5"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "^24.0.0",
|
|
@@ -44,6 +44,13 @@
|
|
|
44
44
|
"keywords": [
|
|
45
45
|
"aiready",
|
|
46
46
|
"cli",
|
|
47
|
+
"Agentic Readiness",
|
|
48
|
+
"Model Context Protocol",
|
|
49
|
+
"MCP",
|
|
50
|
+
"Cursor",
|
|
51
|
+
"Windsurf",
|
|
52
|
+
"Claude",
|
|
53
|
+
"Copilot",
|
|
47
54
|
"ai-readiness",
|
|
48
55
|
"code-analysis",
|
|
49
56
|
"semantic-duplicates",
|
|
@@ -52,8 +59,6 @@
|
|
|
52
59
|
"code-quality",
|
|
53
60
|
"static-analysis",
|
|
54
61
|
"developer-tools",
|
|
55
|
-
"mcp",
|
|
56
|
-
"model-context-protocol",
|
|
57
62
|
"vscode-extension"
|
|
58
63
|
],
|
|
59
64
|
"author": "AIReady Team",
|