ultra-dex 1.8.0 → 2.2.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 +162 -143
- package/bin/ultra-dex.js +1005 -777
- package/lib/commands/agents.js +154 -0
- package/lib/commands/audit.js +135 -0
- package/lib/commands/banner.js +21 -0
- package/lib/commands/build.js +214 -0
- package/lib/commands/examples.js +34 -0
- package/lib/commands/fetch.js +186 -0
- package/lib/commands/generate.js +217 -0
- package/lib/commands/hooks.js +105 -0
- package/lib/commands/init.js +337 -0
- package/lib/commands/placeholders.js +11 -0
- package/lib/commands/review.js +287 -0
- package/lib/commands/serve.js +56 -0
- package/lib/commands/suggest.js +126 -0
- package/lib/commands/validate.js +140 -0
- package/lib/commands/workflows.js +185 -0
- package/lib/config/paths.js +9 -0
- package/lib/config/urls.js +16 -0
- package/lib/providers/base.js +82 -0
- package/lib/providers/claude.js +177 -0
- package/lib/providers/gemini.js +170 -0
- package/lib/providers/index.js +93 -0
- package/lib/providers/openai.js +163 -0
- package/lib/templates/context.js +26 -0
- package/lib/templates/embedded.js +141 -0
- package/lib/templates/prompts/generate-plan.js +147 -0
- package/lib/templates/prompts/review-code.js +57 -0
- package/lib/templates/prompts/section-prompts.js +275 -0
- package/lib/templates/prompts/system-prompt.md +58 -0
- package/lib/templates/quick-start.js +43 -0
- package/lib/utils/build-helpers.js +257 -0
- package/lib/utils/fallback.js +36 -0
- package/lib/utils/files.js +67 -0
- package/lib/utils/network.js +18 -0
- package/lib/utils/output.js +20 -0
- package/lib/utils/parser.js +155 -0
- package/lib/utils/prompt-builder.js +93 -0
- package/lib/utils/review-helpers.js +334 -0
- package/lib/utils/validation.js +34 -0
- package/package.json +17 -3
package/README.md
CHANGED
|
@@ -1,219 +1,238 @@
|
|
|
1
1
|
# Ultra-Dex CLI
|
|
2
2
|
|
|
3
|
-
> Scaffold Ultra-Dex projects from the command line
|
|
3
|
+
> Scaffold Ultra-Dex projects from the command line, now with **AI-powered plan generation**.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## What's New in v2.1
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
#
|
|
9
|
-
npx ultra-dex
|
|
8
|
+
# 🚀 Generate a complete 34-section plan with AI
|
|
9
|
+
npx ultra-dex generate "A task management SaaS for remote teams"
|
|
10
|
+
|
|
11
|
+
# 🔧 Start AI-assisted development
|
|
12
|
+
npx ultra-dex build --agent planner
|
|
10
13
|
|
|
11
|
-
#
|
|
12
|
-
|
|
13
|
-
cat QUICK-START.md
|
|
14
|
+
# 🔍 Review code against plan
|
|
15
|
+
npx ultra-dex review
|
|
14
16
|
|
|
15
|
-
#
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
# Optional offline bundle:
|
|
19
|
-
# npx ultra-dex fetch --rules --docs --agents
|
|
17
|
+
# 📊 Quick alignment check
|
|
18
|
+
npx ultra-dex align
|
|
19
|
+
```
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
# Use @Backend, @Frontend, @Database agents
|
|
23
|
-
npx ultra-dex agents
|
|
21
|
+
## First 10 Minutes
|
|
24
22
|
|
|
25
|
-
|
|
23
|
+
```bash
|
|
24
|
+
# Option 1: AI-Generated Plan (Recommended)
|
|
25
|
+
export ANTHROPIC_API_KEY=your-key # or OPENAI_API_KEY or GOOGLE_AI_KEY
|
|
26
|
+
npx ultra-dex generate "Your SaaS idea here"
|
|
27
|
+
|
|
28
|
+
# Option 2: Manual Setup
|
|
29
|
+
npx ultra-dex init
|
|
26
30
|
```
|
|
27
31
|
|
|
28
32
|
## Installation
|
|
29
33
|
|
|
30
34
|
```bash
|
|
31
35
|
# Run directly with npx (no installation needed)
|
|
32
|
-
npx ultra-dex
|
|
36
|
+
npx ultra-dex generate "Your idea"
|
|
33
37
|
|
|
34
38
|
# Or install globally
|
|
35
39
|
npm install -g ultra-dex
|
|
36
|
-
ultra-dex
|
|
40
|
+
ultra-dex generate "Your idea"
|
|
37
41
|
```
|
|
38
42
|
|
|
39
|
-
##
|
|
43
|
+
## AI Commands (v2.0+)
|
|
40
44
|
|
|
41
|
-
###
|
|
45
|
+
### `generate` - AI Plan Generation
|
|
46
|
+
|
|
47
|
+
Generate a complete implementation plan using AI:
|
|
42
48
|
|
|
43
49
|
```bash
|
|
44
|
-
|
|
50
|
+
# Basic usage
|
|
51
|
+
npx ultra-dex generate "A booking platform for dog groomers"
|
|
52
|
+
|
|
53
|
+
# With options
|
|
54
|
+
npx ultra-dex generate "idea" --provider openai --output ./my-project
|
|
55
|
+
|
|
56
|
+
# Preview without calling AI
|
|
57
|
+
npx ultra-dex generate "idea" --dry-run
|
|
45
58
|
```
|
|
46
59
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
60
|
+
**Options:**
|
|
61
|
+
| Option | Description | Default |
|
|
62
|
+
|--------|-------------|---------|
|
|
63
|
+
| `-p, --provider` | AI provider (claude, openai, gemini) | claude |
|
|
64
|
+
| `-m, --model` | Specific model to use | provider default |
|
|
65
|
+
| `-o, --output` | Output directory | current |
|
|
66
|
+
| `-k, --key` | API key | env variable |
|
|
67
|
+
| `--dry-run` | Show structure only | false |
|
|
68
|
+
|
|
69
|
+
### `build` - AI-Assisted Development
|
|
54
70
|
|
|
55
|
-
|
|
71
|
+
Start development with AI agents:
|
|
56
72
|
|
|
57
73
|
```bash
|
|
58
|
-
|
|
74
|
+
# Interactive agent selection
|
|
75
|
+
npx ultra-dex build
|
|
76
|
+
|
|
77
|
+
# Specific agent
|
|
78
|
+
npx ultra-dex build --agent backend --task "Create user API endpoints"
|
|
79
|
+
|
|
80
|
+
# Copy to clipboard for external AI
|
|
81
|
+
npx ultra-dex build --agent planner --copy
|
|
59
82
|
```
|
|
60
83
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
84
|
+
**Available Agents:**
|
|
85
|
+
| Agent | Role |
|
|
86
|
+
|-------|------|
|
|
87
|
+
| `planner` | Break down features into atomic tasks |
|
|
88
|
+
| `cto` | Architecture decisions |
|
|
89
|
+
| `backend` | API endpoints and business logic |
|
|
90
|
+
| `frontend` | UI components and pages |
|
|
91
|
+
| `database` | Schema design and migrations |
|
|
92
|
+
| `auth` | Authentication and authorization |
|
|
93
|
+
| `security` | Security audit |
|
|
94
|
+
| `testing` | Write and run tests |
|
|
95
|
+
| `reviewer` | Code review |
|
|
96
|
+
| `devops` | Deployment and CI/CD |
|
|
65
97
|
|
|
66
|
-
###
|
|
98
|
+
### `review` - Code Review
|
|
99
|
+
|
|
100
|
+
Check code alignment with plan:
|
|
67
101
|
|
|
68
102
|
```bash
|
|
69
|
-
npx ultra-dex
|
|
103
|
+
npx ultra-dex review
|
|
104
|
+
npx ultra-dex review --dir ./src
|
|
70
105
|
```
|
|
71
106
|
|
|
72
|
-
|
|
73
|
-
- Required files (QUICK-START.md, CONTEXT.md, etc.)
|
|
74
|
-
- Key sections (idea, problem, MVP, tech stack)
|
|
75
|
-
- Implementation details (database, API, auth)
|
|
107
|
+
### `align` - Quick Score
|
|
76
108
|
|
|
77
|
-
|
|
109
|
+
Get alignment score instantly:
|
|
78
110
|
|
|
79
|
-
|
|
111
|
+
```bash
|
|
112
|
+
npx ultra-dex align
|
|
113
|
+
npx ultra-dex align --json # Machine-readable output
|
|
114
|
+
```
|
|
80
115
|
|
|
116
|
+
**Environment Variables:**
|
|
81
117
|
```bash
|
|
82
|
-
|
|
118
|
+
ANTHROPIC_API_KEY=sk-ant-... # Claude (recommended)
|
|
119
|
+
OPENAI_API_KEY=sk-... # OpenAI
|
|
120
|
+
GOOGLE_AI_KEY=... # Gemini
|
|
83
121
|
```
|
|
84
122
|
|
|
85
|
-
|
|
86
|
-
- CTO, Backend, Frontend, Database
|
|
87
|
-
- Auth, DevOps, Reviewer, Debugger, Planner
|
|
123
|
+
### `init`
|
|
88
124
|
|
|
89
|
-
|
|
125
|
+
Interactive project setup:
|
|
90
126
|
|
|
91
127
|
```bash
|
|
92
|
-
npx ultra-dex
|
|
128
|
+
npx ultra-dex init
|
|
93
129
|
```
|
|
94
130
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
### Set up git hooks
|
|
131
|
+
Generate a runnable scaffold:
|
|
98
132
|
|
|
99
133
|
```bash
|
|
100
|
-
npx ultra-dex
|
|
134
|
+
npx ultra-dex init --live --stack next15-prisma-clerk
|
|
101
135
|
```
|
|
102
136
|
|
|
103
|
-
|
|
104
|
-
- Validates project structure before each commit
|
|
105
|
-
- Blocks commits if required files are missing
|
|
106
|
-
- Can be bypassed with `git commit --no-verify`
|
|
137
|
+
Presets: `next15-prisma-clerk`, `remix-supabase`, `sveltekit-drizzle`.
|
|
107
138
|
|
|
108
|
-
|
|
139
|
+
### `audit`
|
|
109
140
|
|
|
110
|
-
|
|
141
|
+
Check project completeness:
|
|
111
142
|
|
|
112
143
|
```bash
|
|
113
|
-
npx ultra-dex
|
|
144
|
+
npx ultra-dex audit
|
|
114
145
|
```
|
|
115
146
|
|
|
116
|
-
|
|
117
|
-
- Cursor rules (12 .mdc files)
|
|
118
|
-
- Agent prompts (16 agents)
|
|
119
|
-
- Documentation and guides
|
|
147
|
+
### `agents`
|
|
120
148
|
|
|
121
|
-
|
|
122
|
-
- `--dir <path>` - Target directory (default: `.ultra-dex`)
|
|
123
|
-
- `--agents` - Fetch only agent prompts
|
|
124
|
-
- `--rules` - Fetch only cursor rules
|
|
125
|
-
- `--docs` - Fetch only documentation
|
|
149
|
+
List and use AI agent prompts:
|
|
126
150
|
|
|
127
|
-
After fetching, copy to your project:
|
|
128
151
|
```bash
|
|
129
|
-
|
|
130
|
-
|
|
152
|
+
npx ultra-dex agents # List all agents
|
|
153
|
+
npx ultra-dex agent backend # Show specific agent
|
|
154
|
+
npx ultra-dex pack backend # Package context + agent
|
|
131
155
|
```
|
|
132
156
|
|
|
133
|
-
###
|
|
157
|
+
### `fetch`
|
|
158
|
+
|
|
159
|
+
Download assets for offline use:
|
|
134
160
|
|
|
135
161
|
```bash
|
|
136
|
-
npx ultra-dex
|
|
162
|
+
npx ultra-dex fetch
|
|
163
|
+
npx ultra-dex fetch --agents --rules
|
|
137
164
|
```
|
|
138
165
|
|
|
139
|
-
|
|
140
|
-
- `GET /` health check
|
|
141
|
-
- `GET /context` returns CONTEXT.md, IMPLEMENTATION-PLAN.md, QUICK-START.md
|
|
166
|
+
### `sync`
|
|
142
167
|
|
|
143
|
-
|
|
168
|
+
Auto-update CONTEXT.md with a codebase snapshot:
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
npx ultra-dex sync
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Other Commands
|
|
144
175
|
|
|
145
176
|
| Command | Description |
|
|
146
177
|
|---------|-------------|
|
|
147
|
-
| `
|
|
148
|
-
| `
|
|
149
|
-
| `
|
|
150
|
-
| `
|
|
151
|
-
| `
|
|
152
|
-
| `
|
|
153
|
-
| `
|
|
154
|
-
| `
|
|
155
|
-
| `
|
|
156
|
-
| `
|
|
157
|
-
| `
|
|
158
|
-
| `
|
|
159
|
-
| `
|
|
160
|
-
| `
|
|
161
|
-
| `
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
| Option | Description |
|
|
168
|
-
|--------|-------------|
|
|
169
|
-
| `-n, --name <name>` | Project name (skips prompt) |
|
|
170
|
-
| `-d, --dir <directory>` | Output directory (default: current) |
|
|
171
|
-
|
|
172
|
-
### audit
|
|
173
|
-
|
|
174
|
-
| Option | Description |
|
|
175
|
-
|--------|-------------|
|
|
176
|
-
| `-d, --dir <directory>` | Directory to audit (default: current) |
|
|
177
|
-
|
|
178
|
-
## Example
|
|
178
|
+
| `init` | Initialize a new project |
|
|
179
|
+
| `init --preview` | Preview files without creating them |
|
|
180
|
+
| `init --live` | Generate a runnable scaffold |
|
|
181
|
+
| `audit` | Audit project for completeness |
|
|
182
|
+
| `examples` | List available examples |
|
|
183
|
+
| `agents` | List AI agents |
|
|
184
|
+
| `agent <name>` | Show specific agent prompt |
|
|
185
|
+
| `pack <agent>` | Package context + agent |
|
|
186
|
+
| `hooks` | Set up git pre-commit hooks |
|
|
187
|
+
| `fetch` | Download assets for offline |
|
|
188
|
+
| `serve` | Serve context over HTTP |
|
|
189
|
+
| `sync` | Auto-sync CONTEXT.md |
|
|
190
|
+
| `validate` | Validate project structure |
|
|
191
|
+
| `workflow <feature>` | Show workflow for a feature |
|
|
192
|
+
| `suggest` | Get AI agent suggestions |
|
|
193
|
+
| `--help` | Show help |
|
|
194
|
+
| `--version` | Show version |
|
|
195
|
+
|
|
196
|
+
## Example: AI Generation
|
|
179
197
|
|
|
180
198
|
```bash
|
|
181
|
-
$ npx ultra-dex
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
?
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
199
|
+
$ npx ultra-dex generate "A booking platform for dog groomers"
|
|
200
|
+
|
|
201
|
+
🚀 Ultra-Dex AI Plan Generator
|
|
202
|
+
|
|
203
|
+
✔ AI modules loaded
|
|
204
|
+
|
|
205
|
+
📝 Idea: "A booking platform for dog groomers"
|
|
206
|
+
|
|
207
|
+
✓ Using Claude (Anthropic) (claude-sonnet-4-20250514)
|
|
208
|
+
|
|
209
|
+
📊 Estimated Generation:
|
|
210
|
+
Input tokens: ~2,650
|
|
211
|
+
Output tokens: ~40,000
|
|
212
|
+
Estimated cost: ~$0.45
|
|
213
|
+
|
|
214
|
+
? Proceed with generation? Yes
|
|
215
|
+
|
|
216
|
+
⚡ Generating 34-section implementation plan...
|
|
217
|
+
|
|
218
|
+
✔ Generation complete!
|
|
219
|
+
|
|
220
|
+
✅ All 34 sections generated
|
|
221
|
+
Tokens used: 42,350 tokens (2,650 in / 39,700 out)
|
|
222
|
+
Actual cost: $0.52
|
|
223
|
+
|
|
224
|
+
📦 Project: GroomBook
|
|
225
|
+
|
|
226
|
+
✓ Created ./IMPLEMENTATION-PLAN.md
|
|
227
|
+
✓ Created ./QUICK-START.md
|
|
228
|
+
✓ Created ./CONTEXT.md
|
|
229
|
+
|
|
230
|
+
🎉 Generation complete!
|
|
212
231
|
|
|
213
232
|
Next steps:
|
|
214
|
-
1.
|
|
215
|
-
2.
|
|
216
|
-
3. Start building
|
|
233
|
+
1. Review IMPLEMENTATION-PLAN.md
|
|
234
|
+
2. Customize sections as needed
|
|
235
|
+
3. Start building with: npx ultra-dex init
|
|
217
236
|
```
|
|
218
237
|
|
|
219
238
|
## Links
|