@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
package/README.md
ADDED
|
@@ -0,0 +1,551 @@
|
|
|
1
|
+
# @wundr/cli
|
|
2
|
+
|
|
3
|
+
The unified CLI framework for the Wundr platform - Transform monolithic chaos into architectural
|
|
4
|
+
elegance with AI-powered development tools.
|
|
5
|
+
|
|
6
|
+
## 🚀 Features
|
|
7
|
+
|
|
8
|
+
- **Commander.js Foundation** - Robust command structure with comprehensive help
|
|
9
|
+
- **Interactive Modes** - Wizard, Chat, TUI, and Watch interfaces
|
|
10
|
+
- **Plugin System** - Extensible architecture with hot-loading
|
|
11
|
+
- **Batch Processing** - YAML-based automation and scripting
|
|
12
|
+
- **AI Integration** - Natural language development assistance
|
|
13
|
+
- **Cross-Platform** - Works on macOS, Linux, and Windows
|
|
14
|
+
- **Real-time Monitoring** - File watching and live updates
|
|
15
|
+
- **Web Dashboard** - Rich visualization and reporting
|
|
16
|
+
|
|
17
|
+
## 📦 Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g @wundr/cli
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Or use with npx:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx @wundr/cli --help
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## 🎯 Quick Start
|
|
30
|
+
|
|
31
|
+
### Initialize a new project
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
wundr init project my-app
|
|
35
|
+
wundr init config --interactive
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Launch interactive wizard
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
wundr wizard
|
|
42
|
+
# or
|
|
43
|
+
wundr w
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Analyze your code
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
wundr analyze deps --circular --unused
|
|
50
|
+
wundr analyze quality --complexity --duplication
|
|
51
|
+
wundr analyze all --report
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Generate code
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
wundr create component UserCard --type react --with-tests
|
|
58
|
+
wundr create service UserService --framework express --with-docs
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### AI-powered development
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
wundr ai chat
|
|
65
|
+
wundr ai review src/components/
|
|
66
|
+
wundr ai generate function --prompt "Sort array by date"
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Start dashboard
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
wundr dashboard start --open
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## 📋 Command Categories
|
|
76
|
+
|
|
77
|
+
### `wundr init`
|
|
78
|
+
|
|
79
|
+
- `init project [name]` - Initialize new project
|
|
80
|
+
- `init config` - Setup configuration
|
|
81
|
+
- `init workspace` - Create multi-project workspace
|
|
82
|
+
- `init plugins` - Setup plugin system
|
|
83
|
+
|
|
84
|
+
### `wundr create`
|
|
85
|
+
|
|
86
|
+
- `create component <name>` - Generate components
|
|
87
|
+
- `create service <name>` - Generate services
|
|
88
|
+
- `create package <name>` - Create monorepo packages
|
|
89
|
+
- `create template <name>` - Create code templates
|
|
90
|
+
- `create workflow <name>` - Generate CI/CD workflows
|
|
91
|
+
|
|
92
|
+
### `wundr analyze`
|
|
93
|
+
|
|
94
|
+
- `analyze deps` - Dependency analysis
|
|
95
|
+
- `analyze quality` - Code quality metrics
|
|
96
|
+
- `analyze perf` - Performance analysis
|
|
97
|
+
- `analyze arch` - Architecture review
|
|
98
|
+
- `analyze all` - Comprehensive analysis
|
|
99
|
+
|
|
100
|
+
### `wundr govern`
|
|
101
|
+
|
|
102
|
+
- `govern check` - Run compliance checks
|
|
103
|
+
- `govern rules` - Manage governance rules
|
|
104
|
+
- `govern policy` - Policy management
|
|
105
|
+
- `govern gate` - Quality gates
|
|
106
|
+
- `govern audit` - Governance auditing
|
|
107
|
+
|
|
108
|
+
### `wundr ai`
|
|
109
|
+
|
|
110
|
+
- `ai setup` - Setup AI configuration and API keys
|
|
111
|
+
- `ai status` - Check AI configuration status
|
|
112
|
+
- `ai validate` - Validate AI connection
|
|
113
|
+
- `ai generate <type>` - Code generation
|
|
114
|
+
- `ai review [files...]` - Code review
|
|
115
|
+
- `ai refactor <target>` - Code refactoring
|
|
116
|
+
- `ai docs <target>` - Documentation generation
|
|
117
|
+
- `ai chat` - Interactive AI chat
|
|
118
|
+
- `ai analyze <target>` - AI-powered analysis
|
|
119
|
+
- `ai test <target>` - Generate tests
|
|
120
|
+
- `ai optimize <target>` - Performance optimization
|
|
121
|
+
|
|
122
|
+
### `wundr dashboard`
|
|
123
|
+
|
|
124
|
+
- `dashboard start` - Launch web dashboard
|
|
125
|
+
- `dashboard stop` - Stop dashboard
|
|
126
|
+
- `dashboard config` - Configure dashboard
|
|
127
|
+
- `dashboard report <type>` - Generate reports
|
|
128
|
+
|
|
129
|
+
### `wundr watch`
|
|
130
|
+
|
|
131
|
+
- `watch start [patterns...]` - Start file watching
|
|
132
|
+
- `watch test` - Watch and run tests
|
|
133
|
+
- `watch build` - Watch and build
|
|
134
|
+
- `watch lint` - Watch and lint
|
|
135
|
+
|
|
136
|
+
### `wundr batch`
|
|
137
|
+
|
|
138
|
+
- `batch run <file>` - Execute batch job
|
|
139
|
+
- `batch create <name>` - Create batch job
|
|
140
|
+
- `batch validate <file>` - Validate batch YAML
|
|
141
|
+
- `batch schedule <file>` - Schedule execution
|
|
142
|
+
|
|
143
|
+
### `wundr chat`
|
|
144
|
+
|
|
145
|
+
- `chat start` - Start chat session
|
|
146
|
+
- `chat ask <message>` - Single question
|
|
147
|
+
- `chat file <file>` - Chat about file
|
|
148
|
+
- `chat resume <sessionId>` - Resume session
|
|
149
|
+
|
|
150
|
+
### `wundr plugin`
|
|
151
|
+
|
|
152
|
+
- `plugin list` - List plugins
|
|
153
|
+
- `plugin install <plugin>` - Install plugin
|
|
154
|
+
- `plugin create <name>` - Create plugin
|
|
155
|
+
- `plugin dev link <path>` - Link for development
|
|
156
|
+
|
|
157
|
+
## 🧙 Interactive Modes
|
|
158
|
+
|
|
159
|
+
### Wizard Mode
|
|
160
|
+
|
|
161
|
+
Step-by-step guided setup and configuration:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
wundr wizard # General wizard
|
|
165
|
+
wundr wizard setup # Project setup
|
|
166
|
+
wundr wizard analyze # Analysis configuration
|
|
167
|
+
wundr wizard create # Code generation
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Chat Mode
|
|
171
|
+
|
|
172
|
+
Natural language interface for development:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
wundr chat start
|
|
176
|
+
wundr chat ask "How do I optimize this React component?"
|
|
177
|
+
wundr chat file src/component.tsx --action review
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### TUI Mode
|
|
181
|
+
|
|
182
|
+
Terminal user interface with real-time updates:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
wundr tui # Dashboard layout
|
|
186
|
+
wundr tui --layout monitor # Monitoring layout
|
|
187
|
+
wundr tui --layout debug # Debug information
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Watch Mode
|
|
191
|
+
|
|
192
|
+
Real-time file monitoring and automation:
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
wundr watch start "src/**/*.ts" --command "npm run build"
|
|
196
|
+
wundr watch test # Auto-run tests on changes
|
|
197
|
+
wundr watch lint --fix # Auto-fix linting issues
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## 🔧 Configuration
|
|
201
|
+
|
|
202
|
+
### Global Configuration
|
|
203
|
+
|
|
204
|
+
Stored in `~/.wundr/config.json`:
|
|
205
|
+
|
|
206
|
+
```json
|
|
207
|
+
{
|
|
208
|
+
"defaultMode": "cli",
|
|
209
|
+
"ai": {
|
|
210
|
+
"provider": "claude",
|
|
211
|
+
"model": "claude-3"
|
|
212
|
+
},
|
|
213
|
+
"plugins": ["@wundr/plugin-git"],
|
|
214
|
+
"integrations": {
|
|
215
|
+
"github": {
|
|
216
|
+
"token": "your-token",
|
|
217
|
+
"owner": "your-org",
|
|
218
|
+
"repo": "your-repo"
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Project Configuration
|
|
225
|
+
|
|
226
|
+
Project-specific settings in `wundr.config.json`:
|
|
227
|
+
|
|
228
|
+
```json
|
|
229
|
+
{
|
|
230
|
+
"analysis": {
|
|
231
|
+
"patterns": ["**/*.ts", "**/*.tsx"],
|
|
232
|
+
"excludes": ["**/node_modules/**"],
|
|
233
|
+
"maxDepth": 10
|
|
234
|
+
},
|
|
235
|
+
"governance": {
|
|
236
|
+
"rules": ["no-console", "require-tests"],
|
|
237
|
+
"severity": "warning"
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
## 🔌 Plugin System
|
|
243
|
+
|
|
244
|
+
### Installing Plugins
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
wundr plugin install @wundr/plugin-docker
|
|
248
|
+
wundr plugin install my-custom-plugin
|
|
249
|
+
wundr plugin install git+https://github.com/user/plugin.git
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### Creating Plugins
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
wundr plugin create my-awesome-plugin --interactive
|
|
256
|
+
cd my-awesome-plugin
|
|
257
|
+
npm install
|
|
258
|
+
wundr plugin dev link .
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Plugin Structure
|
|
262
|
+
|
|
263
|
+
```typescript
|
|
264
|
+
import { Plugin, PluginContext } from '@wundr/cli';
|
|
265
|
+
|
|
266
|
+
export default class MyPlugin implements Plugin {
|
|
267
|
+
name = 'my-plugin';
|
|
268
|
+
version = '1.0.0';
|
|
269
|
+
description = 'My awesome plugin';
|
|
270
|
+
|
|
271
|
+
async activate(context: PluginContext): Promise<void> {
|
|
272
|
+
context.registerCommand({
|
|
273
|
+
name: 'my-command',
|
|
274
|
+
description: 'My custom command',
|
|
275
|
+
action: async (args, options, ctx) => {
|
|
276
|
+
ctx.logger.info('Plugin command executed!');
|
|
277
|
+
},
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
async deactivate(): Promise<void> {
|
|
282
|
+
// Cleanup
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
## 📊 Batch Processing
|
|
288
|
+
|
|
289
|
+
### YAML Batch Jobs
|
|
290
|
+
|
|
291
|
+
Create `build-pipeline.yaml`:
|
|
292
|
+
|
|
293
|
+
```yaml
|
|
294
|
+
name: build-and-test
|
|
295
|
+
description: Complete build and test pipeline
|
|
296
|
+
parallel: false
|
|
297
|
+
continueOnError: false
|
|
298
|
+
|
|
299
|
+
commands:
|
|
300
|
+
- command: 'npm install'
|
|
301
|
+
retry: 2
|
|
302
|
+
|
|
303
|
+
- command: 'npm run lint'
|
|
304
|
+
condition: 'typescript-files'
|
|
305
|
+
|
|
306
|
+
- command: 'npm run test'
|
|
307
|
+
timeout: 300000
|
|
308
|
+
|
|
309
|
+
- command: 'npm run build'
|
|
310
|
+
|
|
311
|
+
- command: 'npm run deploy'
|
|
312
|
+
condition: 'production'
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
Execute batch job:
|
|
316
|
+
|
|
317
|
+
```bash
|
|
318
|
+
wundr batch run build-pipeline.yaml
|
|
319
|
+
wundr batch run build-pipeline.yaml --dry-run
|
|
320
|
+
wundr batch run build-pipeline.yaml --vars '{"NODE_ENV": "production"}'
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
## 🤖 AI Integration
|
|
324
|
+
|
|
325
|
+
### Setup & Configuration
|
|
326
|
+
|
|
327
|
+
Wundr CLI integrates with AI providers for intelligent development assistance. Currently supports Claude (Anthropic) with OpenAI support coming soon.
|
|
328
|
+
|
|
329
|
+
#### Quick Setup
|
|
330
|
+
|
|
331
|
+
```bash
|
|
332
|
+
# Interactive setup (recommended)
|
|
333
|
+
wundr ai setup
|
|
334
|
+
|
|
335
|
+
# Manual setup
|
|
336
|
+
wundr ai setup --provider claude --api-key your-key-here
|
|
337
|
+
|
|
338
|
+
# Validate configuration
|
|
339
|
+
wundr ai validate
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
#### Environment Variables
|
|
343
|
+
|
|
344
|
+
Set your API key via environment variables:
|
|
345
|
+
|
|
346
|
+
```bash
|
|
347
|
+
# Claude (Anthropic)
|
|
348
|
+
export CLAUDE_API_KEY=your_api_key_here
|
|
349
|
+
|
|
350
|
+
# OpenAI (coming soon)
|
|
351
|
+
export OPENAI_API_KEY=your_api_key_here
|
|
352
|
+
|
|
353
|
+
# Optional: Provider and model selection
|
|
354
|
+
export WUNDR_AI_PROVIDER=claude
|
|
355
|
+
export WUNDR_AI_MODEL=claude-3-opus-20240229
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
#### Configuration File
|
|
359
|
+
|
|
360
|
+
Manually configure in `~/.wundr/config.json`:
|
|
361
|
+
|
|
362
|
+
```json
|
|
363
|
+
{
|
|
364
|
+
"ai": {
|
|
365
|
+
"provider": "claude",
|
|
366
|
+
"model": "claude-3-opus-20240229",
|
|
367
|
+
"apiKey": "your-api-key-here"
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
#### Getting API Keys
|
|
373
|
+
|
|
374
|
+
**Claude (Anthropic)**:
|
|
375
|
+
1. Visit [Anthropic Console](https://console.anthropic.com)
|
|
376
|
+
2. Create an account or sign in
|
|
377
|
+
3. Generate an API key in your dashboard
|
|
378
|
+
4. Copy the key and use in setup
|
|
379
|
+
|
|
380
|
+
### AI Commands
|
|
381
|
+
|
|
382
|
+
```bash
|
|
383
|
+
# Setup and status
|
|
384
|
+
wundr ai setup # Interactive setup wizard
|
|
385
|
+
wundr ai status # Check configuration status
|
|
386
|
+
wundr ai validate # Test API connection
|
|
387
|
+
|
|
388
|
+
# Code generation
|
|
389
|
+
wundr ai generate component --prompt "Create a user profile card"
|
|
390
|
+
wundr ai generate function --prompt "Sort array by date"
|
|
391
|
+
|
|
392
|
+
# Code review and analysis
|
|
393
|
+
wundr ai review src/ --focus security --suggest-fixes
|
|
394
|
+
wundr ai analyze src/component.tsx --suggestions
|
|
395
|
+
|
|
396
|
+
# Interactive assistance
|
|
397
|
+
wundr ai chat --context src/
|
|
398
|
+
wundr ai chat # Start interactive session
|
|
399
|
+
|
|
400
|
+
# Documentation and tests
|
|
401
|
+
wundr ai docs src/utils.ts --type api --include-examples
|
|
402
|
+
wundr ai test src/service.ts --framework jest --coverage unit
|
|
403
|
+
|
|
404
|
+
# Code optimization
|
|
405
|
+
wundr ai optimize src/component.tsx --focus performance
|
|
406
|
+
wundr ai refactor src/legacy.js --type modernize
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
### Error Handling
|
|
410
|
+
|
|
411
|
+
If AI features aren't working:
|
|
412
|
+
|
|
413
|
+
```bash
|
|
414
|
+
# Check status
|
|
415
|
+
wundr ai status
|
|
416
|
+
|
|
417
|
+
# Validate connection
|
|
418
|
+
wundr ai validate
|
|
419
|
+
|
|
420
|
+
# Re-run setup if needed
|
|
421
|
+
wundr ai setup --validate
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
Common issues:
|
|
425
|
+
- **API key not configured**: Run `wundr ai setup`
|
|
426
|
+
- **Invalid API key**: Check your key at the provider console
|
|
427
|
+
- **Network issues**: Verify internet connection
|
|
428
|
+
- **Rate limits**: Wait and try again, or check your usage
|
|
429
|
+
|
|
430
|
+
## 📊 Dashboard & Monitoring
|
|
431
|
+
|
|
432
|
+
### Web Dashboard
|
|
433
|
+
|
|
434
|
+
```bash
|
|
435
|
+
wundr dashboard start --port 3000 --open
|
|
436
|
+
wundr dashboard config set theme dark
|
|
437
|
+
wundr dashboard widget add metrics --position '{"x": 0, "y": 0}'
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
### Real-time Monitoring
|
|
441
|
+
|
|
442
|
+
```bash
|
|
443
|
+
wundr watch analyze --type quality --threshold 80
|
|
444
|
+
wundr watch start "src/**" --command "wundr analyze quality"
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
## 🌍 Cross-Platform Compatibility
|
|
448
|
+
|
|
449
|
+
The Wundr CLI works seamlessly across platforms:
|
|
450
|
+
|
|
451
|
+
- **macOS**: Full feature support
|
|
452
|
+
- **Linux**: Full feature support
|
|
453
|
+
- **Windows**: Full feature support with PowerShell/CMD
|
|
454
|
+
- **Docker**: Container-ready
|
|
455
|
+
|
|
456
|
+
### Windows-specific Notes
|
|
457
|
+
|
|
458
|
+
```powershell
|
|
459
|
+
# PowerShell
|
|
460
|
+
wundr init project my-app
|
|
461
|
+
wundr wizard
|
|
462
|
+
|
|
463
|
+
# Command Prompt
|
|
464
|
+
wundr.cmd analyze deps
|
|
465
|
+
wundr.cmd dashboard start
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
## 🔍 Troubleshooting
|
|
469
|
+
|
|
470
|
+
### Common Issues
|
|
471
|
+
|
|
472
|
+
1. **Command not found**
|
|
473
|
+
|
|
474
|
+
```bash
|
|
475
|
+
npm install -g @wundr/cli
|
|
476
|
+
# or
|
|
477
|
+
npx @wundr/cli --version
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
2. **Permission errors**
|
|
481
|
+
|
|
482
|
+
```bash
|
|
483
|
+
sudo npm install -g @wundr/cli # macOS/Linux
|
|
484
|
+
# or use npm prefix
|
|
485
|
+
npm config set prefix ~/.npm-global
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
3. **Plugin installation fails**
|
|
489
|
+
|
|
490
|
+
```bash
|
|
491
|
+
wundr plugin list
|
|
492
|
+
wundr plugin install <plugin> --force
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
4. **TypeScript compilation errors**
|
|
496
|
+
```bash
|
|
497
|
+
npm run build
|
|
498
|
+
wundr --version # Verify installation
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
### Debug Mode
|
|
502
|
+
|
|
503
|
+
```bash
|
|
504
|
+
wundr --verbose <command>
|
|
505
|
+
wundr tui --layout debug
|
|
506
|
+
DEBUG=wundr:* wundr <command>
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
## 🤝 Contributing
|
|
510
|
+
|
|
511
|
+
1. Fork the repository
|
|
512
|
+
2. Create a feature branch: `git checkout -b feature/amazing-feature`
|
|
513
|
+
3. Commit changes: `git commit -m 'Add amazing feature'`
|
|
514
|
+
4. Push to branch: `git push origin feature/amazing-feature`
|
|
515
|
+
5. Open a Pull Request
|
|
516
|
+
|
|
517
|
+
### Development Setup
|
|
518
|
+
|
|
519
|
+
```bash
|
|
520
|
+
git clone https://github.com/adapticai/wundr.git
|
|
521
|
+
cd wundr/packages/@wundr/cli
|
|
522
|
+
npm install
|
|
523
|
+
npm run build
|
|
524
|
+
npm link
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
## 📝 License
|
|
528
|
+
|
|
529
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
|
530
|
+
|
|
531
|
+
## 🙋 Support
|
|
532
|
+
|
|
533
|
+
- 📚 [Documentation](https://wundr.io/docs)
|
|
534
|
+
- 💬 [Discord Community](https://discord.gg/wundr)
|
|
535
|
+
- 🐛 [Issue Tracker](https://github.com/adapticai/wundr/issues)
|
|
536
|
+
- 📧 [Email Support](mailto:support@wundr.io)
|
|
537
|
+
|
|
538
|
+
## 🚀 What's Next?
|
|
539
|
+
|
|
540
|
+
- Enhanced AI model support
|
|
541
|
+
- Visual Studio Code extension
|
|
542
|
+
- GitHub Actions integration
|
|
543
|
+
- Team collaboration features
|
|
544
|
+
- Performance analytics
|
|
545
|
+
- Custom rule engine
|
|
546
|
+
|
|
547
|
+
---
|
|
548
|
+
|
|
549
|
+
**Made with ❤️ by the Wundr team**
|
|
550
|
+
|
|
551
|
+
_Transform your development workflow with intelligent automation and architectural excellence._
|
package/bin/wundr.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Wundr CLI Entry Point
|
|
5
|
+
*
|
|
6
|
+
* This is the main executable for the Wundr CLI tool.
|
|
7
|
+
* It handles cross-platform compatibility and bootstraps the CLI.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
const path = require('path');
|
|
11
|
+
const { existsSync } = require('fs');
|
|
12
|
+
|
|
13
|
+
// Check for development vs production environment
|
|
14
|
+
const isDevelopment = process.env.NODE_ENV === 'development';
|
|
15
|
+
const srcPath = path.join(__dirname, '..', 'src', 'index.ts');
|
|
16
|
+
const distPath = path.join(__dirname, '..', 'dist', 'index.js');
|
|
17
|
+
|
|
18
|
+
// In development, use ts-node if available and TypeScript files exist
|
|
19
|
+
if (isDevelopment && existsSync(srcPath)) {
|
|
20
|
+
try {
|
|
21
|
+
// Try to use ts-node for development
|
|
22
|
+
require('ts-node/register');
|
|
23
|
+
require(srcPath);
|
|
24
|
+
} catch (error) {
|
|
25
|
+
console.warn('ts-node not available, using compiled JavaScript');
|
|
26
|
+
if (existsSync(distPath)) {
|
|
27
|
+
require(distPath);
|
|
28
|
+
} else {
|
|
29
|
+
console.error('No compiled JavaScript found. Please run "npm run build" first.');
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
} else if (existsSync(distPath)) {
|
|
34
|
+
// Production: use compiled JavaScript
|
|
35
|
+
require(distPath);
|
|
36
|
+
} else {
|
|
37
|
+
console.error('Wundr CLI not properly installed. Please reinstall the package.');
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|