@aiready/cli 0.14.8 → 0.14.9

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.14.8 build /Users/pengcao/projects/aiready/packages/cli
3
+ > @aiready/cli@0.14.9 build /Users/pengcao/projects/aiready/packages/cli
4
4
  > tsup src/index.ts src/cli.ts --format cjs,esm
5
5
 
6
6
  CLI Building entry: src/cli.ts, src/index.ts
@@ -10,7 +10,7 @@
10
10
  CJS Build start
11
11
  ESM Build start
12
12
 
13
-  WARN  ▲ [WARNING] "import.meta" is not available with the "cjs" output format and will be empty [empty-import-meta] 12:22:46 am
13
+  WARN  ▲ [WARNING] "import.meta" is not available with the "cjs" output format and will be empty [empty-import-meta] 10:14:43 am
14
14
 
15
15
  src/cli.ts:29:31:
16
16
   29 │ return dirname(fileURLToPath(import.meta.url));
@@ -20,10 +20,10 @@
20
20
 
21
21
 
22
22
 
23
- CJS dist/cli.js 84.50 KB
24
- CJS dist/index.js 10.62 KB
25
- CJS ⚡️ Build success in 152ms
26
23
  ESM dist/index.mjs 170.00 B
27
- ESM dist/cli.mjs 70.71 KB
24
+ ESM dist/cli.mjs 70.91 KB
28
25
  ESM dist/chunk-VOKP7FGM.mjs 9.52 KB
29
- ESM ⚡️ Build success in 152ms
26
+ ESM ⚡️ Build success in 36ms
27
+ CJS dist/cli.js 84.70 KB
28
+ CJS dist/index.js 10.62 KB
29
+ CJS ⚡️ Build success in 36ms
@@ -1,6 +1,6 @@
1
1
 
2
2
  
3
- > @aiready/cli@0.14.4 test /Users/pengcao/projects/aiready/packages/cli
3
+ > @aiready/cli@0.14.8 test /Users/pengcao/projects/aiready/packages/cli
4
4
  > vitest run
5
5
 
