superacli 1.1.20 → 1.1.21

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.
Files changed (125) hide show
  1. package/cli/adapter-schema.js +1 -6
  2. package/cli/config.js +95 -0
  3. package/cli/executor.js +90 -11
  4. package/cli/server-command.js +395 -0
  5. package/cli/supercli.js +82 -1
  6. package/docs/adapters.md +159 -0
  7. package/docs/changelog-2026-04.html +15 -0
  8. package/docs/index.html +314 -98
  9. package/docs/meta-plugins.json +24424 -1247
  10. package/docs/plugins-examples.md +8 -8
  11. package/docs/plugins-how-to.md +0 -13
  12. package/docs/plugins.html +165 -61
  13. package/docs/server.md +50 -0
  14. package/graphify-out/GRAPH_REPORT.md +141 -136
  15. package/graphify-out/cache/1821936911d6eb3130499b6b45b8e6d760d6c05328131e115ac9825a5e3061cd.json +1 -0
  16. package/graphify-out/cache/20b0e1261b41286d639e7b039c8143682001981f607e26eb2a492a06f12c233a.json +1 -0
  17. package/graphify-out/cache/21dc011c08a0813ac33c0520c9cf131d8922e6007df7d9b51df740974fee5fb3.json +1 -0
  18. package/graphify-out/cache/22d3d43c24fdff310ab8445bd442fbcf4714872c6950f15b90777e5a8358dcd9.json +1 -0
  19. package/graphify-out/cache/2b8a3fbc23afe7bbc1a5ecb60d4074f39afdf6cb42120922176c280f4cc4ab4b.json +1 -0
  20. package/graphify-out/cache/37418b8b152d9c436d75361969c39bc74a76260ab7209ceabf455f80452f1654.json +1 -0
  21. package/graphify-out/cache/3b9aae57e4326f5862f8153c13b7d809a34c422996993e7b491c5ea3a66b5e04.json +1 -0
  22. package/graphify-out/cache/448f8e0c5e77cfb15fa625ed40ee0dc1622d9814d24905fe4c12c4d175131dc9.json +1 -0
  23. package/graphify-out/cache/47dd42009ceac28b7a7fec5586e565e7bc850c80be96b8329e1ed7c49efbe34f.json +1 -0
  24. package/graphify-out/cache/492712949d38efbe312c303fe717e5c93e1ecc8888e1ceb855750afc48caffdb.json +1 -0
  25. package/graphify-out/cache/494fd6af80b6a1bb7a2a5641c6ad11e2fbe2a67b5a2b3ff57fd04bb49ccad1c4.json +1 -0
  26. package/graphify-out/cache/4b31b0de656deff083119780df64d17205c45e72233987e1c495f2121c4923fd.json +1 -0
  27. package/graphify-out/cache/5a16fa8cdd687a39661321adb39186ce8cf924a79ef936e42b365380b5e3543e.json +1 -0
  28. package/graphify-out/cache/644fcb129e595cfdb4e3a9757ed9658230347f5ed0652be45a894528a2b6585b.json +1 -0
  29. package/graphify-out/cache/6b8762db2c5f51408cf49d915f3e44bcc25c7ebb32abc635307fdf2a672b370c.json +1 -0
  30. package/graphify-out/cache/6db88050060880e56dd26ec58f29e3b56a409ace48e31bc75f54cab7dc74e409.json +1 -0
  31. package/graphify-out/cache/7932d1b6a9751b2cb2f4dc6b4e5f9fd7dcc2cee82d7866ec3d655482010533c0.json +1 -0
  32. package/graphify-out/cache/8140a76ff5b70dfdd0d020aeffff27f87af39da5b237c35baa938fcc4b288ba5.json +1 -0
  33. package/graphify-out/cache/8876638878758733a412bd4ca4cbd22863322689fbba9f037d92abfa877ea3ab.json +1 -0
  34. package/graphify-out/cache/90445359c448f8135207ddcd378c8391b9274460064cf998f1ea2ad6f2173703.json +1 -0
  35. package/graphify-out/cache/b01f675bb3942d2e8f359d11c38d52f28487544f54cdef518c60b7d8dfd2b383.json +1 -0
  36. package/graphify-out/cache/bc353b40b348d54c730d8498af675f57998b14ae796b4f952cdc200147008f13.json +1 -0
  37. package/graphify-out/cache/c38b2e784b1c441121b422db0c79b4911fb525d2a3cfad10d3fd561a07900bd5.json +1 -0
  38. package/graphify-out/cache/ce9df9bb2d36ecf310a53fb34526168bdf25773edf0826c1f55accebfa3c012d.json +1 -0
  39. package/graphify-out/cache/ceaeb0f99851d313b29cb1440240db1cf835de425b9b0c1e58fa3035355c2b2b.json +1 -0
  40. package/graphify-out/cache/d8f3e78931a41cd0f367fdab1d11b634bbffb2c90280c75a80a1a53a6b2d6bc7.json +1 -0
  41. package/graphify-out/cache/f574e4ce3bcb1250ca88410519fb4fd26c5b6cd786039410880fbd6e606ab23f.json +1 -0
  42. package/graphify-out/cache/faa65636d5f779b8b1c790dde11cc6470b48125bf42a12a77651827fd1653fd7.json +1 -0
  43. package/graphify-out/graph.json +4173 -2115
  44. package/ideal-plugins.csv +124 -0
  45. package/package.json +3 -2
  46. package/plugin-scores.csv +999 -0
  47. package/plugins/beads/plugin.json +2 -2
  48. package/plugins/biome/install-guidance.json +11 -0
  49. package/plugins/biome/meta.json +13 -0
  50. package/plugins/biome/plugin.json +83 -0
  51. package/plugins/biome/skills/quickstart/SKILL.md +25 -0
  52. package/plugins/bore/install-guidance.json +11 -0
  53. package/plugins/bore/meta.json +11 -0
  54. package/plugins/bore/plugin.json +65 -0
  55. package/plugins/bore/skills/quickstart/SKILL.md +25 -0
  56. package/plugins/ccf-deadlines/install-guidance.json +11 -0
  57. package/plugins/ccf-deadlines/meta.json +11 -0
  58. package/plugins/ccf-deadlines/plugin.json +28 -0
  59. package/plugins/ccf-deadlines/skills/quickstart/SKILL.md +25 -0
  60. package/plugins/code2prompt/install-guidance.json +11 -0
  61. package/plugins/code2prompt/meta.json +12 -0
  62. package/plugins/code2prompt/plugin.json +46 -0
  63. package/plugins/code2prompt/skills/quickstart/SKILL.md +25 -0
  64. package/plugins/commiat/install-guidance.json +10 -0
  65. package/plugins/commiat/plugin.json +2 -2
  66. package/plugins/dua-cli/install-guidance.json +11 -0
  67. package/plugins/dua-cli/meta.json +11 -0
  68. package/plugins/dua-cli/plugin.json +57 -0
  69. package/plugins/dua-cli/skills/quickstart/SKILL.md +25 -0
  70. package/plugins/forever/install-guidance.json +11 -0
  71. package/plugins/forever/meta.json +11 -0
  72. package/plugins/forever/plugin.json +75 -0
  73. package/plugins/forever/skills/quickstart/SKILL.md +25 -0
  74. package/plugins/gitmoji-cli/install-guidance.json +11 -0
  75. package/plugins/gitmoji-cli/meta.json +11 -0
  76. package/plugins/gitmoji-cli/plugin.json +49 -0
  77. package/plugins/gitmoji-cli/skills/quickstart/SKILL.md +25 -0
  78. package/plugins/google-maps-scraper/plugin.json +1 -1
  79. package/plugins/gwc/install-guidance.json +10 -0
  80. package/plugins/gwc/plugin.json +2 -2
  81. package/plugins/quarto/install-guidance.json +11 -0
  82. package/plugins/quarto/meta.json +11 -0
  83. package/plugins/quarto/plugin.json +61 -0
  84. package/plugins/quarto/skills/quickstart/SKILL.md +25 -0
  85. package/plugins/readme-md-generator/install-guidance.json +11 -0
  86. package/plugins/readme-md-generator/meta.json +11 -0
  87. package/plugins/readme-md-generator/plugin.json +28 -0
  88. package/plugins/readme-md-generator/skills/quickstart/SKILL.md +25 -0
  89. package/plugins/twarc/install-guidance.json +11 -0
  90. package/plugins/twarc/meta.json +13 -0
  91. package/plugins/twarc/plugin.json +165 -0
  92. package/plugins/twarc/skills/quickstart/SKILL.md +61 -0
  93. package/plugins/vale/install-guidance.json +11 -0
  94. package/plugins/vale/meta.json +12 -0
  95. package/plugins/vale/plugin.json +50 -0
  96. package/plugins/vale/skills/quickstart/SKILL.md +25 -0
  97. package/plugins/volta/install-guidance.json +11 -0
  98. package/plugins/volta/meta.json +12 -0
  99. package/plugins/volta/plugin.json +75 -0
  100. package/plugins/volta/skills/quickstart/SKILL.md +25 -0
  101. package/plugins/wgcf/install-guidance.json +11 -0
  102. package/plugins/wgcf/meta.json +12 -0
  103. package/plugins/wgcf/plugin.json +45 -0
  104. package/plugins/wgcf/skills/quickstart/SKILL.md +25 -0
  105. package/scripts/analyze-plugins.js +130 -0
  106. package/scripts/enrich-meta-plugins.js +67 -0
  107. package/server/app.js +23 -1
  108. package/server/routes/adapters.js +356 -0
  109. package/server/routes/dashboard.js +113 -0
  110. package/server/routes/jobs.js +26 -0
  111. package/server/services/adaptersService.js +284 -0
  112. package/server/services/pluginsService.js +4 -0
  113. package/server/views/adapter-edit.ejs +226 -0
  114. package/server/views/adapter-packages.ejs +191 -0
  115. package/server/views/adapters.ejs +112 -0
  116. package/server/views/command-edit.ejs +48 -21
  117. package/server/views/commands.ejs +25 -22
  118. package/server/views/dashboard.ejs +196 -0
  119. package/server/views/layout.ejs +94 -14
  120. package/server/views/mcp.ejs +38 -35
  121. package/server/views/partials/head.ejs +88 -12
  122. package/server/views/plugins.ejs +9 -0
  123. package/server/views/specs.ejs +33 -30
  124. package/cli/adapters/builtin.js +0 -43
  125. package/index.html +0 -384
