@fusion.dev/helix-docs 0.193.0 → 0.194.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.
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: The files an AI agent can read to write Helix code, and where to find each one.
2
+ description: Install Helix for a coding agent, and the files an agent can read to write Helix code.
3
3
  order: 4
4
4
  section: Getting started
5
5
  title: Coding agents
@@ -11,6 +11,72 @@ We publish Helix as text for agents that write Helix code, so an agent does not
11
11
  need to read the rendered website. Three sources give it the library as text.
12
12
  We generate all three from the same sources as this site.
13
13
 
14
+ ## Install the plugin
15
+
16
+ Helix's plugin gives an agent the [Helix skill](./using-helix-with-an-agent) and
17
+ the Helix MCP server in one install. The server runs
18
+ `npx @fusion.dev/helix-cli mcp`, the command line your project installs, so its
19
+ answers are your version's.
20
+
21
+ | Tool | Install |
22
+ |---|---|
23
+ | Claude Code | `claude plugin marketplace add project-fusion/fusion`, then `claude plugin install helix@fusion` |
24
+ | Cursor | `/plugin marketplace add https://github.com/project-fusion/fusion` in Cursor's agent, then install `helix`. A team marketplace can import the repository instead |
25
+ | VS Code | Add `"chat.plugins.marketplaces": ["project-fusion/fusion"]` to your settings, search `@agentPlugins` in the Extensions view, and install `helix` |
26
+ | GitHub Copilot CLI | `copilot plugin install project-fusion/fusion:helix/plugin` |
27
+ | Codex | `codex plugin marketplace add project-fusion/fusion`, then `codex plugin add helix@fusion` |
28
+ | Devin | `devin plugins install project-fusion/fusion#helix/plugin` |
29
+ | Gemini CLI | `gemini skills install https://github.com/project-fusion/fusion.git --path helix/plugin/skills/helix`, for the skill alone |
30
+
31
+ The plugin follows the latest release of Helix. Its skill points to the copy in
32
+ `node_modules`, which matches the version you installed.
33
+
34
+ ## Link the skill without a plugin
35
+
36
+ **Point your tool at the skill, and do not copy it.** A copy starts to go stale
37
+ as soon as you paste it, and the skill changes with the library. The skill in
38
+ the package matches the Helix you installed.
39
+
40
+ Most tools read skills from `.agents/skills`, and Claude Code and Cline from
41
+ `.claude/skills`. Link it into the one your tool reads:
42
+
43
+ ```sh
44
+ mkdir -p .agents/skills
45
+ ln -s ../../node_modules/@fusion.dev/helix/skills/helix .agents/skills/helix
46
+ ```
47
+
48
+ Other tools read a file in your repository. Add a line to it that names the
49
+ skill, or this page:
50
+
51
+ ```md
52
+ Helix: read node_modules/@fusion.dev/helix/skills/helix/SKILL.md before
53
+ writing components, and node_modules/@fusion.dev/helix/api.json for the API.
54
+ ```
55
+
56
+ | Tool | Where it goes |
57
+ |---|---|
58
+ | Claude Code | `.claude/skills/helix`, or a line in `AGENTS.md` or `CLAUDE.md` |
59
+ | Cursor | `.cursor/rules/` |
60
+ | GitHub Copilot | `.github/copilot-instructions.md` |
61
+ | Anything else | Whatever it reads. The line is the same |
62
+
63
+ We do not write those files for you, and we chose this on purpose. You would
64
+ have to maintain a file we generated in your repository against our changes. A
65
+ tool that rewrote it on install would be a dependency you did not ask for, in a
66
+ directory you own. You add the link or the line, and you can delete it.
67
+
68
+ ## Install the Helix MCP server
69
+
70
+ ```sh
71
+ helix mcp init --client claude
72
+ ```
73
+
74
+ `helix mcp` answers from the Helix packages your project installs: families,
75
+ examples, import lines, tokens, and the theme a brand color produces. `--client`
76
+ takes `claude`, `cursor`, or `vscode`, and writes the server into the file that
77
+ client reads. [The Helix MCP server](#the-helix-mcp-server) lists the tools. It runs on your
78
+ machine, talks to a client you chose, and makes no network requests.
79
+
14
80
  ## The manifest
15
81
 
16
82
  ```
@@ -78,37 +144,12 @@ agent uses most:
78
144
  - `specifier` and `words` on each element: the line that registers it, and the
79
145
  properties `registerWords` translates
80
146
 
81
- ## Import every family you write
82
-
83
- Each tag needs its family's entry imported. A family registers its own parts,
84
- so `@fusion.dev/helix/tabs` registers Tab and Tab Panel. A family does not
85
- register another family's elements that you write inside it:
86
-
87
- ```js
88
- import '@fusion.dev/helix/select'
89
- import '@fusion.dev/helix/option'
90
- ```
91
-
92
- Without the Option import, the options are unknown elements and the Select
93
- offers nothing. The same is true
94
- of the layout around an example: a Button inside a Flex needs both imports.
95
- Copy the import lines above an example together with its markup.
96
-
97
147
  ## Check the code you wrote
98
148
 
99
- These checks run on your project, and each one prints JSON with `--json`:
100
-
101
- | Command | What it finds |
102
- |---|---|
103
- | `helix scan` | Unknown tags, attributes, values, slots, parts, hooks, React event props, and tokens, a `--_helix-` primitive read, `[disabled]` on a form control, a selector on an attribute the element never writes back, and a tag whose entry nothing imports, each with its file and line |
104
- | `helix theme audit` | Every foreground and background pair in your theme that misses its contrast target |
105
- | `initDiagnostics()` from `@fusion.dev/helix-diagnostics` | The same findings on the running page, and what the library reports as it runs, such as an option nobody imported |
106
-
107
- `helix scan` and `helix theme audit` exit 1 when they find an error and 0 when
108
- they find none. Run them after you write Helix code, and fix each finding
109
- before you finish. `helix scan --file <path>` reports one file's findings, and
110
- `helix scan --stdin tsx` reads a snippet from stdin. Both still read the whole
111
- project, so an import in another file counts.
149
+ `helix scan`, `helix diagnostics --once`, and `helix theme audit` check what an
150
+ agent wrote, and the MCP server runs the same checks.
151
+ [Using Helix with an agent](./using-helix-with-an-agent#check-the-code-you-wrote)
152
+ lists what each finds.
112
153
 
113
154
  ## The index
114
155