6
6
  [?25l
@@ -9,23 +9,7 @@
9
9
  stdout | src/commands/__tests__/visualize.test.ts > Visualize CLI Action > should generate HTML from specified report
10
10
  Building graph from report...
11
11
 
12
- stdout | src/commands/__tests__/upload.test.ts > Upload CLI Action > should fail if API key is missing
13
-  Set AIREADY_API_KEY environment variable or use --api-key flag.
14
- Get an API key from https://platform.getaiready.dev/dashboard
15
- 🚀 Uploading report to https://dev.platform.getaiready.dev...
16
- Reading report from /Users/pengcao/projects/aiready/packages/cli/report.json...
17
- Successfully parsed report JSON.
18
-
19
- stdout | src/commands/__tests__/upload.test.ts > Upload CLI Action > should fail if API key is missing
20
- 
21
- ✅ Upload successful! (0.00s)
22
- View results: https://dev.platform.getaiready.dev/dashboard
23
- Analysis ID: 123
24
- Score: 80/100
25
-
26
- ✓ src/commands/__tests__/upload.test.ts (2 tests) 4ms
27
- ✓ src/commands/__tests__/testability.test.ts (2 tests) 10ms
28
- ✓ src/commands/__tests__/agent-grounding.test.ts (1 test) 18ms
12
+ ✓ src/commands/__tests__/testability.test.ts (2 tests) 17ms
29
13
  stdout | src/commands/__tests__/visualize.test.ts > Visualize CLI Action > should generate HTML from specified report
30
14
  Generating HTML...
31
15
  ✅ Visualization written to: /Users/pengcao/projects/aiready/packages/cli/visualization.html
@@ -53,24 +37,40 @@ Or specify a custom report:
53
37
  Generating HTML...
54
38
  ✅ Visualization written to: /Users/pengcao/projects/aiready/packages/cli/visualization.html
55
39
 
56
- ✓ src/commands/__tests__/visualize.test.ts (4 tests) 26ms
57
- ✓ src/commands/__tests__/ai-signal-clarity.test.ts (1 test) 10ms
58
- ✓ src/commands/__tests__/doc-drift.test.ts (1 test) 11ms
59
- ✓ src/commands/__tests__/deps-health.test.ts (1 test) 11ms
60
- ✓ src/utils/__tests__/helpers.test.ts (3 tests) 2ms
61
- ✓ src/commands/__tests__/init.test.ts (3 tests) 5ms
40
+ ✓ src/commands/__tests__/visualize.test.ts (4 tests) 59ms
41
+ ✓ src/commands/__tests__/deps-health.test.ts (1 test) 63ms
42
+ ✓ src/commands/__tests__/doc-drift.test.ts (1 test) 60ms
43
+ ✓ src/commands/__tests__/ai-signal-clarity.test.ts (1 test) 58ms
44
+ ✓ src/commands/__tests__/agent-grounding.test.ts (1 test) 57ms
45
+ stdout | src/commands/__tests__/upload.test.ts > Upload CLI Action > should fail if API key is missing
46
+  Set AIREADY_API_KEY environment variable or use --api-key flag.
47
+ Get an API key from https://platform.getaiready.dev/dashboard
48
+ 🚀 Uploading report to https://dev.platform.getaiready.dev...
49
+ Reading report from /Users/pengcao/projects/aiready/packages/cli/report.json...
50
+ Successfully parsed report JSON.
51
+
52
+ stdout | src/commands/__tests__/upload.test.ts > Upload CLI Action > should fail if API key is missing
53
+ 
54
+ ✅ Upload successful! (0.00s)
55
+ View results: https://dev.platform.getaiready.dev/dashboard
56
+ Analysis ID: 123
57
+ Score: 80/100
58
+
59
+ ✓ src/commands/__tests__/upload.test.ts (2 tests) 11ms
60
+ ✓ src/commands/__tests__/init.test.ts (3 tests) 9ms
62
61
  ✓ src/commands/__tests__/consistency.test.ts (4 tests) 4ms
63
- ✓ src/commands/__tests__/scan.test.ts (6 tests) 89ms
64
- ✓ src/commands/__tests__/extra-commands.test.ts (8 tests) 99ms
62
+ ✓ src/utils/__tests__/helpers.test.ts (3 tests) 2ms
63
+ ✓ src/commands/__tests__/scan.test.ts (6 tests) 98ms
64
+ ✓ src/commands/__tests__/extra-commands.test.ts (8 tests) 113ms
65
65
  ✓ src/__tests__/unified.test.ts (4 tests) 3ms
66
- ✓ src/__tests__/cli.test.ts (3 tests) 2959ms
67
- ✓ should run unified analysis with both tools  2957ms
68
- ✓ src/__tests__/config-shape.test.ts (3 tests) 2959ms
69
- ✓ should generate a strictly portable AIReadyConfig in summary  2958ms
66
+ ✓ src/__tests__/cli.test.ts (3 tests) 3798ms
67
+ ✓ should run unified analysis with both tools  3797ms
68
+ ✓ src/__tests__/config-shape.test.ts (3 tests) 3799ms
69
+ ✓ should generate a strictly portable AIReadyConfig in summary  3798ms
70
70
 
71
71
   Test Files  15 passed (15)
72
72
   Tests  46 passed (46)
73
-  Start at  10:36:31
74
-  Duration  3.86s (transform 2.14s, setup 0ms, import 4.73s, tests 6.21s, environment 1ms)
73
+  Start at  10:12:44
74
+  Duration  5.54s (transform 3.64s, setup 0ms, import 10.00s, tests 8.15s, environment 2ms)
75
75
 
76
76
  [?25h
package/dist/cli.js CHANGED
@@ -1958,15 +1958,17 @@ AI READINESS SCORING:
1958
1958
  EXAMPLES:
1959
1959
  $ aiready scan # Comprehensive analysis with AI Readiness Score
1960
1960
  $ aiready scan --no-score # Run scan without score calculation
1961
- $ aiready scan --tools patterns # Run only pattern detection
1961
+ $ aiready init # Create a default aiready.json configuration
1962
+ $ aiready init --full # Create configuration with ALL available options
1962
1963
  $ npx @aiready/cli scan # Industry standard way to run standard scan
1963
1964
  $ aiready scan --output json # Output raw JSON for piping
1964
1965
 
1965
1966
  GETTING STARTED:
1966
- 1. Run 'aiready scan' to analyze your codebase and get an AI Readiness Score
1967
- 2. Use '--profile agentic' for agent-focused analysis
1968
- 3. Create aiready.json for persistent configuration
1969
- 4. Set up CI/CD with '--threshold' for quality gates
1967
+ 1. Run 'aiready init' to create a persistent 'aiready.json' config file
1968
+ 2. Run 'aiready scan' to analyze your codebase and get an AI Readiness Score
1969
+ 3. Use 'aiready init --full' to see every fine-tuning parameter available
1970
+ 4. Use '--profile agentic' for agent-focused analysis
1971
+ 5. Set up CI/CD with '--threshold' for quality gates
1970
1972
 
1971
1973
  CONFIGURATION:
1972
1974
  Config files (searched upward): aiready.json, .aiready.json, aiready.config.*
package/dist/cli.mjs CHANGED
@@ -1719,15 +1719,17 @@ AI READINESS SCORING:
1719
1719
  EXAMPLES:
1720
1720
  $ aiready scan # Comprehensive analysis with AI Readiness Score
1721
1721
  $ aiready scan --no-score # Run scan without score calculation
1722
- $ aiready scan --tools patterns # Run only pattern detection
1722
+ $ aiready init # Create a default aiready.json configuration
1723
+ $ aiready init --full # Create configuration with ALL available options
1723
1724
  $ npx @aiready/cli scan # Industry standard way to run standard scan
1724
1725
  $ aiready scan --output json # Output raw JSON for piping
1725
1726
 
1726
1727
  GETTING STARTED:
1727
- 1. Run 'aiready scan' to analyze your codebase and get an AI Readiness Score
1728
- 2. Use '--profile agentic' for agent-focused analysis
1729
- 3. Create aiready.json for persistent configuration
1730
- 4. Set up CI/CD with '--threshold' for quality gates
1728
+ 1. Run 'aiready init' to create a persistent 'aiready.json' config file
1729
+ 2. Run 'aiready scan' to analyze your codebase and get an AI Readiness Score
1730
+ 3. Use 'aiready init --full' to see every fine-tuning parameter available
1731
+ 4. Use '--profile agentic' for agent-focused analysis
1732
+ 5. Set up CI/CD with '--threshold' for quality gates
1731
1733
 
1732
1734
  CONFIGURATION:
1733
1735
  Config files (searched upward): aiready.json, .aiready.json, aiready.config.*
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiready/cli",
3
- "version": "0.14.8",
3
+ "version": "0.14.9",
4
4
  "description": "Unified CLI for AIReady analysis tools",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -11,17 +11,17 @@
11
11
  "dependencies": {
12
12
  "chalk": "^5.3.0",
13
13
  "commander": "^14.0.0",
14
- "@aiready/agent-grounding": "0.13.5",
15
- "@aiready/consistency": "0.20.5",
16
- "@aiready/context-analyzer": "0.21.9",
17
- "@aiready/core": "0.23.6",
18
- "@aiready/deps": "0.13.5",
19
- "@aiready/doc-drift": "0.13.5",
20
- "@aiready/change-amplification": "0.13.5",
21
- "@aiready/ai-signal-clarity": "0.13.6",
22
- "@aiready/visualizer": "0.6.5",
23
- "@aiready/pattern-detect": "0.16.5",
24
- "@aiready/testability": "0.6.5"
14
+ "@aiready/agent-grounding": "0.13.6",
15
+ "@aiready/consistency": "0.20.6",
16
+ "@aiready/context-analyzer": "0.21.10",
17
+ "@aiready/core": "0.23.7",
18
+ "@aiready/deps": "0.13.6",
19
+ "@aiready/change-amplification": "0.13.6",
20
+ "@aiready/visualizer": "0.6.6",
21
+ "@aiready/ai-signal-clarity": "0.13.7",
22
+ "@aiready/pattern-detect": "0.16.6",
23
+ "@aiready/testability": "0.6.6",
24
+ "@aiready/doc-drift": "0.13.6"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/node": "^24.0.0",
package/src/cli.ts CHANGED
@@ -49,15 +49,17 @@ AI READINESS SCORING:
49
49
  EXAMPLES:
50
50
  $ aiready scan # Comprehensive analysis with AI Readiness Score
51
51
  $ aiready scan --no-score # Run scan without score calculation
52
- $ aiready scan --tools patterns # Run only pattern detection
52
+ $ aiready init # Create a default aiready.json configuration
53
+ $ aiready init --full # Create configuration with ALL available options
53
54
  $ npx @aiready/cli scan # Industry standard way to run standard scan
54
55
  $ aiready scan --output json # Output raw JSON for piping
55
56
 
56
57
  GETTING STARTED:
57
- 1. Run 'aiready scan' to analyze your codebase and get an AI Readiness Score
58
- 2. Use '--profile agentic' for agent-focused analysis
59
- 3. Create aiready.json for persistent configuration
60
- 4. Set up CI/CD with '--threshold' for quality gates
58
+ 1. Run 'aiready init' to create a persistent 'aiready.json' config file
59
+ 2. Run 'aiready scan' to analyze your codebase and get an AI Readiness Score
60
+ 3. Use 'aiready init --full' to see every fine-tuning parameter available
61
+ 4. Use '--profile agentic' for agent-focused analysis
62
+ 5. Set up CI/CD with '--threshold' for quality gates
61
63
 
62
64
  CONFIGURATION:
63
65
  Config files (searched upward): aiready.json, .aiready.json, aiready.config.*
@@ -8,7 +8,10 @@ import {
8
8
  } from '@aiready/core';
9
9
 
10
10
  /**
11
- * Handle console output for the scan results
11
+ * Handle console output for the scan results.
12
+ *
13
+ * @param results - The combined results from all tools.
14
+ * @param startTime - The timestamp when the scan started.
12
15
  */
13
16
  export function printScanSummary(results: any, startTime: number) {
14
17
  console.log(chalk.cyan('\n=== AIReady Run Summary ==='));
@@ -21,7 +24,10 @@ export function printScanSummary(results: any, startTime: number) {
21
24
  }
22
25
 
23
26
  /**
24
- * Print business impact analysis
27
+ * Print business impact analysis based on ROI and budget metrics.
28
+ *
29
+ * @param roi - Calculated Return on Investment metrics.
30
+ * @param unifiedBudget - Consolidated context budget metrics.
25
31
  */
26
32
  export function printBusinessImpact(roi: any, unifiedBudget: any) {
27
33
  console.log(chalk.bold('\n💰 Business Impact Analysis (Monthly)'));
@@ -40,7 +46,10 @@ export function printBusinessImpact(roi: any, unifiedBudget: any) {
40
46
  }
41
47
 
42
48
  /**
43
- * Print detailed scoring breakdown
49
+ * Print detailed scoring breakdown by tool.
50
+ *
51
+ * @param scoringResult - The overall scoring result.
52
+ * @param scoringProfile - The name of the scoring profile used.
44
53
  */
45
54
  export function printScoring(
46
55
  scoringResult: ScoringResult,
@@ -87,7 +96,11 @@ export function printScoring(
87
96
  }
88
97
 
89
98
  /**
90
- * Normalize report mapping (CLI logic)
99
+ * Normalize and map tool-specific results to a unified report structure.
100
+ *
101
+ * @param res - Raw unified results object.
102
+ * @param scoring - Optional scoring result to include.
103
+ * @returns Enhanced report with totals and scoring.
91
104
  */
92
105
  export function mapToUnifiedReport(
93
106
  res: any,
package/src/index.ts CHANGED
@@ -147,8 +147,12 @@ function sanitizeToolConfig(config: any): any {
147
147
  }
148
148
 
149
149
  /**
150
- * AIReady Unified Analysis
150
+ * AIReady Unified Analysis.
151
151
  * Orchestrates all registered tools via the ToolRegistry.
152
+ *
153
+ * @param options - Unified analysis configuration including tools and rootDir.
154
+ * @returns Promise resolving to the consolidated analysis result.
155
+ * @lastUpdated 2026-03-18
152
156
  */
153
157
  export async function analyzeUnified(
154
158
  options: UnifiedAnalysisOptions
@@ -347,8 +351,12 @@ export async function analyzeUnified(
347
351
  }
348
352
 
349
353
  /**
350
- * AIReady Unified Scoring
354
+ * AIReady Unified Scoring.
351
355
  * Calculates scores for all analyzed tools.
356
+ *
357
+ * @param results - The consolidated results from a unified analysis.
358
+ * @param options - Analysis options for weighting and budget calculation.
359
+ * @returns Promise resolving to the final scoring result.
352
360
  */
353
361
  export async function scoreUnified(
354
362
  results: UnifiedAnalysisResult,
@@ -419,7 +427,10 @@ export async function scoreUnified(
419
427
  }
420
428
 
421
429
  /**
422
- * Generate human-readable summary of unified results
430
+ * Generate human-readable summary of unified results.
431
+ *
432
+ * @param result - The consolidated analysis result object.
433
+ * @returns Formatted summary string.
423
434
  */
424
435
  export function generateUnifiedSummary(result: UnifiedAnalysisResult): string {
425
436
  const { summary } = result;
@@ -22,7 +22,10 @@ export function getReportTimestamp(): string {
22
22
  }
23
23
 
24
24
  /**
25
- * Warn if graph caps may be exceeded
25
+ * Warn if graph caps may be exceeded for visualization.
26
+ *
27
+ * @param report - The combined analysis report.
28
+ * @param dirPath - Root directory to look for configuration.
26
29
  */
27
30
  export async function warnIfGraphCapExceeded(report: any, dirPath: string) {
28
31
  try {
@@ -90,7 +93,11 @@ export async function warnIfGraphCapExceeded(report: any, dirPath: string) {
90
93
  }
91
94
 
92
95
  /**
93
- * Generate markdown report for consistency command
96
+ * Generate markdown report for consistency command.
97
+ *
98
+ * @param report - The consistency report object.
99
+ * @param elapsedTime - Time taken for analysis in seconds.
100
+ * @returns Formatted markdown string.
94
101
  */
95
102
  export function generateMarkdownReport(
96
103
  report: any,
@@ -117,7 +124,11 @@ export function generateMarkdownReport(
117
124
  }
118
125
 
119
126
  /**
120
- * Truncate array for display (show first N items with "... +N more")
127
+ * Truncate array for display (show first N items with "... +N more").
128
+ *
129
+ * @param arr - The array to truncate.
130
+ * @param cap - Maximum number of items to show before truncating.
131
+ * @returns Formatted string for display.
121
132
  */
122
133
  export function truncateArray(arr: any[] | undefined, cap = 8): string {
123
134
  if (!Array.isArray(arr)) return '';
@@ -128,6 +139,10 @@ export function truncateArray(arr: any[] | undefined, cap = 8): string {
128
139
 
129
140
  /**
130
141
  * Build a common ToolScoringOutput payload from a tool report.
142
+ *
143
+ * @param toolName - Identifier for the tool.
144
+ * @param report - Minimal report structure containing score and recommendations.
145
+ * @returns Standardized scoring output.
131
146
  */
132
147
  export function buildToolScoringOutput(
133
148
  toolName: string,
@@ -152,6 +167,10 @@ export function buildToolScoringOutput(
152
167
 
153
168
  /**
154
169
  * Load config and apply tool-level defaults.
170
+ *
171
+ * @param directory - Directory to search for config.
172
+ * @param defaults - Tool-specific default values.
173
+ * @returns Merged configuration with tool defaults.
155
174
  */
156
175
  export async function loadMergedToolConfig<T extends Record<string, unknown>>(
157
176
  directory: string,
@@ -164,6 +183,11 @@ export async function loadMergedToolConfig<T extends Record<string, unknown>>(
164
183
 
165
184
  /**
166
185
  * Shared base scan options used by CLI tool commands.
186
+ *
187
+ * @param directory - Root directory for scanning.
188
+ * @param options - CLI commander options object.
189
+ * @param extras - Additional tool-specific options.
190
+ * @returns Combined scan options for the analyzer.
167
191
  */
168
192
  export function buildCommonScanOptions(
169
193
  directory: string,
@@ -180,6 +204,9 @@ export function buildCommonScanOptions(
180
204
 
181
205
  /**
182
206
  * Execute a config-driven tool command with shared CLI plumbing.
207
+ *
208
+ * @param params - Execution parameters including analyze and score callbacks.
209
+ * @returns Promise resolving to the tool report and its scoring output.
183
210
  */
184
211
  export async function runConfiguredToolCommand<TReport, TScoring>(params: {
185
212
  directory: string;