package/cli/supercli.js CHANGED
@@ -14,6 +14,7 @@ const { execute } = require("./executor");
14
14
  const { buildCapabilities } = require("./help-json");
15
15
  const { handleMcpRegistryCommand } = require("./mcp-local");
16
16
  const { handlePluginsCommand } = require("./plugins-command");
17
+ const { handleServerCommand } = require("./server-command");
17
18
  const { handleHarnessOnboard, handleHarnessOffboard } = require("./harness-onboard");
18
19
  const {
19
20
  buildLocalPlan,
@@ -235,6 +236,7 @@ function renderTopLevelHelp(config) {
235
236
  console.log(' AI: supercli ask "<your natural language query>" # LLM-powered suggestions (no execution)');
236
237
  }
237
238
  console.log(" Server: supercli --server");
239
+ console.log(" Server CLI: supercli server status | supercli server plugins <list|add|remove> | supercli server mcp <list|add|remove> | supercli server commands <list|add|remove> | supercli server jobs <list|prune>");
238
240
  console.log(
239
241
  " Flags: --help | --json | --human | --compact | --schema | --help-json | --server\n",
240
242
  );
@@ -367,7 +369,15 @@ async function main() {
367
369
  }
368
370
 
369
371
  if (flags.help) {
370
- displayComprehensiveHelp();
372
+ if (flags.human) {
373
+ displayComprehensiveHelp();
374
+ } else if (flags.json || flags.compact) {
375
+ output(displayJsonHelp());
376
+ } else if (humanMode) {
377
+ displayComprehensiveHelp();
378
+ } else {
379
+ output(displayJsonHelp());
380
+ }
371
381
  return;
372
382
  }
373
383
 
@@ -469,6 +479,7 @@ async function main() {
469
479
  ok: true,
470
480
  message: "Config synced",
471
481
  server_plugins: result.server_plugins || null,
482
+ cli_adapters: result.cli_adapters || null,
472
483
  });
