-
Notifications
You must be signed in to change notification settings - Fork 162
Expand file tree
/
Copy pathcli.ts
More file actions
65 lines (55 loc) · 2.39 KB
/
cli.ts
File metadata and controls
65 lines (55 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env node
import { Command } from 'commander';
import { initCommand } from './commands/init';
import { phaseCommand } from './commands/phase';
import { setupCommand } from './commands/setup';
import { lintCommand } from './commands/lint';
import { installCommand } from './commands/install';
import { registerMemoryCommand } from './commands/memory';
import { registerSkillCommand } from './commands/skill';
import { registerAgentCommand } from './commands/agent';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { version } = require('../package.json') as { version: string };
const program = new Command();
program
.name('ai-devkit')
.description('AI-assisted software development toolkit')
.version(version);
program
.command('init')
.description('Initialize AI DevKit in the current directory')
.option('-e, --environment <env>', 'Development environment (cursor|claude|both)')
.option('-a, --all', 'Initialize all phases')
.option('-p, --phases <phases>', 'Comma-separated list of phases to initialize')
.option('-t, --template <path>', 'Initialize from template file (.yaml, .yml, .json)')
.option('-d, --docs-dir <path>', 'Custom directory for AI documentation (default: docs/ai)')
.option(
'--gitignore-artifacts',
'Add .ai-devkit.json, the AI docs directory, and ai-devkit command folders (per-tool commandPath) to .gitignore'
)
.action(initCommand);
program
.command('phase [name]')
.description('Add a specific phase template (requirements|design|planning|implementation|testing|deployment|monitoring)')
.action(phaseCommand);
program
.command('setup')
.description('Set up AI DevKit commands globally')
.option('-g, --global', 'Install commands to global environment folders')
.action(setupCommand);
program
.command('lint')
.description('Validate workspace readiness for AI DevKit workflows')
.option('-f, --feature <name>', 'Validate docs and git worktree conventions for a feature')
.option('--json', 'Output lint results as JSON')
.action(lintCommand);
program
.command('install')
.description('Install AI DevKit artifacts from a project config')
.option('-c, --config <path>', 'Path to config file (default: .ai-devkit.json)')
.option('--overwrite', 'Overwrite existing install artifacts')
.action(installCommand);
registerMemoryCommand(program);
registerSkillCommand(program);
registerAgentCommand(program);
program.parse();