@aida-dev/cli 0.1.0
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/LICENSE +21 -0
- package/README.md +54 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +147 -0
- package/dist/index.js.map +1 -0
- package/package.json +38 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Francesco Falanga <falanga.fra@gmail.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# @aida/cli
|
|
2
|
+
|
|
3
|
+
Command-line interface for AIDA (AI Development Accounting) metrics.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm install
|
|
9
|
+
pnpm build
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
### Basic workflow
|
|
15
|
+
```bash
|
|
16
|
+
# Collect commits from last 90 days
|
|
17
|
+
aida collect --since 90d
|
|
18
|
+
|
|
19
|
+
# Analyze collected data
|
|
20
|
+
aida analyze
|
|
21
|
+
|
|
22
|
+
# Generate reports
|
|
23
|
+
aida report --format both
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Commands
|
|
27
|
+
|
|
28
|
+
#### `aida collect`
|
|
29
|
+
Collect commits and generate `commit-stream.json`
|
|
30
|
+
|
|
31
|
+
Options:
|
|
32
|
+
- `--repo <path>` - Repository path (default: current directory)
|
|
33
|
+
- `--since <date>` - Start date (ISO or relative like 90d)
|
|
34
|
+
- `--until <date>` - End date (ISO or relative)
|
|
35
|
+
- `--ai-pattern <pattern>` - Custom AI detection pattern (repeatable)
|
|
36
|
+
- `--default-branch <name>` - Default branch name (auto-detect if omitted)
|
|
37
|
+
- `--out-dir <path>` - Output directory (default: ./aida-output)
|
|
38
|
+
- `--verbose` - Verbose logging
|
|
39
|
+
|
|
40
|
+
#### `aida analyze`
|
|
41
|
+
Analyze commit stream and generate `metrics.json`
|
|
42
|
+
|
|
43
|
+
#### `aida report`
|
|
44
|
+
Generate human-readable reports from metrics
|
|
45
|
+
|
|
46
|
+
Options:
|
|
47
|
+
- `--format <format>` - Output format: json, md, both (default: both)
|
|
48
|
+
|
|
49
|
+
## Output Files
|
|
50
|
+
|
|
51
|
+
- `commit-stream.json` - Normalized commit data with AI tagging
|
|
52
|
+
- `metrics.json` - Calculated merge ratio and persistence metrics
|
|
53
|
+
- `report.json` - JSON report (same as metrics.json)
|
|
54
|
+
- `report.md` - Human-readable Markdown report
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/index.ts
|
|
4
|
+
import { Command as Command4 } from "commander";
|
|
5
|
+
|
|
6
|
+
// src/commands/collect.ts
|
|
7
|
+
import { Command } from "commander";
|
|
8
|
+
import { collectCommits, writeJSON, createLogger } from "@aida-dev/core";
|
|
9
|
+
import { join } from "path";
|
|
10
|
+
|
|
11
|
+
// src/schema/config.ts
|
|
12
|
+
import { z } from "zod";
|
|
13
|
+
var CLIConfig = z.object({
|
|
14
|
+
repo: z.string().default(process.cwd()),
|
|
15
|
+
since: z.string().optional(),
|
|
16
|
+
until: z.string().optional(),
|
|
17
|
+
aiPatterns: z.array(z.string()).default([]),
|
|
18
|
+
defaultBranch: z.string().optional(),
|
|
19
|
+
outDir: z.string().default("./aida-output"),
|
|
20
|
+
format: z.enum(["json", "md", "both"]).default("both"),
|
|
21
|
+
verbose: z.boolean().default(false)
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
// src/commands/collect.ts
|
|
25
|
+
function createCollectCommand() {
|
|
26
|
+
return new Command("collect").description("Collect commits and generate commit-stream.json").option("--repo <path>", "Repository path", process.cwd()).option("--since <date>", "Start date (ISO or relative like 90d)").option("--until <date>", "End date (ISO or relative)").option("--ai-pattern <pattern>", "AI detection pattern (repeatable)", (value, previous) => {
|
|
27
|
+
return previous ? [...previous, value] : [value];
|
|
28
|
+
}, []).option("--default-branch <name>", "Default branch name").option("--out-dir <path>", "Output directory", "./aida-output").option("--verbose", "Verbose logging", false).action(async (options) => {
|
|
29
|
+
const config = CLIConfig.parse(options);
|
|
30
|
+
const logger = createLogger(config.verbose);
|
|
31
|
+
try {
|
|
32
|
+
logger.info("Starting commit collection...");
|
|
33
|
+
const commitStream = await collectCommits({
|
|
34
|
+
repoPath: config.repo,
|
|
35
|
+
since: config.since,
|
|
36
|
+
until: config.until,
|
|
37
|
+
aiPatterns: config.aiPatterns,
|
|
38
|
+
defaultBranch: config.defaultBranch,
|
|
39
|
+
logger
|
|
40
|
+
});
|
|
41
|
+
const outputPath = join(config.outDir, "commit-stream.json");
|
|
42
|
+
await writeJSON(outputPath, commitStream);
|
|
43
|
+
logger.info(`Collected ${commitStream.commits.length} commits`);
|
|
44
|
+
logger.info(`AI-tagged commits: ${commitStream.commits.filter((c) => c.tags.ai).length}`);
|
|
45
|
+
logger.info(`Output written to: ${outputPath}`);
|
|
46
|
+
} catch (error) {
|
|
47
|
+
logger.error(`Collection failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
48
|
+
process.exit(1);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// src/commands/analyze.ts
|
|
54
|
+
import { Command as Command2 } from "commander";
|
|
55
|
+
import { readJSON, writeJSON as writeJSON2, createLogger as createLogger2 } from "@aida-dev/core";
|
|
56
|
+
import { calculateMetrics } from "@aida-dev/metrics";
|
|
57
|
+
import { join as join2 } from "path";
|
|
58
|
+
function createAnalyzeCommand() {
|
|
59
|
+
return new Command2("analyze").description("Analyze commit stream and generate metrics.json").option("--out-dir <path>", "Output directory", "./aida-output").option("--verbose", "Verbose logging", false).action(async (options) => {
|
|
60
|
+
const config = CLIConfig.parse(options);
|
|
61
|
+
const logger = createLogger2(config.verbose);
|
|
62
|
+
try {
|
|
63
|
+
logger.info("Starting metrics analysis...");
|
|
64
|
+
const inputPath = join2(config.outDir, "commit-stream.json");
|
|
65
|
+
const commitStream = await readJSON(inputPath);
|
|
66
|
+
logger.info(`Analyzing ${commitStream.commits.length} commits`);
|
|
67
|
+
const metrics = calculateMetrics(commitStream);
|
|
68
|
+
const outputPath = join2(config.outDir, "metrics.json");
|
|
69
|
+
await writeJSON2(outputPath, metrics);
|
|
70
|
+
logger.info(`Merge ratio: ${(metrics.mergeRatio.mergeRatio * 100).toFixed(1)}%`);
|
|
71
|
+
logger.info(`Average persistence: ${metrics.persistence.avgDays} days`);
|
|
72
|
+
logger.info(`Output written to: ${outputPath}`);
|
|
73
|
+
} catch (error) {
|
|
74
|
+
logger.error(`Analysis failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
75
|
+
process.exit(1);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// src/commands/report.ts
|
|
81
|
+
import { Command as Command3 } from "commander";
|
|
82
|
+
import { readJSON as readJSON2, writeJSON as writeJSON3, createLogger as createLogger3 } from "@aida-dev/core";
|
|
83
|
+
import { join as join3 } from "path";
|
|
84
|
+
import { promises as fs } from "fs";
|
|
85
|
+
function generateMarkdownReport(metrics) {
|
|
86
|
+
const mergeRatioPct = (metrics.mergeRatio.mergeRatio * 100).toFixed(1);
|
|
87
|
+
return `# AIDA Report
|
|
88
|
+
|
|
89
|
+
**Repo:** ${metrics.repoPath}
|
|
90
|
+
**Default branch:** ${metrics.defaultBranch}
|
|
91
|
+
**Window:** ${metrics.window.since || "beginning"} \u2192 ${metrics.window.until || "now"}
|
|
92
|
+
**Generated:** ${metrics.generatedAt}
|
|
93
|
+
|
|
94
|
+
## Merge Ratio
|
|
95
|
+
- AI-tagged commits (total): ${metrics.mergeRatio.aiCommitsTotal}
|
|
96
|
+
- AI-tagged commits merged: ${metrics.mergeRatio.aiCommitsMerged}
|
|
97
|
+
- **Merge Ratio:** ${mergeRatioPct}%
|
|
98
|
+
|
|
99
|
+
## Persistence (file-level proxy)
|
|
100
|
+
- Commits considered: ${metrics.persistence.commitsConsidered}
|
|
101
|
+
- Average days: ${metrics.persistence.avgDays}
|
|
102
|
+
- Median days: ${metrics.persistence.medianDays}
|
|
103
|
+
|
|
104
|
+
| 0\u20131d | 2\u20137d | 8\u201330d | 31\u201390d | 90d+ |
|
|
105
|
+
|---:|---:|---:|---:|---:|
|
|
106
|
+
| ${metrics.persistence.buckets.d0_1} | ${metrics.persistence.buckets.d2_7} | ${metrics.persistence.buckets.d8_30} | ${metrics.persistence.buckets.d31_90} | ${metrics.persistence.buckets.d90_plus} |
|
|
107
|
+
|
|
108
|
+
### Caveats
|
|
109
|
+
${metrics.caveats.map((caveat) => `- ${caveat}`).join("\n")}
|
|
110
|
+
`;
|
|
111
|
+
}
|
|
112
|
+
function createReportCommand() {
|
|
113
|
+
return new Command3("report").description("Generate report from metrics.json").option("--out-dir <path>", "Output directory", "./aida-output").option("--format <format>", "Output format: json, md, both", "both").option("--verbose", "Verbose logging", false).action(async (options) => {
|
|
114
|
+
const config = CLIConfig.parse(options);
|
|
115
|
+
const logger = createLogger3(config.verbose);
|
|
116
|
+
try {
|
|
117
|
+
logger.info("Generating report...");
|
|
118
|
+
const inputPath = join3(config.outDir, "metrics.json");
|
|
119
|
+
const metrics = await readJSON2(inputPath);
|
|
120
|
+
if (config.format === "json" || config.format === "both") {
|
|
121
|
+
const jsonPath = join3(config.outDir, "report.json");
|
|
122
|
+
await writeJSON3(jsonPath, metrics);
|
|
123
|
+
logger.info(`JSON report written to: ${jsonPath}`);
|
|
124
|
+
}
|
|
125
|
+
if (config.format === "md" || config.format === "both") {
|
|
126
|
+
const markdown = generateMarkdownReport(metrics);
|
|
127
|
+
const mdPath = join3(config.outDir, "report.md");
|
|
128
|
+
await fs.writeFile(mdPath, markdown, "utf-8");
|
|
129
|
+
logger.info(`Markdown report written to: ${mdPath}`);
|
|
130
|
+
}
|
|
131
|
+
logger.info("Report generation completed");
|
|
132
|
+
} catch (error) {
|
|
133
|
+
logger.error(`Report generation failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
134
|
+
process.exit(1);
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// src/index.ts
|
|
140
|
+
var program = new Command4();
|
|
141
|
+
program.name("aida").description("AIDA (AI Development Accounting) - Metrics for AI-assisted development").version("0.0.0");
|
|
142
|
+
program.addCommand(createCollectCommand());
|
|
143
|
+
program.addCommand(createAnalyzeCommand());
|
|
144
|
+
program.addCommand(createReportCommand());
|
|
145
|
+
program.option("--repo <path>", "Repository path (default: current directory)").option("--since <date>", "Start date (ISO or relative like 90d)").option("--until <date>", "End date (ISO or relative)").option("--ai-pattern <pattern>", "AI detection pattern (repeatable)").option("--default-branch <name>", "Default branch name (auto-detect if omitted)").option("--out-dir <path>", "Output directory (default: ./aida-output)").option("--format <format>", "Output format: json, md, both (default: both)").option("--verbose", "Verbose logging");
|
|
146
|
+
program.parse();
|
|
147
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/commands/collect.ts","../src/schema/config.ts","../src/commands/analyze.ts","../src/commands/report.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { Command } from 'commander';\nimport { createCollectCommand } from './commands/collect.js';\nimport { createAnalyzeCommand } from './commands/analyze.js';\nimport { createReportCommand } from './commands/report.js';\n\nconst program = new Command();\n\nprogram\n .name('aida')\n .description('AIDA (AI Development Accounting) - Metrics for AI-assisted development')\n .version('0.0.0');\n\n// Add commands\nprogram.addCommand(createCollectCommand());\nprogram.addCommand(createAnalyzeCommand());\nprogram.addCommand(createReportCommand());\n\n// Global options\nprogram\n .option('--repo <path>', 'Repository path (default: current directory)')\n .option('--since <date>', 'Start date (ISO or relative like 90d)')\n .option('--until <date>', 'End date (ISO or relative)')\n .option('--ai-pattern <pattern>', 'AI detection pattern (repeatable)')\n .option('--default-branch <name>', 'Default branch name (auto-detect if omitted)')\n .option('--out-dir <path>', 'Output directory (default: ./aida-output)')\n .option('--format <format>', 'Output format: json, md, both (default: both)')\n .option('--verbose', 'Verbose logging');\n\nprogram.parse();\n","import { Command } from 'commander';\nimport { collectCommits, writeJSON, createLogger } from '@aida-dev/core';\nimport { join } from 'path';\nimport { CLIConfig } from '../schema/config.js';\n\nexport function createCollectCommand(): Command {\n return new Command('collect')\n .description('Collect commits and generate commit-stream.json')\n .option('--repo <path>', 'Repository path', process.cwd())\n .option('--since <date>', 'Start date (ISO or relative like 90d)')\n .option('--until <date>', 'End date (ISO or relative)')\n .option('--ai-pattern <pattern>', 'AI detection pattern (repeatable)', (value, previous) => {\n return previous ? [...previous, value] : [value];\n }, [])\n .option('--default-branch <name>', 'Default branch name')\n .option('--out-dir <path>', 'Output directory', './aida-output')\n .option('--verbose', 'Verbose logging', false)\n .action(async (options) => {\n const config = CLIConfig.parse(options);\n const logger = createLogger(config.verbose);\n \n try {\n logger.info('Starting commit collection...');\n \n const commitStream = await collectCommits({\n repoPath: config.repo,\n since: config.since,\n until: config.until,\n aiPatterns: config.aiPatterns,\n defaultBranch: config.defaultBranch,\n logger,\n });\n \n const outputPath = join(config.outDir, 'commit-stream.json');\n await writeJSON(outputPath, commitStream);\n \n logger.info(`Collected ${commitStream.commits.length} commits`);\n logger.info(`AI-tagged commits: ${commitStream.commits.filter(c => c.tags.ai).length}`);\n logger.info(`Output written to: ${outputPath}`);\n } catch (error) {\n logger.error(`Collection failed: ${error instanceof Error ? error.message : String(error)}`);\n process.exit(1);\n }\n });\n}\n","import { z } from \"zod\";\n\nexport const CLIConfig = z.object({\n repo: z.string().default(process.cwd()),\n since: z.string().optional(),\n until: z.string().optional(),\n aiPatterns: z.array(z.string()).default([]),\n defaultBranch: z.string().optional(),\n outDir: z.string().default('./aida-output'),\n format: z.enum(['json', 'md', 'both']).default('both'),\n verbose: z.boolean().default(false),\n});\n\nexport type CLIConfig = z.infer<typeof CLIConfig>;\n","import { Command } from 'commander';\nimport { readJSON, writeJSON, createLogger } from '@aida-dev/core';\nimport { calculateMetrics } from '@aida-dev/metrics';\nimport { join } from 'path';\nimport { CLIConfig } from '../schema/config.js';\n\nexport function createAnalyzeCommand(): Command {\n return new Command('analyze')\n .description('Analyze commit stream and generate metrics.json')\n .option('--out-dir <path>', 'Output directory', './aida-output')\n .option('--verbose', 'Verbose logging', false)\n .action(async (options) => {\n const config = CLIConfig.parse(options);\n const logger = createLogger(config.verbose);\n \n try {\n logger.info('Starting metrics analysis...');\n \n const inputPath = join(config.outDir, 'commit-stream.json');\n const commitStream = await readJSON(inputPath);\n \n logger.info(`Analyzing ${commitStream.commits.length} commits`);\n \n const metrics = calculateMetrics(commitStream);\n \n const outputPath = join(config.outDir, 'metrics.json');\n await writeJSON(outputPath, metrics);\n \n logger.info(`Merge ratio: ${(metrics.mergeRatio.mergeRatio * 100).toFixed(1)}%`);\n logger.info(`Average persistence: ${metrics.persistence.avgDays} days`);\n logger.info(`Output written to: ${outputPath}`);\n } catch (error) {\n logger.error(`Analysis failed: ${error instanceof Error ? error.message : String(error)}`);\n process.exit(1);\n }\n });\n}\n","import { Command } from 'commander';\nimport { readJSON, writeJSON, createLogger } from '@aida-dev/core';\nimport { Metrics } from '@aida-dev/metrics';\nimport { join } from 'path';\nimport { promises as fs } from 'fs';\nimport { CLIConfig } from '../schema/config.js';\n\nfunction generateMarkdownReport(metrics: Metrics): string {\n const mergeRatioPct = (metrics.mergeRatio.mergeRatio * 100).toFixed(1);\n \n return `# AIDA Report\n\n**Repo:** ${metrics.repoPath} \n**Default branch:** ${metrics.defaultBranch} \n**Window:** ${metrics.window.since || 'beginning'} → ${metrics.window.until || 'now'} \n**Generated:** ${metrics.generatedAt}\n\n## Merge Ratio\n- AI-tagged commits (total): ${metrics.mergeRatio.aiCommitsTotal}\n- AI-tagged commits merged: ${metrics.mergeRatio.aiCommitsMerged}\n- **Merge Ratio:** ${mergeRatioPct}%\n\n## Persistence (file-level proxy)\n- Commits considered: ${metrics.persistence.commitsConsidered}\n- Average days: ${metrics.persistence.avgDays}\n- Median days: ${metrics.persistence.medianDays}\n\n| 0–1d | 2–7d | 8–30d | 31–90d | 90d+ |\n|---:|---:|---:|---:|---:|\n| ${metrics.persistence.buckets.d0_1} | ${metrics.persistence.buckets.d2_7} | ${metrics.persistence.buckets.d8_30} | ${metrics.persistence.buckets.d31_90} | ${metrics.persistence.buckets.d90_plus} |\n\n### Caveats\n${metrics.caveats.map(caveat => `- ${caveat}`).join('\\n')}\n`;\n}\n\nexport function createReportCommand(): Command {\n return new Command('report')\n .description('Generate report from metrics.json')\n .option('--out-dir <path>', 'Output directory', './aida-output')\n .option('--format <format>', 'Output format: json, md, both', 'both')\n .option('--verbose', 'Verbose logging', false)\n .action(async (options) => {\n const config = CLIConfig.parse(options);\n const logger = createLogger(config.verbose);\n \n try {\n logger.info('Generating report...');\n \n const inputPath = join(config.outDir, 'metrics.json');\n const metrics: Metrics = await readJSON(inputPath);\n \n if (config.format === 'json' || config.format === 'both') {\n const jsonPath = join(config.outDir, 'report.json');\n await writeJSON(jsonPath, metrics);\n logger.info(`JSON report written to: ${jsonPath}`);\n }\n \n if (config.format === 'md' || config.format === 'both') {\n const markdown = generateMarkdownReport(metrics);\n const mdPath = join(config.outDir, 'report.md');\n await fs.writeFile(mdPath, markdown, 'utf-8');\n logger.info(`Markdown report written to: ${mdPath}`);\n }\n \n logger.info('Report generation completed');\n } catch (error) {\n logger.error(`Report generation failed: ${error instanceof Error ? error.message : String(error)}`);\n process.exit(1);\n }\n });\n}\n"],"mappings":";;;AAEA,SAAS,WAAAA,gBAAe;;;ACFxB,SAAS,eAAe;AACxB,SAAS,gBAAgB,WAAW,oBAAoB;AACxD,SAAS,YAAY;;;ACFrB,SAAS,SAAS;AAEX,IAAM,YAAY,EAAE,OAAO;AAAA,EAChC,MAAM,EAAE,OAAO,EAAE,QAAQ,QAAQ,IAAI,CAAC;AAAA,EACtC,OAAO,EAAE,OAAO,EAAE,SAAS;AAAA,EAC3B,OAAO,EAAE,OAAO,EAAE,SAAS;AAAA,EAC3B,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,CAAC;AAAA,EAC1C,eAAe,EAAE,OAAO,EAAE,SAAS;AAAA,EACnC,QAAQ,EAAE,OAAO,EAAE,QAAQ,eAAe;AAAA,EAC1C,QAAQ,EAAE,KAAK,CAAC,QAAQ,MAAM,MAAM,CAAC,EAAE,QAAQ,MAAM;AAAA,EACrD,SAAS,EAAE,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AAM,WAAW,uBAAuB,OAAO;AAC/C,cAAM,SAASF,MAAK,OAAO,QAAQ,WAAW;AAC9C,cAAM,GAAG,UAAU,QAAQ,UAAU,OAAO;AAC5C,eAAO,KAAK,+BAA+B,MAAM,EAAE;AAAA,MACrD;AAEA,aAAO,KAAK,6BAA6B;AAAA,IAC3C,SAAS,OAAO;AACd,aAAO,MAAM,6BAA6B,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CAAC,EAAE;AAClG,cAAQ,KAAK,CAAC;AAAA,IAChB;AAAA,EACF,CAAC;AACL;;;AJhEA,IAAM,UAAU,IAAIG,SAAQ;AAE5B,QACG,KAAK,MAAM,EACX,YAAY,wEAAwE,EACpF,QAAQ,OAAO;AAGlB,QAAQ,WAAW,qBAAqB,CAAC;AACzC,QAAQ,WAAW,qBAAqB,CAAC;AACzC,QAAQ,WAAW,oBAAoB,CAAC;AAGxC,QACG,OAAO,iBAAiB,8CAA8C,EACtE,OAAO,kBAAkB,uCAAuC,EAChE,OAAO,kBAAkB,4BAA4B,EACrD,OAAO,0BAA0B,mCAAmC,EACpE,OAAO,2BAA2B,8CAA8C,EAChF,OAAO,oBAAoB,2CAA2C,EACtE,OAAO,qBAAqB,+CAA+C,EAC3E,OAAO,aAAa,iBAAiB;AAExC,QAAQ,MAAM;","names":["Command","Command","writeJSON","createLogger","join","Command","createLogger","join","writeJSON","Command","readJSON","writeJSON","createLogger","join","Command","createLogger","join","readJSON","writeJSON","Command"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aida-dev/cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"bin": {
|
|
12
|
+
"aida": "dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"commander": "^11.1.0",
|
|
19
|
+
"zod": "^3.22.4",
|
|
20
|
+
"@aida-dev/core": "0.2.0",
|
|
21
|
+
"@aida-dev/metrics": "0.1.0"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"tsup": "^8.0.0",
|
|
25
|
+
"vitest": "^2.0.0",
|
|
26
|
+
"eslint": "^9.0.0",
|
|
27
|
+
"prettier": "^3.2.5",
|
|
28
|
+
"@types/node": "^20.0.0",
|
|
29
|
+
"@vitest/coverage-v8": "^2.0.0"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "tsup src/index.ts --dts",
|
|
33
|
+
"dev": "tsup src/index.ts --dts --watch",
|
|
34
|
+
"test": "vitest run",
|
|
35
|
+
"lint": "eslint . --ext .ts",
|
|
36
|
+
"format": "prettier -w ."
|
|
37
|
+
}
|
|
38
|
+
}
|