473
484
  return;
474
485
  }
@@ -504,6 +515,18 @@ async function main() {
504
515
  return;
505
516
  }
506
517
 
518
+ if (positional[0] === "server") {
519
+ await handleServerCommand({
520
+ positional,
521
+ flags,
522
+ humanMode,
523
+ output,
524
+ outputHumanTable,
525
+ outputError,
526
+ });
527
+ return;
528
+ }
529
+
507
530
  if (positional[0] === "onboard") {
508
531
  await handleHarnessOnboard({
509
532
  positional,
@@ -985,6 +1008,64 @@ async function main() {
985
1008
  }
986
1009
  }
987
1010
 
1011
+ function displayJsonHelp() {
1012
+ return {
1013
+ name: "SuperCLI",
1014
+ description: "Universal Capability Router for AI Agents",
1015
+ repository: "https://github.com/javimosch/supercli",
1016
+ quick_overview: [
1017
+ "Capabilities: namespace.resource.action commands",
1018
+ "Plugin System: Install external CLIs as harnesses",
1019
+ "MCP Support: Model Context Protocol server integration",
1020
+ "Skill Docs: Agent-facing guidance in SKILL.md format",
1021
+ "AI Integration: Natural language query execution"
1022
+ ],
1023
+ getting_started: [
1024
+ "supercli help # List available harnesses",
1025
+ "supercli skills teach # Learn about skill documents",
1026
+ "supercli plugins explore # Browse available plugins",
1027
+ 'supercli discover --intent "<task>" # Find capabilities for a task'
1028
+ ],
1029
+ core_commands: [
1030
+ "supercli <namespace> <resource> <action> # Execute capability",
1031
+ "supercli inspect <ns> <res> <act> # View command details",
1032
+ "supercli plan <ns> <res> <act> # Create execution plan",
1033
+ "supercli execute <plan_id> # Run stored plan",
1034
+ 'supercli ask "<query>" # LLM-powered suggestions (no execution)'
1035
+ ],
1036
+ plugin_management: [
1037
+ "supercli plugins list # Show installed plugins",
1038
+ "supercli plugins install <name> # Install a plugin",
1039
+ "supercli plugins explore # Browse plugin registry"
1040
+ ],
1041
+ harness_onboarding: [
1042
+ "supercli onboard # Auto-detect and install skill",
1043
+ "supercli onboard --detect # List detected harnesses",
1044
+ "supercli onboard --harness claude,cursor,opencode,windsurf",
1045
+ "supercli offboard # Remove installed skill"
1046
+ ],
1047
+ documentation: [
1048
+ "Full README: https://github.com/javimosch/supercli#readme",
1049
+ "Supported Harnesses: docs/supported-harnesses.md",
1050
+ "Plugin Creation Guide: docs/plugin-harness-guide.md"
1051
+ ],
1052
+ output_modes: [
1053
+ "(default) JSON if piped, human-readable if TTY",
1054
+ "--json Structured JSON envelope",
1055
+ "--human Formatted tables and key-value output",
1056
+ "--compact Compressed JSON (shortened keys)"
1057
+ ],
1058
+ exit_codes: [
1059
+ { code: 0, description: "success" },
1060
+ { code: 82, description: "validation_error" },
1061
+ { code: 85, description: "invalid_argument" },
1062
+ { code: 92, description: "resource_not_found" },
1063
+ { code: 105, description: "integration_error" },
1064
+ { code: 110, description: "internal_error" }
1065
+ ]
1066
+ };
1067
+ }
1068
+
988
1069
  function displayComprehensiveHelp() {
989
1070
  console.log("\n ⚡ SuperCLI - Universal Capability Router for AI Agents\n");
990
1071
  console.log(" Repository: https://github.com/javimosch/supercli\n");
@@ -0,0 +1,159 @@
1
+ # Custom Adapters
2
+
3
+ Custom adapters are JavaScript modules that extend supercli's execution capabilities. They can be created and managed entirely through the server UI, with integrated code editing, package management, and sandboxed execution.
4
+
5
+ ## Overview
6
+
7
+ Custom adapters allow you to define custom execution logic for commands. Unlike built-in adapters (http, openapi, mcp, shell, process), custom adapters are user-defined JavaScript functions that can:
8
+
9
+ - Execute arbitrary JavaScript code in a sandboxed environment
10
+ - Install and use NPM packages
11
+ - Run in either server context (on the server) or CLI context (synced to local CLI)
12
+ - Configure timeout, memory limits, and network access
13
+ - Be tested directly from the UI
14
+
15
+ ## Execution Contexts
16
+
17
+ Custom adapters support two execution contexts:
18
+
19
+ ### Server Context
20
+ - Adapter code runs on the supercli server
21
+ - Executes via vm2 sandbox
22
+ - When CLI delegates to server, the adapter runs server-side
23
+ - Ideal for adapters that need server resources or centralized execution
24
+
25
+ ### CLI Context
26
+ - Adapter code syncs to local CLI via `sc sync`
27
+ - Executes locally on the CLI machine using vm2 sandbox
28
+ - Stored in `.supercli/adapters/` directory
29
+ - Ideal for adapters that need local machine access (e.g., local databases, filesystem)
30
+
31
+ ## Creating an Adapter
32
+
33
+ 1. Navigate to `/adapters` in the server UI
34
+ 2. Click "+ New Adapter"
35
+ 3. Fill in the adapter details:
36
+ - **Name**: Unique identifier (used as adapter name in commands)
37
+ - **Description**: Human-readable description
38
+ - **Execution Context**: "server" or "cli"
39
+ - **Timeout**: Maximum execution time in milliseconds (default: 30000)
40
+ - **Memory Limit**: Maximum memory in MB (default: 128)
41
+ - **Network Access**: Allow NPM packages to make network requests (default: false)
42
+ 4. Write your adapter code in the CodeMirror editor
43
+ 5. Click "Save Adapter"
44
+
45
+ ## Adapter Code Structure
46
+
47
+ Custom adapters must export an `execute` function:
48
+
49
+ ```javascript
50
+ /**
51
+ * @name my-adapter
52
+ * @description My custom adapter
53
+ * @context server
54
+ */
55
+
56
+ async function execute(cmd, flags, context) {
57
+ // cmd: Command object with namespace, resource, action, adapter, adapterConfig
58
+ // flags: Command arguments/flags passed at runtime
59
+ // context: Execution context (config, server, etc.)
60
+
61
+ // Your custom logic here
62
+ const result = {
63
+ success: true,
64
+ data: { /* your output */ }
65
+ }
66
+
67
+ return result
68
+ }
69
+
70
+ module.exports = { execute }
71
+ ```
72
+
73
+ ## Using Custom Adapters
74
+
75
+ Once created, custom adapters appear in the adapter dropdown when creating/editing commands:
76
+
77
+ 1. Navigate to `/commands` in the server UI
78
+ 2. Create or edit a command
79
+ 3. Select your custom adapter from the "Custom" section of the adapter dropdown
80
+ 4. Configure adapterConfig as needed by your adapter
81
+ 5. Save the command
82
+
83
+ The command will now use your custom adapter for execution.
84
+
85
+ ## Package Management
86
+
87
+ Custom adapters can depend on NPM packages:
88
+
89
+ 1. Navigate to `/adapters/{name}/packages` for your adapter
90
+ 2. Add packages by name (e.g., `axios`, `lodash`)
91
+ 3. Click "Add Package" to install
92
+ 4. Packages are installed in a node_modules directory for that adapter
93
+ 5. Use packages in your adapter code via standard `require()`
94
+
95
+ ```javascript
96
+ const axios = require('axios')
97
+
98
+ async function execute(cmd, flags, context) {
99
+ const response = await axios.get('https://api.example.com/data')
100
+ return { data: response.data }
101
+ }
102
+
103
+ module.exports = { execute }
104
+ ```
105
+
106
+ ### Package Operations
107
+
108
+ - **Add**: Install a new NPM package
109
+ - **Remove**: Uninstall a package
110
+ - **Prune**: Remove unused dependencies
111
+
112
+ ## Testing Adapters
113
+
114
+ Server-context adapters can be tested directly from the UI:
115
+
116
+ 1. Navigate to `/adapters`
117
+ 2. Click "Test" on your adapter
118
+ 3. Provide test flags (JSON object)
119
+ 4. Click "Run Test"
120
+ 5. View execution result, duration, and any errors
121
+
122
+ ## CLI Sync
123
+
124
+ CLI-context adapters are synced to the local CLI via `sc sync`:
125
+
126
+ ```bash
127
+ export SUPERCLI_SERVER=http://localhost:3000
128
+ sc sync
129
+ ```
130
+
131
+ During sync:
132
+ - CLI-context adapters are fetched from the server
133
+ - Adapter source code is written to `.supercli/adapters/{name}.js`
134
+ - Metadata header is added to the file (timeout, memory, network settings)
135
+ - Sync result shows total, synced, and failed counts
136
+
137
+ ## Security
138
+
139
+ Custom adapters run in a vm2 sandbox with:
140
+
141
+ - **Timeout**: Prevents infinite loops (configurable per adapter)
142
+ - **Memory limits**: Prevents memory exhaustion (configurable per adapter)
143
+ - **Network control**: Optional network access for NPM packages
144
+ - **Console sandboxing**: Console output is suppressed in sandbox
145
+
146
+ ## API Endpoints
147
+
148
+ The server exposes the following API endpoints for custom adapters:
149
+
150
+ - `GET /api/adapters` - List all adapters
151
+ - `POST /api/adapters` - Create new adapter
152
+ - `GET /api/adapters/:name` - Get adapter metadata
153
+ - `GET /api/adapters/:name/source` - Get adapter source code
154
+ - `PUT /api/adapters/:name` - Update adapter
155
+ - `DELETE /api/adapters/:name` - Delete adapter
156
+ - `POST /api/adapters/:name/test` - Test adapter execution
157
+ - `POST /api/adapters/:name/packages` - Add package
158
+ - `DELETE /api/adapters/:name/packages/:package` - Remove package
159
+ - `POST /api/adapters/execute` - Execute adapter (for CLI delegation)
@@ -155,6 +155,9 @@
155
155
  <li>Add googlews plugin for Google Workspace CLI</li>
156
156
  <li>Add domain-check plugin for domain availability</li>
157
157
  <li>Add ghgrab plugin for GitHub file download</li>
158
+ <li>Add server dashboard with command overview and job monitoring</li>
159
+ <li>Add adapter management UI with package installation and configuration</li>
160
+ <li>Add 12 new plugins: biome, bore, ccf-deadlines, code2prompt, dua-cli, forever, gitmoji-cli, quarto, readme-md-generator, vale, volta, wgcf</li>
158
161
  </ul>
159
162
  </section>
160
163
 
@@ -166,6 +169,16 @@
166
169
  <li>Remove humanenv-usage skill due to security concerns</li>
167
170
  <li>Clarify that ask command provides suggestions only, not execution; update help text and metadata for accuracy</li>
168
171
  <li>Align SKILL.md format with frontmatter standard</li>
172
+ <li>Add vm2 dependency for executor sandboxing</li>
173
+ </ul>
174
+ </section>
175
+
176
+ <section class="changelog-section">
177
+ <h2 class="text-2xl font-display font-semibold text-amber-400 mb-4 flex items-center gap-2">
178
+ <span>⚠️</span> Deprecations
179
+ </h2>
180
+ <ul class="space-y-2 text-slate-300">
181
+ <li><strong>builtin adapter removed</strong> - Migrated beads, gwc, and commiat plugins to use isolated <code>install-guidance.json</code> files with shell adapter. Removed builtin from server UI dropdown, adapter registry, validation schema, and all test references.</li>
169
182
  </ul>
170
183
  </section>
171
184
 
@@ -199,6 +212,8 @@
199
212
  <li>Update plugin discovery and registration documentation with new meta.json convention</li>
200
213
  <li>Add supercli skills and plugins documentation with usage examples</li>
201
214
  <li>Add FFmpeg plugin quickstart guide with commands and examples</li>
215
+ <li>Add server documentation with dashboard and adapter management guides</li>
216
+ <li>Add adapters documentation with usage examples</li>
202
217
  </ul>
203
218
  </section>
204
219