superacli 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/.env.example +14 -0
- package/README.md +173 -0
- package/cli/adapters/http.js +72 -0
- package/cli/adapters/mcp.js +193 -0
- package/cli/adapters/openapi.js +160 -0
- package/cli/ask.js +208 -0
- package/cli/config.js +133 -0
- package/cli/executor.js +117 -0
- package/cli/help-json.js +46 -0
- package/cli/mcp-local.js +72 -0
- package/cli/plan-runtime.js +32 -0
- package/cli/planner.js +67 -0
- package/cli/skills.js +240 -0
- package/cli/supercli.js +704 -0
- package/docs/features/adapters.md +25 -0
- package/docs/features/agent-friendly.md +28 -0
- package/docs/features/ask.md +32 -0
- package/docs/features/config-sync.md +22 -0
- package/docs/features/execution-plans.md +25 -0
- package/docs/features/observability.md +22 -0
- package/docs/features/skills.md +25 -0
- package/docs/features/storage.md +25 -0
- package/docs/features/workflows.md +33 -0
- package/docs/initial/AGENTS_FRIENDLY_TOOLS.md +553 -0
- package/docs/initial/agent-friendly.md +447 -0
- package/docs/initial/architecture.md +436 -0
- package/docs/initial/built-in-mcp-server.md +64 -0
- package/docs/initial/command-plan.md +532 -0
- package/docs/initial/core-features-2.md +428 -0
- package/docs/initial/core-features.md +366 -0
- package/docs/initial/dag.md +20 -0
- package/docs/initial/description.txt +9 -0
- package/docs/initial/idea.txt +564 -0
- package/docs/initial/initial-spec-details.md +726 -0
- package/docs/initial/initial-spec.md +731 -0
- package/docs/initial/mcp-local-mode.md +53 -0
- package/docs/initial/mcp-sse-mode.md +54 -0
- package/docs/initial/skills-support.md +246 -0
- package/docs/initial/storage-adapter-example.md +155 -0
- package/docs/initial/supercli-vs-gwc.md +109 -0
- package/examples/mcp-sse/install-demo.js +86 -0
- package/examples/mcp-sse/server.js +81 -0
- package/examples/mcp-stdio/install-demo.js +78 -0
- package/examples/mcp-stdio/server.js +50 -0
- package/package.json +21 -0
- package/server/app.js +59 -0
- package/server/public/app.js +18 -0
- package/server/routes/ask.js +92 -0
- package/server/routes/commands.js +126 -0
- package/server/routes/config.js +58 -0
- package/server/routes/jobs.js +122 -0
- package/server/routes/mcp.js +79 -0
- package/server/routes/plans.js +134 -0
- package/server/routes/specs.js +79 -0
- package/server/services/configService.js +88 -0
- package/server/storage/adapter.js +32 -0
- package/server/storage/file.js +64 -0
- package/server/storage/mongo.js +55 -0
- package/server/views/command-edit.ejs +110 -0
- package/server/views/commands.ejs +49 -0
- package/server/views/jobs.ejs +72 -0
- package/server/views/layout.ejs +42 -0
- package/server/views/mcp.ejs +80 -0
- package/server/views/partials/foot.ejs +5 -0
- package/server/views/partials/head.ejs +27 -0
- package/server/views/specs.ejs +91 -0
- package/tests/test-cli.js +367 -0
- package/tests/test-mcp.js +189 -0
- package/tests/test-openapi.js +101 -0
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
These are **three features that would make SUPERCLI genuinely stand out** and likely gain traction if open-sourced. They all build on the **cloud-defined command graph** concept you already designed.
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# 1. Command Graph (Composable CLI)
|
|
6
|
+
|
|
7
|
+
Most CLIs execute **single commands**.
|
|
8
|
+
SUPERCLI can execute **graphs of commands** defined in config.
|
|
9
|
+
|
|
10
|
+
This turns the CLI into a **light orchestration engine**.
|
|
11
|
+
|
|
12
|
+
## Concept
|
|
13
|
+
|
|
14
|
+
Commands can call other commands.
|
|
15
|
+
|
|
16
|
+
Example command:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
infra deploy service
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Internally defined as:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
infra.build
|
|
26
|
+
infra.push
|
|
27
|
+
infra.deploy
|
|
28
|
+
infra.verify
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Mongo Model
|
|
34
|
+
|
|
35
|
+
Add:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
type: "command" | "workflow"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Example:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
{
|
|
45
|
+
namespace: "infra",
|
|
46
|
+
resource: "service",
|
|
47
|
+
action: "deploy",
|
|
48
|
+
|
|
49
|
+
type: "workflow",
|
|
50
|
+
|
|
51
|
+
steps: [
|
|
52
|
+
"infra service build",
|
|
53
|
+
"infra service push",
|
|
54
|
+
"infra service deploy",
|
|
55
|
+
"infra service verify"
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## CLI Execution
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
supercli infra service deploy
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Executor:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
for step in workflow.steps:
|
|
72
|
+
run(step)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Benefits
|
|
78
|
+
|
|
79
|
+
This makes the CLI capable of:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
deployments
|
|
83
|
+
infra automation
|
|
84
|
+
data pipelines
|
|
85
|
+
AI pipelines
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
without needing another orchestrator.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
# 2. Natural Language CLI (AI Command Router)
|
|
93
|
+
|
|
94
|
+
Add an optional **LLM router** that maps natural language to commands.
|
|
95
|
+
|
|
96
|
+
Example:
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
supercli ask "fetch user 42 and summarize activity"
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
The system resolves:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
referential users fetch --id 42
|
|
106
|
+
ai summarize --user 42
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Architecture
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
User input
|
|
115
|
+
|
|
|
116
|
+
LLM router
|
|
117
|
+
|
|
|
118
|
+
command graph
|
|
119
|
+
|
|
|
120
|
+
CLI executor
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Prompt Context
|
|
126
|
+
|
|
127
|
+
Provide the model with:
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
available commands
|
|
131
|
+
arguments
|
|
132
|
+
descriptions
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Example context:
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
referential users fetch --id
|
|
139
|
+
ai summarize --text
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Model Output
|
|
145
|
+
|
|
146
|
+
Structured:
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
[
|
|
150
|
+
{
|
|
151
|
+
command:"referential users fetch",
|
|
152
|
+
args:{id:42}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
command:"ai summarize",
|
|
156
|
+
args:{text:"$prev.output"}
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## CLI Execution
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
execute step 1
|
|
167
|
+
pipe result
|
|
168
|
+
execute step 2
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Why This Is Powerful
|
|
174
|
+
|
|
175
|
+
It turns the CLI into:
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
natural language operational interface
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Useful for:
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
SRE
|
|
185
|
+
platform teams
|
|
186
|
+
AI operators
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
# 3. Dynamic CLI Autocomplete
|
|
192
|
+
|
|
193
|
+
This is a **killer UX feature**.
|
|
194
|
+
|
|
195
|
+
Autocomplete comes from **cloud config**, not static definitions.
|
|
196
|
+
|
|
197
|
+
Example:
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
supercli <TAB>
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Shows:
|
|
204
|
+
|
|
205
|
+
```
|
|
206
|
+
referential
|
|
207
|
+
infra
|
|
208
|
+
ai
|
|
209
|
+
billing
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
```
|
|
215
|
+
supercli referential <TAB>
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Shows:
|
|
219
|
+
|
|
220
|
+
```
|
|
221
|
+
users
|
|
222
|
+
groups
|
|
223
|
+
devices
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
```
|
|
229
|
+
supercli referential users <TAB>
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Shows:
|
|
233
|
+
|
|
234
|
+
```
|
|
235
|
+
fetch
|
|
236
|
+
list
|
|
237
|
+
create
|
|
238
|
+
delete
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## Implementation
|
|
244
|
+
|
|
245
|
+
CLI exposes:
|
|
246
|
+
|
|
247
|
+
```
|
|
248
|
+
supercli completion
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Shell integration:
|
|
252
|
+
|
|
253
|
+
```
|
|
254
|
+
eval "$(supercli completion bash)"
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## Completion Script Logic
|
|
260
|
+
|
|
261
|
+
Autocomplete calls:
|
|
262
|
+
|
|
263
|
+
```
|
|
264
|
+
supercli __complete referential users
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
CLI returns:
|
|
268
|
+
|
|
269
|
+
```
|
|
270
|
+
fetch
|
|
271
|
+
list
|
|
272
|
+
create
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Using cached config.
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
# 4. Bonus Feature (Very GitHub-Friendly)
|
|
280
|
+
|
|
281
|
+
## OpenAPI → CLI Auto Generation
|
|
282
|
+
|
|
283
|
+
Add a button in the UI:
|
|
284
|
+
|
|
285
|
+
```
|
|
286
|
+
Import OpenAPI
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
The system:
|
|
290
|
+
|
|
291
|
+
1 downloads spec
|
|
292
|
+
2 scans operations
|
|
293
|
+
3 generates commands automatically
|
|
294
|
+
|
|
295
|
+
Example mapping:
|
|
296
|
+
|
|
297
|
+
```
|
|
298
|
+
GET /users -> referential users list
|
|
299
|
+
GET /users/{id} -> referential users fetch
|
|
300
|
+
POST /users -> referential users create
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
This instantly produces a **full CLI for any API**.
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
# 5. Hidden Strategic Value
|
|
308
|
+
|
|
309
|
+
The project becomes a **control plane for developer operations**.
|
|
310
|
+
|
|
311
|
+
It unifies:
|
|
312
|
+
|
|
313
|
+
```
|
|
314
|
+
API CLI
|
|
315
|
+
AI tools
|
|
316
|
+
infra commands
|
|
317
|
+
workflows
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
Into one system.
|
|
321
|
+
|
|
322
|
+
This makes SUPERCLI essentially a:
|
|
323
|
+
|
|
324
|
+
```
|
|
325
|
+
Universal DevOps + AI CLI runtime
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
# 6. If Open-Sourced
|
|
331
|
+
|
|
332
|
+
These 3 features would likely attract users:
|
|
333
|
+
|
|
334
|
+
1️⃣ **Cloud-defined CLI**
|
|
335
|
+
2️⃣ **Command workflows**
|
|
336
|
+
3️⃣ **Natural language CLI**
|
|
337
|
+
|
|
338
|
+
This combination is currently **rare in developer tooling**.
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
# 7. What Would Make It Go Viral
|
|
343
|
+
|
|
344
|
+
One simple demo:
|
|
345
|
+
|
|
346
|
+
```
|
|
347
|
+
supercli import-openapi stripe.json
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
Then immediately:
|
|
351
|
+
|
|
352
|
+
```
|
|
353
|
+
supercli stripe customers list
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
Or:
|
|
357
|
+
|
|
358
|
+
```
|
|
359
|
+
supercli ask "create a stripe customer"
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
That would instantly demonstrate the power.
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
If you want, I can also show you a **much more radical idea** that would make SUPERCLI a **new category of tool (not just a CLI)** — something closer to a **"Kubernetes for commands"**.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
SUPERCLI (Dynamic CLI) is a config-driven, AI-friendly CLI that dynamically generates commands from cloud configuration and service specifications (OpenAPI, MCP, custom integrations). It is designed for both humans and agents, providing discoverable, introspectable, plannable, and executable commands in a single invocation.
|
|
2
|
+
|
|
3
|
+
Discoverable — Commands and namespaces can be listed automatically. Agents can query what capabilities exist without prior knowledge.
|
|
4
|
+
|
|
5
|
+
Introspectable — Every command exposes its inputs, outputs, adapters, and side-effects, allowing agents to understand usage and risk before execution.
|
|
6
|
+
|
|
7
|
+
Plannable — Execution steps (validation, API calls, transformations, dependencies) are internally computed as a DAG (Directed Acyclic Graph) to ensure correct order and safe handling of dependencies.
|
|
8
|
+
|
|
9
|
+
Executable — Commands run in one shot; the agent receives deterministic, structured output directly, without requiring a separate execute step.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
SUPERCLI (Dynamic CLI) is a config-driven, AI-friendly CLI that dynamically generates commands from cloud configuration and service specifications (OpenAPI, MCP, custom integrations). It is designed for both humans and agents, providing discoverable, introspectable, plannable, and executable commands in a single invocation.
|
|
13
|
+
|
|
14
|
+
Discoverable — Commands and namespaces can be listed automatically. Agents can query what capabilities exist without prior knowledge.
|
|
15
|
+
|
|
16
|
+
Introspectable — Every command exposes its inputs, outputs, adapters, and side-effects, allowing agents to understand usage and risk before execution.
|
|
17
|
+
|
|
18
|
+
Plannable — Execution steps (validation, API calls, transformations, dependencies) are internally computed as a DAG (Directed Acyclic Graph) to ensure correct order and safe handling of dependencies.
|
|
19
|
+
|
|
20
|
+
Executable — Commands run in one shot; the agent receives deterministic, structured output directly, without requiring a separate execute step.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
SUPERCLI (Dynamic CLI) is a config-driven, AI-friendly CLI that dynamically generates commands from cloud configuration and service specifications (OpenAPI, MCP, custom integrations). It is designed for both humans and agents, providing discoverable, introspectable, plannable, and executable commands in a single invocation.
|
|
2
|
+
|
|
3
|
+
Discoverable — Commands and namespaces can be listed automatically. Agents can query what capabilities exist without prior knowledge.
|
|
4
|
+
|
|
5
|
+
Introspectable — Every command exposes its inputs, outputs, adapters, and side-effects, allowing agents to understand usage and risk before execution.
|
|
6
|
+
|
|
7
|
+
Plannable — Execution steps (validation, API calls, transformations, dependencies) are internally computed as a DAG (Directed Acyclic Graph) to ensure correct order and safe handling of dependencies.
|
|
8
|
+
|
|
9
|
+
Executable — Commands run in one shot; the agent receives deterministic, structured output directly, without requiring a separate execute step.
|