@wundr.io/cli 1.0.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/README.md +551 -0
- package/bin/wundr.js +39 -0
- package/dist/ai/ai-service.d.ts +152 -0
- package/dist/ai/ai-service.d.ts.map +1 -0
- package/dist/ai/ai-service.js +430 -0
- package/dist/ai/ai-service.js.map +1 -0
- package/dist/ai/claude-client.d.ts +130 -0
- package/dist/ai/claude-client.d.ts.map +1 -0
- package/dist/ai/claude-client.js +339 -0
- package/dist/ai/claude-client.js.map +1 -0
- package/dist/ai/conversation-manager.d.ts +164 -0
- package/dist/ai/conversation-manager.d.ts.map +1 -0
- package/dist/ai/conversation-manager.js +612 -0
- package/dist/ai/conversation-manager.js.map +1 -0
- package/dist/ai/index.d.ts +5 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +8 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/cli.d.ts +36 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +173 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/ai.d.ts +89 -0
- package/dist/commands/ai.d.ts.map +1 -0
- package/dist/commands/ai.js +735 -0
- package/dist/commands/ai.js.map +1 -0
- package/dist/commands/analyze-optimized.d.ts +14 -0
- package/dist/commands/analyze-optimized.d.ts.map +1 -0
- package/dist/commands/analyze-optimized.js +437 -0
- package/dist/commands/analyze-optimized.js.map +1 -0
- package/dist/commands/analyze.d.ts +65 -0
- package/dist/commands/analyze.d.ts.map +1 -0
- package/dist/commands/analyze.js +435 -0
- package/dist/commands/analyze.js.map +1 -0
- package/dist/commands/batch.d.ts +71 -0
- package/dist/commands/batch.d.ts.map +1 -0
- package/dist/commands/batch.js +738 -0
- package/dist/commands/batch.js.map +1 -0
- package/dist/commands/chat.d.ts +71 -0
- package/dist/commands/chat.d.ts.map +1 -0
- package/dist/commands/chat.js +674 -0
- package/dist/commands/chat.js.map +1 -0
- package/dist/commands/claude-init.d.ts +28 -0
- package/dist/commands/claude-init.d.ts.map +1 -0
- package/dist/commands/claude-init.js +587 -0
- package/dist/commands/claude-init.js.map +1 -0
- package/dist/commands/claude-setup.d.ts +32 -0
- package/dist/commands/claude-setup.d.ts.map +1 -0
- package/dist/commands/claude-setup.js +570 -0
- package/dist/commands/claude-setup.js.map +1 -0
- package/dist/commands/computer-setup-commands.d.ts +39 -0
- package/dist/commands/computer-setup-commands.d.ts.map +1 -0
- package/dist/commands/computer-setup-commands.js +563 -0
- package/dist/commands/computer-setup-commands.js.map +1 -0
- package/dist/commands/computer-setup.d.ts +7 -0
- package/dist/commands/computer-setup.d.ts.map +1 -0
- package/dist/commands/computer-setup.js +481 -0
- package/dist/commands/computer-setup.js.map +1 -0
- package/dist/commands/create-command.d.ts +7 -0
- package/dist/commands/create-command.d.ts.map +1 -0
- package/dist/commands/create-command.js +158 -0
- package/dist/commands/create-command.js.map +1 -0
- package/dist/commands/create.d.ts +74 -0
- package/dist/commands/create.d.ts.map +1 -0
- package/dist/commands/create.js +556 -0
- package/dist/commands/create.js.map +1 -0
- package/dist/commands/dashboard.d.ts +91 -0
- package/dist/commands/dashboard.d.ts.map +1 -0
- package/dist/commands/dashboard.js +537 -0
- package/dist/commands/dashboard.js.map +1 -0
- package/dist/commands/govern.d.ts +70 -0
- package/dist/commands/govern.d.ts.map +1 -0
- package/dist/commands/govern.js +480 -0
- package/dist/commands/govern.js.map +1 -0
- package/dist/commands/init.d.ts +55 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +584 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/performance-optimizer.d.ts +30 -0
- package/dist/commands/performance-optimizer.d.ts.map +1 -0
- package/dist/commands/performance-optimizer.js +649 -0
- package/dist/commands/performance-optimizer.js.map +1 -0
- package/dist/commands/plugins.d.ts +87 -0
- package/dist/commands/plugins.d.ts.map +1 -0
- package/dist/commands/plugins.js +685 -0
- package/dist/commands/plugins.js.map +1 -0
- package/dist/commands/setup.d.ts +29 -0
- package/dist/commands/setup.d.ts.map +1 -0
- package/dist/commands/setup.js +399 -0
- package/dist/commands/setup.js.map +1 -0
- package/dist/commands/test-init.d.ts +9 -0
- package/dist/commands/test-init.d.ts.map +1 -0
- package/dist/commands/test-init.js +222 -0
- package/dist/commands/test-init.js.map +1 -0
- package/dist/commands/test.d.ts +25 -0
- package/dist/commands/test.d.ts.map +1 -0
- package/dist/commands/test.js +217 -0
- package/dist/commands/test.js.map +1 -0
- package/dist/commands/watch.d.ts +76 -0
- package/dist/commands/watch.d.ts.map +1 -0
- package/dist/commands/watch.js +610 -0
- package/dist/commands/watch.js.map +1 -0
- package/dist/context/context-manager.d.ts +155 -0
- package/dist/context/context-manager.d.ts.map +1 -0
- package/dist/context/context-manager.js +383 -0
- package/dist/context/context-manager.js.map +1 -0
- package/dist/context/index.d.ts +3 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +6 -0
- package/dist/context/index.js.map +1 -0
- package/dist/context/session-manager.d.ts +207 -0
- package/dist/context/session-manager.d.ts.map +1 -0
- package/dist/context/session-manager.js +682 -0
- package/dist/context/session-manager.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +51 -0
- package/dist/index.js.map +1 -0
- package/dist/interactive/interactive-mode.d.ts +76 -0
- package/dist/interactive/interactive-mode.d.ts.map +1 -0
- package/dist/interactive/interactive-mode.js +730 -0
- package/dist/interactive/interactive-mode.js.map +1 -0
- package/dist/nlp/command-mapper.d.ts +174 -0
- package/dist/nlp/command-mapper.d.ts.map +1 -0
- package/dist/nlp/command-mapper.js +623 -0
- package/dist/nlp/command-mapper.js.map +1 -0
- package/dist/nlp/command-parser.d.ts +106 -0
- package/dist/nlp/command-parser.d.ts.map +1 -0
- package/dist/nlp/command-parser.js +416 -0
- package/dist/nlp/command-parser.js.map +1 -0
- package/dist/nlp/index.d.ts +5 -0
- package/dist/nlp/index.d.ts.map +1 -0
- package/dist/nlp/index.js +8 -0
- package/dist/nlp/index.js.map +1 -0
- package/dist/nlp/intent-classifier.d.ts +59 -0
- package/dist/nlp/intent-classifier.d.ts.map +1 -0
- package/dist/nlp/intent-classifier.js +384 -0
- package/dist/nlp/intent-classifier.js.map +1 -0
- package/dist/nlp/intent-parser.d.ts +152 -0
- package/dist/nlp/intent-parser.d.ts.map +1 -0
- package/dist/nlp/intent-parser.js +739 -0
- package/dist/nlp/intent-parser.js.map +1 -0
- package/dist/plugins/plugin-manager.d.ts +120 -0
- package/dist/plugins/plugin-manager.d.ts.map +1 -0
- package/dist/plugins/plugin-manager.js +595 -0
- package/dist/plugins/plugin-manager.js.map +1 -0
- package/dist/types/index.d.ts +224 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/config-manager.d.ts +73 -0
- package/dist/utils/config-manager.d.ts.map +1 -0
- package/dist/utils/config-manager.js +339 -0
- package/dist/utils/config-manager.js.map +1 -0
- package/dist/utils/error-handler.d.ts +46 -0
- package/dist/utils/error-handler.d.ts.map +1 -0
- package/dist/utils/error-handler.js +169 -0
- package/dist/utils/error-handler.js.map +1 -0
- package/dist/utils/logger.d.ts +25 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +94 -0
- package/dist/utils/logger.js.map +1 -0
- package/package.json +119 -0
- package/src/ai/ai-service.ts +595 -0
- package/src/ai/claude-client.ts +490 -0
- package/src/ai/conversation-manager.ts +907 -0
- package/src/ai/index.ts +8 -0
- package/src/cli.ts +202 -0
- package/src/commands/ai.ts +995 -0
- package/src/commands/analyze-optimized.ts +641 -0
- package/src/commands/analyze.ts +576 -0
- package/src/commands/batch.ts +935 -0
- package/src/commands/chat.ts +876 -0
- package/src/commands/claude-init.ts +715 -0
- package/src/commands/claude-setup.ts +697 -0
- package/src/commands/computer-setup-commands.ts +709 -0
- package/src/commands/computer-setup.ts +565 -0
- package/src/commands/create-command.ts +175 -0
- package/src/commands/create.ts +727 -0
- package/src/commands/dashboard.ts +691 -0
- package/src/commands/govern.ts +635 -0
- package/src/commands/init.ts +677 -0
- package/src/commands/performance-optimizer.ts +864 -0
- package/src/commands/plugins.ts +848 -0
- package/src/commands/setup.ts +508 -0
- package/src/commands/test-init.ts +242 -0
- package/src/commands/test.ts +264 -0
- package/src/commands/watch.ts +755 -0
- package/src/context/context-manager.ts +546 -0
- package/src/context/index.ts +9 -0
- package/src/context/session-manager.ts +1019 -0
- package/src/index.ts +64 -0
- package/src/interactive/interactive-mode.ts +830 -0
- package/src/nlp/command-mapper.ts +885 -0
- package/src/nlp/command-parser.ts +564 -0
- package/src/nlp/index.ts +4 -0
- package/src/nlp/intent-classifier.ts +458 -0
- package/src/nlp/intent-parser.ts +1101 -0
- package/src/plugins/plugin-manager.ts +744 -0
- package/src/types/index.ts +252 -0
- package/src/types/modules.d.ts +56 -0
- package/src/utils/config-manager.ts +391 -0
- package/src/utils/error-handler.ts +192 -0
- package/src/utils/logger.ts +104 -0
- package/templates/batch/ci-cd.yaml +62 -0
- package/templates/component/{{fileName}}.test.tsx +17 -0
- package/templates/component/{{fileName}}.tsx +21 -0
- package/templates/service/{{fileName}}.ts +98 -0
- package/templates/wundr-test.config.js +0 -0
- package/test-suites/api/health.spec.ts +134 -0
- package/test-suites/helpers/test-config.ts +84 -0
- package/test-suites/ui/accessibility.spec.ts +102 -0
- package/test-suites/ui/smoke.spec.ts +92 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create Command
|
|
3
|
+
* Scaffolds new wundr-compliant projects
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { Command } from 'commander';
|
|
7
|
+
import chalk from 'chalk';
|
|
8
|
+
import { projectTemplates } from '@wundr/project-templates';
|
|
9
|
+
import { getLogger } from '@wundr/core';
|
|
10
|
+
|
|
11
|
+
const logger = getLogger('cli:create');
|
|
12
|
+
|
|
13
|
+
export const createCommand = new Command('create')
|
|
14
|
+
.description('Create a new wundr-compliant project')
|
|
15
|
+
.argument(
|
|
16
|
+
'[type]',
|
|
17
|
+
'Project type (frontend|backend|fullstack|monorepo|library|cli)'
|
|
18
|
+
)
|
|
19
|
+
.argument('[name]', 'Project name')
|
|
20
|
+
.option('-f, --framework <framework>', 'Framework to use')
|
|
21
|
+
.option('-d, --description <description>', 'Project description')
|
|
22
|
+
.option('-a, --author <author>', 'Project author')
|
|
23
|
+
.option('--no-git', 'Skip git initialization')
|
|
24
|
+
.option('--no-install', 'Skip dependency installation')
|
|
25
|
+
.option('--typescript', 'Use TypeScript', true)
|
|
26
|
+
.option('--testing', 'Include testing setup', true)
|
|
27
|
+
.option('--ci', 'Include CI/CD workflows', true)
|
|
28
|
+
.option('--docker', 'Include Docker configuration')
|
|
29
|
+
.option('-p, --path <path>', 'Path to create project in')
|
|
30
|
+
.option('-l, --list', 'List available templates')
|
|
31
|
+
.action(async (type?: string, name?: string, options?: any) => {
|
|
32
|
+
try {
|
|
33
|
+
// List templates if requested
|
|
34
|
+
if (options?.list) {
|
|
35
|
+
projectTemplates.listTemplates();
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Interactive mode if no arguments
|
|
40
|
+
if (!type || !name) {
|
|
41
|
+
await projectTemplates.createInteractive();
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Validate project type
|
|
46
|
+
const validTypes = [
|
|
47
|
+
'frontend',
|
|
48
|
+
'backend',
|
|
49
|
+
'fullstack',
|
|
50
|
+
'monorepo',
|
|
51
|
+
'library',
|
|
52
|
+
'cli',
|
|
53
|
+
];
|
|
54
|
+
if (!validTypes.includes(type)) {
|
|
55
|
+
console.error(chalk.red(`Invalid project type: ${type}`));
|
|
56
|
+
console.log(chalk.yellow(`Valid types: ${validTypes.join(', ')}`));
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Create project with options
|
|
61
|
+
await projectTemplates.createProject({
|
|
62
|
+
name,
|
|
63
|
+
type: type as any,
|
|
64
|
+
framework: options.framework,
|
|
65
|
+
description: options.description,
|
|
66
|
+
author: options.author,
|
|
67
|
+
git: options.git,
|
|
68
|
+
install: options.install,
|
|
69
|
+
typescript: options.typescript,
|
|
70
|
+
testing: options.testing,
|
|
71
|
+
ci: options.ci,
|
|
72
|
+
docker: options.docker,
|
|
73
|
+
path: options.path,
|
|
74
|
+
});
|
|
75
|
+
} catch (error) {
|
|
76
|
+
logger.error('Failed to create project', error);
|
|
77
|
+
console.error(
|
|
78
|
+
chalk.red(
|
|
79
|
+
`\n❌ Error: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
80
|
+
)
|
|
81
|
+
);
|
|
82
|
+
process.exit(1);
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
// Add subcommands for specific project types
|
|
87
|
+
createCommand
|
|
88
|
+
.command('frontend <name>')
|
|
89
|
+
.description('Create a frontend application')
|
|
90
|
+
.option('-f, --framework <framework>', 'Framework (next|react|vue)', 'next')
|
|
91
|
+
.action(async (name: string, options: any) => {
|
|
92
|
+
await projectTemplates.createProject({
|
|
93
|
+
name,
|
|
94
|
+
type: 'frontend',
|
|
95
|
+
framework: options.framework,
|
|
96
|
+
install: true,
|
|
97
|
+
git: true,
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
createCommand
|
|
102
|
+
.command('backend <name>')
|
|
103
|
+
.description('Create a backend API')
|
|
104
|
+
.option(
|
|
105
|
+
'-f, --framework <framework>',
|
|
106
|
+
'Framework (fastify|express|nestjs)',
|
|
107
|
+
'fastify'
|
|
108
|
+
)
|
|
109
|
+
.action(async (name: string, options: any) => {
|
|
110
|
+
await projectTemplates.createProject({
|
|
111
|
+
name,
|
|
112
|
+
type: 'backend',
|
|
113
|
+
framework: options.framework,
|
|
114
|
+
install: true,
|
|
115
|
+
git: true,
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
createCommand
|
|
120
|
+
.command('monorepo <name>')
|
|
121
|
+
.description('Create a monorepo platform')
|
|
122
|
+
.action(async (name: string) => {
|
|
123
|
+
await projectTemplates.createProject({
|
|
124
|
+
name,
|
|
125
|
+
type: 'monorepo',
|
|
126
|
+
framework: 'turborepo',
|
|
127
|
+
install: true,
|
|
128
|
+
git: true,
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
createCommand
|
|
133
|
+
.command('fullstack <name>')
|
|
134
|
+
.description('Create a full-stack application')
|
|
135
|
+
.option('-s, --stack <stack>', 'Stack (next-fastify|t3)', 'next-fastify')
|
|
136
|
+
.action(async (name: string, options: any) => {
|
|
137
|
+
// For fullstack, we create a monorepo with both frontend and backend
|
|
138
|
+
await projectTemplates.createProject({
|
|
139
|
+
name,
|
|
140
|
+
type: 'monorepo',
|
|
141
|
+
framework: 'turborepo',
|
|
142
|
+
install: true,
|
|
143
|
+
git: true,
|
|
144
|
+
description: 'Full-stack wundr-compliant application',
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
createCommand
|
|
149
|
+
.command('library <name>')
|
|
150
|
+
.description('Create an NPM library')
|
|
151
|
+
.option('--react', 'React component library')
|
|
152
|
+
.action(async (name: string, options: any) => {
|
|
153
|
+
await projectTemplates.createProject({
|
|
154
|
+
name,
|
|
155
|
+
type: 'library',
|
|
156
|
+
typescript: true,
|
|
157
|
+
testing: true,
|
|
158
|
+
install: true,
|
|
159
|
+
git: true,
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
createCommand
|
|
164
|
+
.command('cli <name>')
|
|
165
|
+
.description('Create a CLI tool')
|
|
166
|
+
.action(async (name: string) => {
|
|
167
|
+
await projectTemplates.createProject({
|
|
168
|
+
name,
|
|
169
|
+
type: 'cli',
|
|
170
|
+
typescript: true,
|
|
171
|
+
testing: true,
|
|
172
|
+
install: true,
|
|
173
|
+
git: true,
|
|
174
|
+
});
|
|
175
|
+
});
|