@orchid-labs/pluxx 0.1.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.
Files changed (119) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +574 -0
  3. package/bin/pluxx.js +37 -0
  4. package/dist/cli/agent.d.ts +90 -0
  5. package/dist/cli/agent.d.ts.map +1 -0
  6. package/dist/cli/dev.d.ts +2 -0
  7. package/dist/cli/dev.d.ts.map +1 -0
  8. package/dist/cli/doctor.d.ts +19 -0
  9. package/dist/cli/doctor.d.ts.map +1 -0
  10. package/dist/cli/index.d.ts +24 -0
  11. package/dist/cli/index.d.ts.map +1 -0
  12. package/dist/cli/init-from-mcp.d.ts +145 -0
  13. package/dist/cli/init-from-mcp.d.ts.map +1 -0
  14. package/dist/cli/install.d.ts +56 -0
  15. package/dist/cli/install.d.ts.map +1 -0
  16. package/dist/cli/lint.d.ts +18 -0
  17. package/dist/cli/lint.d.ts.map +1 -0
  18. package/dist/cli/migrate.d.ts +2 -0
  19. package/dist/cli/migrate.d.ts.map +1 -0
  20. package/dist/cli/prompt.d.ts +20 -0
  21. package/dist/cli/prompt.d.ts.map +1 -0
  22. package/dist/cli/publish.d.ts +70 -0
  23. package/dist/cli/publish.d.ts.map +1 -0
  24. package/dist/cli/runtime.d.ts +20 -0
  25. package/dist/cli/runtime.d.ts.map +1 -0
  26. package/dist/cli/sync-from-mcp.d.ts +32 -0
  27. package/dist/cli/sync-from-mcp.d.ts.map +1 -0
  28. package/dist/cli/test.d.ts +33 -0
  29. package/dist/cli/test.d.ts.map +1 -0
  30. package/dist/compatibility/matrix.d.ts +14 -0
  31. package/dist/compatibility/matrix.d.ts.map +1 -0
  32. package/dist/config/define.d.ts +18 -0
  33. package/dist/config/define.d.ts.map +1 -0
  34. package/dist/config/load.d.ts +7 -0
  35. package/dist/config/load.d.ts.map +1 -0
  36. package/dist/generators/amp/index.d.ts +13 -0
  37. package/dist/generators/amp/index.d.ts.map +1 -0
  38. package/dist/generators/base.d.ts +49 -0
  39. package/dist/generators/base.d.ts.map +1 -0
  40. package/dist/generators/claude-code/index.d.ts +7 -0
  41. package/dist/generators/claude-code/index.d.ts.map +1 -0
  42. package/dist/generators/cline/index.d.ts +14 -0
  43. package/dist/generators/cline/index.d.ts.map +1 -0
  44. package/dist/generators/codex/index.d.ts +9 -0
  45. package/dist/generators/codex/index.d.ts.map +1 -0
  46. package/dist/generators/cursor/index.d.ts +11 -0
  47. package/dist/generators/cursor/index.d.ts.map +1 -0
  48. package/dist/generators/gemini-cli/index.d.ts +13 -0
  49. package/dist/generators/gemini-cli/index.d.ts.map +1 -0
  50. package/dist/generators/github-copilot/index.d.ts +11 -0
  51. package/dist/generators/github-copilot/index.d.ts.map +1 -0
  52. package/dist/generators/hooks-warning.d.ts +3 -0
  53. package/dist/generators/hooks-warning.d.ts.map +1 -0
  54. package/dist/generators/index.d.ts +11 -0
  55. package/dist/generators/index.d.ts.map +1 -0
  56. package/dist/generators/opencode/index.d.ts +15 -0
  57. package/dist/generators/opencode/index.d.ts.map +1 -0
  58. package/dist/generators/openhands/index.d.ts +11 -0
  59. package/dist/generators/openhands/index.d.ts.map +1 -0
  60. package/dist/generators/roo-code/index.d.ts +14 -0
  61. package/dist/generators/roo-code/index.d.ts.map +1 -0
  62. package/dist/generators/shared/claude-family.d.ts +18 -0
  63. package/dist/generators/shared/claude-family.d.ts.map +1 -0
  64. package/dist/generators/warp/index.d.ts +13 -0
  65. package/dist/generators/warp/index.d.ts.map +1 -0
  66. package/dist/hook-events.d.ts +4 -0
  67. package/dist/hook-events.d.ts.map +1 -0
  68. package/dist/index.d.ts +7 -0
  69. package/dist/index.d.ts.map +1 -0
  70. package/dist/index.js +5302 -0
  71. package/dist/mcp/introspect.d.ts +34 -0
  72. package/dist/mcp/introspect.d.ts.map +1 -0
  73. package/dist/permissions.d.ts +18 -0
  74. package/dist/permissions.d.ts.map +1 -0
  75. package/dist/schema.d.ts +9457 -0
  76. package/dist/schema.d.ts.map +1 -0
  77. package/dist/user-config.d.ts +19 -0
  78. package/dist/user-config.d.ts.map +1 -0
  79. package/dist/validation/platform-rules.d.ts +64 -0
  80. package/dist/validation/platform-rules.d.ts.map +1 -0
  81. package/package.json +76 -0
  82. package/src/cli/agent.ts +1030 -0
  83. package/src/cli/dev.ts +112 -0
  84. package/src/cli/doctor.ts +588 -0
  85. package/src/cli/index.ts +2414 -0
  86. package/src/cli/init-from-mcp.ts +1611 -0
  87. package/src/cli/install.ts +698 -0
  88. package/src/cli/lint.ts +1219 -0
  89. package/src/cli/migrate.ts +614 -0
  90. package/src/cli/prompt.ts +82 -0
  91. package/src/cli/publish.ts +401 -0
  92. package/src/cli/runtime.ts +86 -0
  93. package/src/cli/sync-from-mcp.ts +563 -0
  94. package/src/cli/test.ts +134 -0
  95. package/src/compatibility/matrix.ts +149 -0
  96. package/src/config/define.ts +20 -0
  97. package/src/config/load.ts +74 -0
  98. package/src/generators/amp/index.ts +63 -0
  99. package/src/generators/base.ts +188 -0
  100. package/src/generators/claude-code/index.ts +29 -0
  101. package/src/generators/cline/index.ts +35 -0
  102. package/src/generators/codex/index.ts +120 -0
  103. package/src/generators/cursor/index.ts +158 -0
  104. package/src/generators/gemini-cli/index.ts +83 -0
  105. package/src/generators/github-copilot/index.ts +32 -0
  106. package/src/generators/hooks-warning.ts +51 -0
  107. package/src/generators/index.ts +71 -0
  108. package/src/generators/opencode/index.ts +526 -0
  109. package/src/generators/openhands/index.ts +32 -0
  110. package/src/generators/roo-code/index.ts +35 -0
  111. package/src/generators/shared/claude-family.ts +215 -0
  112. package/src/generators/warp/index.ts +32 -0
  113. package/src/hook-events.ts +33 -0
  114. package/src/index.ts +23 -0
  115. package/src/mcp/introspect.ts +834 -0
  116. package/src/permissions.ts +258 -0
  117. package/src/schema.ts +312 -0
  118. package/src/user-config.ts +177 -0
  119. package/src/validation/platform-rules.ts +565 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Brandon Guerrero / Orchid Automation
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,574 @@
1
+ # pluxx
2
+
3
+ **Build AI agent plugins once. Ship them everywhere.**
4
+
5
+ pluxx generates native plugin packages for Claude Code, Cursor, Codex, and OpenCode from a single config file. One source of truth — platform-specific outputs with the right manifests, rules, install scripts, hook handling, and MCP config when your plugin needs it.
6
+
7
+ The product scope is intentionally tight:
8
+
9
+ - Pluxx owns the common cross-host plugin-authoring primitives
10
+ - Pluxx does not try to model every host-specific extension feature yet
11
+
12
+ pluxx is Bun-first today. Use `bunx` or run it from a Bun workspace. The npm package includes a small launcher for global installs, but it still requires Bun at runtime.
13
+
14
+ ```bash
15
+ bunx pluxx build
16
+ ```
17
+
18
+ ```
19
+ dist/
20
+ claude-code/ .claude-plugin/plugin.json, .mcp.json, CLAUDE.md, hooks/hooks.json, skills
21
+ cursor/ .cursor-plugin/plugin.json, mcp.json, hooks/hooks.json, AGENTS.md, rules/
22
+ codex/ .codex-plugin/plugin.json, .mcp.json, AGENTS.md, interface metadata
23
+ ```
24
+
25
+ ## Platform Support
26
+
27
+ | Platform | Status | Validated |
28
+ |----------|--------|-----------|
29
+ | **Claude Code** | Primary | `claude plugin validate` PASSED |
30
+ | **Cursor** | Primary | Docs-audited, hooks + rules covered in lint |
31
+ | **Codex** | Primary | Docs-audited, plugin packaging aligned; hooks remain external Codex config |
32
+ | **OpenCode** | Primary | Generates JS/TS wrapper, active docs-parity work |
33
+ | GitHub Copilot | Beta | Reuses Claude Code format (confirmed compatible) |
34
+ | OpenHands | Beta | Generates .plugin/ manifest, needs live testing |
35
+ | Warp | Beta | Generates skills + AGENTS.md |
36
+ | Gemini CLI | Beta | Generates gemini-extension.json |
37
+ | Roo Code | Beta | Generates .roorules + skills |
38
+ | Cline | Beta | Generates .clinerules + skills |
39
+ | AMP | Beta | Generates AGENT.md + skills |
40
+
41
+ **Primary** = first-class launch target, actively maintained.
42
+ **Beta** = generated, but less validated against live tool behavior.
43
+
44
+ The mechanically generated source of truth for support and verification is [docs/compatibility.md](./docs/compatibility.md).
45
+
46
+ If you want the operational version of the docs, start with the [Practical handbook](./docs/practical-handbook.md).
47
+ If you want the explicit authoring walkthrough, use [Create a Pluxx plugin](./docs/create-a-pluxx-plugin.md).
48
+ If you want the meta guide for using Pluxx *inside* Claude/Codex/Cursor/OpenCode, use [Use Pluxx in host agents](./docs/use-pluxx-in-host-agents.md).
49
+ If you want the tightened product scope for what Pluxx should model first, use [Core primitives](./docs/core-primitives.md).
50
+ If you want the current execution queue with milestones, dependencies, and delegated subtasks, use [Roadmap](./docs/roadmap.md).
51
+ If you want the implementation target for release orchestration, use [publish v1 contract](./docs/publish-v1-contract.md).
52
+ If you are planning marketplace-aware release flows, use [Marketplace submission prep](./docs/marketplace-submission-prep.md).
53
+
54
+ ## Why?
55
+
56
+ Tools like `npx skills` install SKILL.md files across agents. That covers **skills**.
57
+
58
+ But a plugin is more than skills. A plugin bundles:
59
+
60
+ | Component | What pluxx handles |
61
+ |-----------|---------------------|
62
+ | **Manifests** | `.claude-plugin/plugin.json` vs `.cursor-plugin/plugin.json` vs `.codex-plugin/plugin.json` |
63
+ | **MCP auth** | Claude Code uses `headers`, Codex uses `bearer_token_env_var` plus `env_http_headers` / `http_headers`, Cursor uses Claude Desktop format |
64
+ | **Hooks** | Different event names, different JSON schemas, and in Codex's case a separate runtime config path |
65
+ | **Rules** | `CLAUDE.md` vs `rules/*.mdc` vs `AGENTS.md` |
66
+ | **Brand metadata** | Codex has icons, colors, screenshots, default prompts. Others don't. |
67
+ | **Subagents** | Different formats per platform |
68
+
69
+ Without pluxx you maintain separate copies for each platform. With pluxx you maintain one.
70
+
71
+ That value exists even if your plugin has no MCP at all. If you are hand-authoring skills, instructions, hooks, commands, or brand metadata, Pluxx still gives you one maintainable cross-host plugin project.
72
+
73
+ The sharpest launch wedge is still MCP-first authoring: start from an existing MCP server, generate a maintainable plugin scaffold, then keep shipping from one config.
74
+
75
+ ## Core Primitives
76
+
77
+ Pluxx treats these as the canonical authoring model:
78
+
79
+ - `skills`
80
+ - `instructions`
81
+ - `mcp`
82
+ - `userConfig`
83
+ - `commands`
84
+ - `agents`
85
+ - `hooks`
86
+ - `permissions`
87
+ - `brand`
88
+ - `assets/scripts`
89
+ - `taxonomy`
90
+
91
+ These are the primitives that show up repeatedly in real plugins and real host integrations.
92
+
93
+ ## What Pluxx Does Not Model Yet
94
+
95
+ These features exist in one or more hosts, but they are not the current product center:
96
+
97
+ - `outputStyles`
98
+ - `lspServers`
99
+ - `bin/` executables
100
+ - `monitors`
101
+ - `channels`
102
+ - `apps` abstraction
103
+ - plugin data-dir abstraction
104
+ - statuslines
105
+ - themes / keybindings
106
+ - sandbox or other user/admin runtime policy
107
+
108
+ Pluxx should document these and revisit them later, but it should not expand the core mental model around them yet.
109
+
110
+ When you scaffold from an MCP server, pluxx now drafts workflow-oriented skills from the discovered tools so the first pass is closer to a usable plugin.
111
+
112
+ The next layer is `Agent` mode: Pluxx prepares the scaffold, context pack, and prompt pack; Claude Code or Codex does the semantic refinement. The product direction is documented in [docs/agent-mode.md](./docs/agent-mode.md).
113
+
114
+ ## Quick Start
115
+
116
+ ```bash
117
+ # Preferred: run via bunx
118
+
119
+ # Start a plugin by hand
120
+ bunx pluxx init my-plugin
121
+ cd my-plugin
122
+ # Edit pluxx.config.ts, add skills in ./skills/, then build
123
+
124
+ # Or scaffold directly from an MCP server
125
+ bunx pluxx init --from-mcp https://example.com/mcp
126
+
127
+ # Legacy SSE MCP import
128
+ bunx pluxx init --from-mcp https://example.com/sse --transport sse
129
+
130
+ # Local stdio MCP import
131
+ bunx pluxx init --from-mcp "npx -y @acme/mcp"
132
+
133
+ # pluxx will introspect the server and draft grouped skills like
134
+ # account-research, contact-discovery, hiring-signals, or technographics
135
+
136
+ # Headless / CI-friendly import
137
+ bunx pluxx init --from-mcp https://example.com/mcp --yes --name acme --display-name "Acme" --author "Acme" --targets claude-code,codex --grouping workflow --hooks safe --json
138
+
139
+ # Remote MCPs that use custom header auth
140
+ bunx pluxx init --from-mcp https://mcp.playkit.sh/mcp --yes --auth-env PLAYKIT_API_KEY --auth-type header --auth-header X-API-Key --auth-template '${value}'
141
+
142
+ # OAuth-first MCPs: complete provider OAuth first, then pass the resulting token env var
143
+ bunx pluxx init --from-mcp https://example.com/mcp --yes --auth-env OAUTH_ACCESS_TOKEN --auth-type bearer
144
+
145
+ # Inspect the generated project without mutating files
146
+ bunx pluxx doctor
147
+ bunx pluxx init --from-mcp https://example.com/mcp --yes --dry-run
148
+
149
+ # Refresh MCP-derived files later while preserving the custom sections
150
+ bunx pluxx sync --json
151
+
152
+ # Prepare an agent-facing context pack and prompt pack
153
+ bunx pluxx agent prepare
154
+ bunx pluxx agent prompt taxonomy
155
+
156
+ # Or run the full import -> refine -> verify path in one shot
157
+ bunx pluxx autopilot --from-mcp https://example.com/mcp --runner codex --mode quick --yes
158
+ bunx pluxx autopilot --from-mcp https://example.com/mcp --runner codex --mode standard --yes --name acme --display-name "Acme" --author "Acme"
159
+ bunx pluxx autopilot --from-mcp https://example.com/mcp --runner codex --mode thorough --yes --verbose-runner
160
+
161
+ # Or let Claude/Cursor/OpenCode/Codex consume the pack headlessly
162
+ bunx pluxx agent run taxonomy --runner claude
163
+ bunx pluxx agent run taxonomy --runner cursor
164
+ bunx pluxx agent run taxonomy --runner codex
165
+ bunx pluxx agent run review --runner opencode --attach http://localhost:4096 --no-verify
166
+
167
+ # Validate, build, and smoke-test the generated plugin
168
+ bunx pluxx lint
169
+ bunx pluxx build
170
+ bunx pluxx test
171
+ ```
172
+
173
+ `--attach` is only supported for the `opencode` runner.
174
+
175
+ Autopilot modes:
176
+
177
+ - `quick`: deterministic scaffold first, and only a taxonomy pass when MCP metadata warnings make it necessary
178
+ - `standard`: balanced default; only runs the expensive passes when quality signals or extra docs/context justify them
179
+ - `thorough`: always runs taxonomy, instructions, and review before verification
180
+
181
+ ## Product Boundary And Lifecycle
182
+
183
+ Pluxx is for teams that want one maintained plugin source of truth across hosts.
184
+
185
+ The best fit today is MCP developers and teams shipping MCP-backed plugins, because MCP import, auth translation, and sync create the most cross-host pain. But hand-authored plugins are still a valid use case.
186
+
187
+ Pluxx owns:
188
+
189
+ - plugin authoring scaffold, whether imported from MCP or authored manually
190
+ - validation (`lint`, `doctor`, `test`)
191
+ - platform bundle generation (`build`)
192
+ - local installation for testing (`install`)
193
+ - ongoing MCP-to-plugin maintenance (`sync`) for MCP-derived projects
194
+
195
+ Pluxx does not own:
196
+
197
+ - deploying or hosting your MCP backend service
198
+ - running your production MCP infrastructure
199
+
200
+ The normal lifecycle is:
201
+
202
+ 1. Start from an MCP import or a hand-authored plugin source repo.
203
+ 2. Refine the source project.
204
+ 3. Validate/build/install locally.
205
+ 4. If the plugin is MCP-backed, repoint sync to the deployed HTTP/SSE MCP when production is ready.
206
+ 5. Keep the same plugin repo as the long-term source of truth.
207
+
208
+ Example local-to-production transition:
209
+
210
+ ```bash
211
+ # Local development MCP
212
+ bunx pluxx init --from-mcp "npx -y @acme/mcp"
213
+
214
+ # Later, after your MCP backend is deployed
215
+ bunx pluxx sync --from-mcp https://mcp.acme.com/mcp
216
+ ```
217
+
218
+ Publish/distribution today is repo-first:
219
+
220
+ 1. Commit the generated plugin source repo (`pluxx.config.ts`, `skills/`, `INSTRUCTIONS.md`, `.pluxx/mcp.json`).
221
+ 2. Build platform bundles with `bunx pluxx build`.
222
+ 3. Distribute those bundles through your target channels (internal repo, releases, or platform-specific publish paths).
223
+
224
+ Pluxx is the distribution and maintenance layer for plugin artifacts; MCP service deployment remains your responsibility.
225
+
226
+ Generated MCP skill files include deterministic example requests derived from tool names and required inputs, so the first scaffold is useful before any AI refinement.
227
+
228
+ Agent Mode stays file-first: Pluxx writes `.pluxx/agent/context.md`, `.pluxx/agent/plan.json`, and the prompt packs, then optional runner adapters can hand those files to `claude`, `opencode`, or `codex` in headless mode. Durable project-level prompt and context customization now lives in `pluxx.agent.md`, so users do not need to edit generated `.pluxx/agent/*.md` files directly.
229
+ Runner output is summarized by default for `pluxx agent run` and `pluxx autopilot`; use `--verbose-runner` when you want full headless runner streaming.
230
+
231
+ The dogfood coverage matrix across messy metadata, local stdio, OAuth-first servers, and production auth patterns is documented in [docs/mcp-dogfood-matrix.md](./docs/mcp-dogfood-matrix.md).
232
+
233
+ For dogfooding inside Codex, this repo also ships a local plugin/skill pack at [plugins/pluxx](/Users/brandonguerrero/Documents/Orchid Automation/Orchid Labs/pluxx/plugins/pluxx) with focused skills for import, taxonomy refinement, instructions, review, and sync.
234
+ There is now also a first-class self-hosting source project at [example/pluxx](/Users/brandonguerrero/Documents/Orchid Automation/Orchid Labs/pluxx/example/pluxx) that uses one Pluxx config to generate Claude Code, Cursor, Codex, and OpenCode outputs for the Pluxx plugin itself.
235
+
236
+ ```bash
237
+ # Optional: global install still shells out to Bun
238
+ npm install -g pluxx
239
+ pluxx init my-plugin
240
+
241
+ # Scaffold a new plugin
242
+ cd my-plugin
243
+
244
+ # Edit pluxx.config.ts, create skills in ./skills/
245
+
246
+ # Build for all platforms
247
+ bunx pluxx build
248
+
249
+ # Lint against all platform rules (47 checks)
250
+ bunx pluxx lint
251
+
252
+ # Diagnose local runtime + config health
253
+ bunx pluxx doctor
254
+
255
+ # Run config, lint, build, and smoke checks together
256
+ bunx pluxx test
257
+
258
+ # Build for specific platforms
259
+ bunx pluxx build --target claude-code cursor codex opencode
260
+
261
+ # Validate your config
262
+ bunx pluxx validate
263
+ ```
264
+
265
+ ## Config
266
+
267
+ ```typescript
268
+ // pluxx.config.ts
269
+ import { definePlugin } from 'pluxx'
270
+
271
+ export default definePlugin({
272
+ name: 'my-plugin',
273
+ version: '1.0.0',
274
+ description: 'What your plugin does',
275
+ author: { name: 'Your Name' },
276
+
277
+ // Skills (Agent Skills standard — shared across all platforms)
278
+ skills: './skills/',
279
+
280
+ // MCP servers (auth format auto-translated per platform)
281
+ mcp: {
282
+ 'my-server': {
283
+ url: 'https://my-server.com/mcp',
284
+ auth: {
285
+ type: 'bearer',
286
+ envVar: 'MY_API_KEY',
287
+ },
288
+ },
289
+ },
290
+
291
+ // Hooks (generated where the platform supports plugin-packaged hooks;
292
+ // Codex currently keeps hook config in .codex/hooks.json outside plugin bundles)
293
+ hooks: {
294
+ sessionStart: [{
295
+ command: '${PLUGIN_ROOT}/scripts/setup.sh',
296
+ }],
297
+ },
298
+
299
+ // Instructions (generates CLAUDE.md, AGENTS.md, or .mdc rules)
300
+ instructions: './INSTRUCTIONS.md',
301
+
302
+ // Brand (used by platforms that support rich metadata)
303
+ brand: {
304
+ displayName: 'My Plugin',
305
+ color: '#3B82F6',
306
+ icon: './assets/icon.svg',
307
+ defaultPrompts: ['Try my plugin with this prompt'],
308
+ },
309
+
310
+ // Target platforms
311
+ targets: ['claude-code', 'cursor', 'codex', 'opencode'],
312
+ })
313
+ ```
314
+
315
+ ## What Gets Generated
316
+
317
+ ### MCP Config Translation
318
+
319
+ You write one auth config. pluxx generates the correct format for each platform:
320
+
321
+ ```typescript
322
+ // You write:
323
+ mcp: {
324
+ server: {
325
+ url: 'https://api.example.com/mcp',
326
+ auth: { type: 'bearer', envVar: 'API_KEY' },
327
+ },
328
+ }
329
+ ```
330
+
331
+ ```jsonc
332
+ // Claude Code gets:
333
+ { "headers": { "Authorization": "Bearer ${API_KEY}" } }
334
+
335
+ // Codex gets:
336
+ {
337
+ "env_http_headers": {
338
+ "X-API-Key": "API_KEY"
339
+ }
340
+ }
341
+
342
+ // Cursor gets:
343
+ { "headers": { "Authorization": "Bearer ${API_KEY}" } }
344
+ ```
345
+
346
+ ### Plugin Manifests
347
+
348
+ Each platform gets its native manifest format:
349
+
350
+ - **Claude Code**: `.claude-plugin/plugin.json` with skills, commands paths
351
+ - **Cursor**: `.cursor-plugin/plugin.json` with explicit `rules/`, `hooks/hooks.json`, and `mcp.json` component paths
352
+ - **Codex**: `.codex-plugin/plugin.json` with full `interface` block (brand color, icons, screenshots, default prompts, capabilities) plus external hooks via `.codex/hooks.json`
353
+ - **OpenCode**: npm package + JS/TS plugin wrapper
354
+
355
+ ### Instructions to Platform-Native Rules
356
+
357
+ Your single `INSTRUCTIONS.md` becomes:
358
+ - `CLAUDE.md` for Claude Code
359
+ - `AGENTS.md` for Codex and Cursor
360
+ - `.mdc` rule files in `rules/` for Cursor (with frontmatter) when you specify rules in platform overrides
361
+
362
+ ### 47 Lint Checks
363
+
364
+ `pluxx lint` catches platform-specific gotchas before you ship:
365
+
366
+ - Codex rejects SKILL.md descriptions over 1024 characters
367
+ - Claude Code silently truncates descriptions at 250 characters
368
+ - Cursor and Cline require skill names to match their directory names
369
+ - Codex allows max 3 default prompts, 128 chars each
370
+ - Claude Code hook events must be PascalCase (26 valid events)
371
+ - Manifest paths must start with `./` and cannot contain `../`
372
+ - Plugin directories must be at root, not inside `.claude-plugin/`
373
+ - Version must follow semver format
374
+ - And 39 more checks across all platforms
375
+
376
+ ### Read-Only Diagnostics And Verification
377
+
378
+ - `pluxx doctor` checks Bun/runtime health, config loadability, configured paths, MCP auth/transport shape, scaffold metadata, and install trust advisories.
379
+ - `pluxx test` runs the default verification stack for a plugin project: config load, lint, build, and generated-output smoke checks.
380
+ - `--json` is available for machine-readable output on `init --from-mcp`, `sync`, `doctor`, `lint`, `build`, `install --dry-run`, and `test`.
381
+ - `--dry-run` previews file writes for `init --from-mcp` and `sync`, install paths for `install`, and output targets for `build`.
382
+
383
+ ### Platform Overrides
384
+
385
+ For the 10% of cases where platforms diverge:
386
+
387
+ ```typescript
388
+ platforms: {
389
+ 'claude-code': {
390
+ skillDefaults: { effort: 'high' },
391
+ },
392
+ cursor: {
393
+ rules: [{
394
+ description: 'My conventions',
395
+ alwaysApply: false,
396
+ }],
397
+ },
398
+ codex: {
399
+ interface: {
400
+ capabilities: ['Interactive', 'Write'],
401
+ privacyPolicyURL: 'https://example.com/privacy',
402
+ },
403
+ },
404
+ }
405
+ ```
406
+
407
+ ## Real-World Examples
408
+
409
+ ### Megamind (client intelligence plugin)
410
+
411
+ The [example/megamind](./example/megamind) directory contains a full plugin that was previously hand-maintained as two separate copies. With pluxx, one config generates outputs for all platforms.
412
+
413
+ ```bash
414
+ cd example/megamind
415
+ bunx pluxx build
416
+ ```
417
+
418
+ ### Prospeo (sales intelligence MCP)
419
+
420
+ The [examples/prospeo-mcp](./examples/prospeo-mcp) directory wraps a real MCP server into a multi-platform plugin with 4 skills:
421
+
422
+ ```bash
423
+ cd examples/prospeo-mcp
424
+ bunx pluxx build # 52 files across 7 platforms
425
+ bunx pluxx lint # Catches real platform gotchas
426
+ ```
427
+
428
+ ## Testing Locally
429
+
430
+ ```bash
431
+ # Check project health before generating anything
432
+ bunx pluxx doctor
433
+
434
+ # Build and install to Claude Code
435
+ bunx pluxx build
436
+ bunx pluxx install --target claude-code
437
+
438
+ # Run the full plugin verification contract
439
+ bunx pluxx test
440
+
441
+ # Validate with Claude Code's own validator
442
+ claude plugin validate ~/.claude/plugins/my-plugin
443
+ # ✓ Validation passed
444
+ ```
445
+
446
+ ## CI / Automation
447
+
448
+ Pluxx now ships a reusable GitHub workflow for plugin repos:
449
+
450
+ ```yaml
451
+ name: Plugin Check
452
+
453
+ on:
454
+ pull_request:
455
+ push:
456
+ branches: [main]
457
+
458
+ jobs:
459
+ verify:
460
+ uses: orchidautomation/pluxx/.github/workflows/pluxx-plugin-check.yml@main
461
+ with:
462
+ working-directory: .
463
+ pluxx-version: latest
464
+ ```
465
+
466
+ For headless local automation, prefer:
467
+
468
+ ```bash
469
+ bunx pluxx init --from-mcp https://example.com/mcp --yes --json
470
+ bunx pluxx sync --dry-run --json
471
+ bunx pluxx test --json
472
+ ```
473
+
474
+ See [docs/getting-started.md](./docs/getting-started.md) for the full getting-started walkthrough, including the MCP-first path.
475
+
476
+ ## Hook Trust Model
477
+
478
+ Hook commands are shell commands that execute on your machine when hook events fire. If you install a third-party plugin with hooks, you are trusting that plugin author with local command execution.
479
+
480
+ `pluxx install` now warns when the plugin config contains command hooks and prints each event/command pair before install proceeds.
481
+
482
+ Use `--trust` to bypass the confirmation prompt (useful in CI/non-interactive environments):
483
+
484
+ ```bash
485
+ bunx pluxx install --trust
486
+ ```
487
+
488
+ ## CLI Commands
489
+
490
+ | Command | What it does |
491
+ |---------|-------------|
492
+ | `pluxx init` | Interactive scaffold for a new plugin or `--from-mcp` import |
493
+ | `pluxx doctor` | Read-only runtime, config, MCP, and trust diagnostics |
494
+ | `pluxx build` | Generate plugin packages for all target platforms |
495
+ | `pluxx lint` | 47 checks against all platform rules |
496
+ | `pluxx test` | Run config, lint, build, and smoke checks together |
497
+ | `pluxx sync` | Refresh MCP-derived scaffold files while preserving custom sections |
498
+ | `pluxx validate` | Validate your config schema |
499
+ | `pluxx install` | Symlink built plugins for local testing (prompts when hook commands exist) |
500
+ | `pluxx install --trust` | Bypass hook trust confirmation |
501
+ | `pluxx uninstall` | Remove symlinked plugins |
502
+ | `pluxx dev` | Watch mode with auto-rebuild on file changes |
503
+ | `pluxx migrate <path>` | Import an existing single-platform plugin |
504
+
505
+ ## How It Works
506
+
507
+ ```
508
+ pluxx.config.ts <- You define your plugin once
509
+ |
510
+ v
511
+ +---------+
512
+ | Parse | Zod schema validation
513
+ +----+----+
514
+ |
515
+ v
516
+ +--------+
517
+ | Lint | 47 platform-specific checks
518
+ +----+---+
519
+ |
520
+ v
521
+ +----------+
522
+ | Generate | Platform-specific generators
523
+ +-+--+--+--+
524
+ | | |
525
+ v v v
526
+ Claude Cursor Codex + 8 beta platforms
527
+ Code
528
+ ```
529
+
530
+ ## Comparison
531
+
532
+ | | pluxx | npx skills | SkillKit |
533
+ |---|:---:|:---:|:---:|
534
+ | Install skills to multiple agents | - | Yes | Yes |
535
+ | Generate plugin manifests | Yes | - | - |
536
+ | MCP config with auth translation | Yes | - | - |
537
+ | Hook generation per platform | Yes | - | - |
538
+ | Brand/interface metadata | Yes | - | - |
539
+ | Rules/instructions generation | Yes | - | Translate only |
540
+ | Cross-platform lint (47 checks) | Yes | - | - |
541
+ | Subagent configs | Yes | - | - |
542
+
543
+ **pluxx builds plugins. The others install skills.** They're complementary — use `npx skills` to distribute your skills, use pluxx to build the full plugin package.
544
+
545
+ ## Built On
546
+
547
+ - [Agent Skills](https://agentskills.io/) open standard (skills are pass-through, never modified)
548
+ - [Zod](https://zod.dev/) for config validation with full TypeScript inference
549
+ - [Bun](https://bun.sh/) for fast builds and TypeScript-native execution
550
+
551
+ ## Roadmap
552
+
553
+ - [x] Core schema with Zod validation
554
+ - [x] Generators: Claude Code, Cursor, Codex (fully supported) + 8 beta platforms
555
+ - [x] CLI: `build`, `validate`, `init`, `lint`, `install`, `uninstall`, `dev`, `migrate`
556
+ - [x] MCP auth normalization across platforms
557
+ - [x] 47 lint checks from official docs (Firecrawl-verified)
558
+ - [x] Real-world examples (Megamind + Prospeo)
559
+ - [ ] `pluxx lint --fix` — auto-apply suggested fixes
560
+ - [x] `pluxx init --from-mcp` — auto-scaffold plugins from existing MCP servers
561
+ - [x] `pluxx doctor` — project and runtime health checks
562
+ - [x] `pluxx test` — verification command for plugin repos
563
+ - [x] CI/CD GitHub Action / reusable workflow
564
+ - [ ] canonical `userConfig` / install-time secret handling
565
+ - [ ] canonical permissions model across primary targets
566
+ - [ ] build-time target cap validation for primary targets
567
+ - [ ] `pluxx publish` — push to platform marketplaces
568
+ - [ ] `pluxx diff` — show what changed per platform
569
+ - [ ] Plugin analytics dashboard
570
+ - [ ] Promote beta platforms to fully supported
571
+
572
+ ## License
573
+
574
+ MIT
package/bin/pluxx.js ADDED
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { spawnSync } from 'child_process'
4
+ import { dirname, resolve } from 'path'
5
+ import { fileURLToPath, pathToFileURL } from 'url'
6
+
7
+ const binDir = dirname(fileURLToPath(import.meta.url))
8
+ const cliPath = resolve(binDir, '..', 'src', 'cli', 'index.ts')
9
+
10
+ if (process.versions.bun) {
11
+ const cli = await import(pathToFileURL(cliPath).href)
12
+ if (typeof cli.main !== 'function') {
13
+ console.error('pluxx launcher failed to resolve the CLI entrypoint.')
14
+ process.exit(1)
15
+ }
16
+
17
+ await cli.main()
18
+ } else {
19
+ const bunBinary = process.platform === 'win32' ? 'bun.exe' : 'bun'
20
+ const result = spawnSync(bunBinary, [cliPath, ...process.argv.slice(2)], {
21
+ stdio: 'inherit',
22
+ env: process.env,
23
+ })
24
+
25
+ if (result.error && 'code' in result.error && result.error.code === 'ENOENT') {
26
+ console.error('pluxx currently requires Bun at runtime.')
27
+ console.error('Install Bun from https://bun.sh or run pluxx from a Bun workspace.')
28
+ process.exit(1)
29
+ }
30
+
31
+ if (result.error) {
32
+ console.error(result.error.message)
33
+ process.exit(1)
34
+ }
35
+
36
+ process.exit(result.status ?? 1)
37
+ }