@astryxdesign/cli 0.7.3 → 0.7.4-canary.1a552f2

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 (244) hide show
  1. package/README.md +63 -63
  2. package/api/component/_adapter.mjs +4 -3
  3. package/api/component/component.mjs +13 -6
  4. package/api/component/doc-links.test.mjs +33 -0
  5. package/api/discover/_adapter.mjs +22 -10
  6. package/api/discover/_catalog-view.d.mts +2 -0
  7. package/api/discover/_catalog-view.mjs +1 -0
  8. package/api/discover/_catalog-view.test.mjs +1 -0
  9. package/api/discover/detail/detail.mjs +1 -0
  10. package/api/discover/detail/detail.test.mjs +3 -0
  11. package/api/discover/detail/doc/doc.mjs +5 -1
  12. package/api/discover/detail/doc/doc.test.mjs +1 -0
  13. package/api/discover/detail/item/item.mjs +2 -0
  14. package/api/discover/detail/item/item.test.mjs +2 -0
  15. package/api/discover/discover.doc.mjs +4 -4
  16. package/api/discover/discover.type.d.mts +20 -0
  17. package/api/discover/discover.type.mjs +5 -0
  18. package/api/discover/list/list.test.mjs +2 -0
  19. package/api/discover/search/search.d.mts +3 -2
  20. package/api/discover/search/search.mjs +26 -7
  21. package/api/discover/search/search.test.mjs +67 -0
  22. package/api/docs/_adapter.d.mts +80 -0
  23. package/api/docs/_adapter.mjs +261 -11
  24. package/api/docs/detail/detail.mjs +8 -0
  25. package/api/docs/docOverlays.test.mjs +2 -1
  26. package/api/docs/docs.d.mts +16 -6
  27. package/api/docs/docs.doc.mjs +1 -1
  28. package/api/docs/docs.mjs +55 -6
  29. package/api/docs/docs.type.d.mts +28 -2
  30. package/api/docs/docs.type.mjs +13 -3
  31. package/api/docs/guide-route-targets.test.mjs +1002 -0
  32. package/api/docs/index/index.mjs +9 -0
  33. package/api/docs/integration-tree.test.mjs +22 -0
  34. package/api/docs/integrationDocs.test.mjs +85 -0
  35. package/api/docs/list/list.mjs +7 -1
  36. package/api/docs/node/node.mjs +9 -1
  37. package/api/docs/reference-blocks.test.mjs +1 -1
  38. package/api/doctor/_adapter.d.mts +40 -0
  39. package/api/doctor/_adapter.mjs +171 -1
  40. package/api/doctor/built-checks.d.mts +85 -0
  41. package/api/doctor/built-checks.mjs +837 -0
  42. package/api/doctor/built-checks.test.mjs +531 -0
  43. package/api/doctor/doctor.d.mts +6 -5
  44. package/api/doctor/doctor.doc.mjs +11 -1
  45. package/api/doctor/doctor.mjs +18 -3
  46. package/api/doctor/doctor.type.d.mts +6 -0
  47. package/api/doctor/doctor.type.mjs +3 -0
  48. package/api/hook/list/list.d.mts +1 -1
  49. package/api/integration/_adapter.d.mts +11 -2
  50. package/api/integration/_adapter.mjs +30 -4
  51. package/api/integration/authoring-checks.mjs +29 -2
  52. package/api/integration/authoring-checks.test.mjs +131 -1
  53. package/api/integration/check/check.d.mts +4 -1
  54. package/api/integration/check/check.mjs +34 -4
  55. package/api/integration/check/check.test.mjs +49 -0
  56. package/api/integration/integration-check.type.d.mts +8 -0
  57. package/api/integration/integration-check.type.mjs +4 -1
  58. package/api/integration/integrationCheck.doc.mjs +8 -1
  59. package/api/integration/integrationDocConflicts.doc.mjs +1 -1
  60. package/api/integration/pack-check.mjs +71 -2
  61. package/api/integration/pack-check.test.mjs +77 -0
  62. package/api/integration/validate-integration-case-disk.test.mjs +2 -0
  63. package/api/integration/validate-integration-gaps.test.mjs +7 -4
  64. package/api/integration/validate-integration.mjs +96 -14
  65. package/api/integration/validate-integration.type.d.mts +10 -4
  66. package/api/integration/validate-integration.type.mjs +10 -5
  67. package/api/integration/validateIntegration.doc.mjs +1 -1
  68. package/api/search/_candidate-score.d.mts +3 -2
  69. package/api/search/_candidate-score.mjs +66 -3
  70. package/api/search/_gather-docs.mjs +12 -2
  71. package/api/search/_priority.mjs +2 -1
  72. package/api/search/_score.d.mts +2 -1
  73. package/api/search/_score.mjs +2 -2
  74. package/api/search/search.doc.mjs +1 -1
  75. package/api/search/search.family-members.test.mjs +124 -0
  76. package/api/search/search.mjs +28 -0
  77. package/api/theme/palette/generate/generate.d.mts +8 -0
  78. package/api/theme/palette/generate/generate.mjs +38 -11
  79. package/api/theme/palette/generate/generate.test.mjs +83 -4
  80. package/api/theme/palette/generate/generator.d.mts +6 -0
  81. package/api/theme/palette/generate/generator.mjs +6 -0
  82. package/api/theme/theme.type.d.mts +12 -1
  83. package/api/theme/theme.type.mjs +7 -1
  84. package/api/theme/themeBuild.doc.mjs +1 -1
  85. package/api/theme/themeList.doc.mjs +1 -1
  86. package/api/theme/themePaletteGenerate.doc.mjs +1 -1
  87. package/api/theme/themeTargets.doc.mjs +1 -1
  88. package/assets/discover/official-packages.json +16 -0
  89. package/assets/docs/author-a-theme.doc.mjs +15 -15
  90. package/assets/docs/browser-support.doc.mjs +1 -1
  91. package/assets/docs/getting-started.doc.mjs +16 -16
  92. package/assets/docs/is-my-code-good.doc.mjs +6 -6
  93. package/assets/docs/styling-overview.doc.mjs +5 -5
  94. package/assets/docs/theme.doc.mjs +5 -5
  95. package/assets/docs/tree/add-a-component.doc.mjs +1 -1
  96. package/assets/docs/tree/add-a-theme.doc.mjs +2 -2
  97. package/assets/docs/tree/add-a-topic.doc.mjs +6 -6
  98. package/assets/docs/tree/agent-guidance.doc.mjs +5 -5
  99. package/assets/docs/tree/authoring.doc.mjs +2 -2
  100. package/assets/docs/tree/block-template.doc.mjs +1 -1
  101. package/assets/docs/tree/check-the-props.doc.mjs +3 -3
  102. package/assets/docs/tree/check-your-docs.doc.mjs +6 -6
  103. package/assets/docs/tree/checks.doc.mjs +11 -11
  104. package/assets/docs/tree/ci-and-containers.doc.mjs +1 -1
  105. package/assets/docs/tree/cli-command.doc.mjs +6 -6
  106. package/assets/docs/tree/codemods.doc.mjs +7 -7
  107. package/assets/docs/tree/component-family.doc.mjs +1 -1
  108. package/assets/docs/tree/component-imports.doc.mjs +2 -2
  109. package/assets/docs/tree/component-lookups.doc.mjs +6 -5
  110. package/assets/docs/tree/computer-agent-guide.doc.mjs +7 -7
  111. package/assets/docs/tree/computer-integrations.doc.mjs +5 -5
  112. package/assets/docs/tree/debug-and-gap-reports.doc.mjs +3 -3
  113. package/assets/docs/tree/define-the-theme.doc.mjs +1 -1
  114. package/assets/docs/tree/describe-the-component.doc.mjs +1 -1
  115. package/assets/docs/tree/doc-syntax.doc.mjs +219 -0
  116. package/assets/docs/tree/export-template-assets.doc.mjs +1 -1
  117. package/assets/docs/tree/extend-or-replace.doc.mjs +39 -7
  118. package/assets/docs/tree/font-setup.doc.mjs +1 -1
  119. package/assets/docs/tree/generate-a-palette.doc.mjs +1 -1
  120. package/assets/docs/tree/global-integrations.doc.mjs +11 -11
  121. package/assets/docs/tree/global.doc.mjs +2 -2
  122. package/assets/docs/tree/host-entry.doc.mjs +1 -1
  123. package/assets/docs/tree/install-once.doc.mjs +4 -4
  124. package/assets/docs/tree/layout.doc.mjs +1 -1
  125. package/assets/docs/tree/links.doc.mjs +2 -2
  126. package/assets/docs/tree/migration-setup.doc.mjs +15 -15
  127. package/assets/docs/tree/migration.doc.mjs +2 -1
  128. package/assets/docs/tree/other-libraries.doc.mjs +1 -1
  129. package/assets/docs/tree/page-template.doc.mjs +2 -2
  130. package/assets/docs/tree/problems.doc.mjs +8 -8
  131. package/assets/docs/tree/project-global-or-both.doc.mjs +2 -2
  132. package/assets/docs/tree/publishing.doc.mjs +7 -7
  133. package/assets/docs/tree/quick-start.doc.mjs +9 -9
  134. package/assets/docs/tree/reference.doc.mjs +2 -2
  135. package/assets/docs/tree/replace-a-core-component.doc.mjs +1 -1
  136. package/assets/docs/tree/replace-a-core-template.doc.mjs +4 -4
  137. package/assets/docs/tree/scaffold.doc.mjs +1 -1
  138. package/assets/docs/tree/sections-and-placement.doc.mjs +3 -3
  139. package/assets/docs/tree/see-it-in-an-app.doc.mjs +3 -3
  140. package/assets/docs/tree/short-and-findable.doc.mjs +3 -3
  141. package/assets/docs/tree/single-component.doc.mjs +4 -4
  142. package/assets/docs/tree/start-a-template.doc.mjs +5 -5
  143. package/assets/docs/tree/styling-advanced.doc.mjs +1 -1
  144. package/assets/docs/tree/styling-libraries.doc.mjs +2 -1
  145. package/assets/docs/tree/styling.doc.mjs +1 -1
  146. package/assets/docs/tree/tailwind.doc.mjs +1 -1
  147. package/assets/docs/tree/test-in-an-app.doc.mjs +5 -5
  148. package/assets/docs/tree/test-template-in-app.doc.mjs +6 -6
  149. package/assets/docs/tree/tokens-and-setup.doc.mjs +1 -1
  150. package/assets/docs/tree/troubleshooting.doc.mjs +24 -20
  151. package/assets/docs/tree/uninstall.doc.mjs +2 -2
  152. package/assets/docs/tree/updates.doc.mjs +1 -1
  153. package/assets/docs/tree/upgrading.doc.mjs +3 -3
  154. package/assets/docs/tree/use-a-theme-in-an-app.doc.mjs +1 -1
  155. package/assets/docs/tree/verify-packed-template.doc.mjs +3 -3
  156. package/assets/docs/tree/versioning.doc.mjs +4 -4
  157. package/assets/docs/tree/who-answers.doc.mjs +4 -4
  158. package/assets/docs/tree/write-the-template-file.doc.mjs +4 -4
  159. package/assets/docs/use-a-theme.doc.mjs +10 -10
  160. package/assets/docs/use-integrations.doc.mjs +1 -1
  161. package/assets/docs/working-with-ai.doc.mjs +15 -15
  162. package/assets/templates/blocks/components/BottomSheet/BottomSheetSwitcherReviewFlow.doc.mjs +1 -1
  163. package/assets/templates/blocks/components/BottomSheet/BottomSheetSwitcherShowcase.doc.mjs +1 -1
  164. package/assets/templates/themes/butter/butterPaletteRefs.generated.ts +54 -0
  165. package/assets/templates/themes/butter/butterPalettes.generated.receipt.json +1499 -0
  166. package/assets/templates/themes/butter/butterPalettes.generated.ts +550 -0
  167. package/assets/templates/themes/butter/butterTheme.ts +274 -234
  168. package/assets/templates/themes/butter/palette.config.json +484 -0
  169. package/assets/templates/themes/gothic/gothicPaletteRefs.generated.ts +41 -0
  170. package/assets/templates/themes/gothic/gothicPalettes.generated.receipt.json +979 -0
  171. package/assets/templates/themes/gothic/gothicPalettes.generated.ts +271 -0
  172. package/assets/templates/themes/gothic/gothicTheme.ts +130 -160
  173. package/assets/templates/themes/gothic/palette.config.json +371 -0
  174. package/assets/templates/themes/matcha/matchaPaletteRefs.generated.ts +51 -0
  175. package/assets/templates/themes/matcha/matchaPalettes.generated.receipt.json +1502 -0
  176. package/assets/templates/themes/matcha/matchaPalettes.generated.ts +501 -0
  177. package/assets/templates/themes/matcha/matchaPalettes.ts +21 -0
  178. package/assets/templates/themes/matcha/matchaTheme.ts +164 -103
  179. package/assets/templates/themes/matcha/palette.config.json +448 -0
  180. package/assets/templates/themes/stone/palette.config.json +262 -0
  181. package/assets/templates/themes/stone/stonePaletteRefs.generated.ts +51 -0
  182. package/assets/templates/themes/stone/stonePalettes.generated.receipt.json +840 -0
  183. package/assets/templates/themes/stone/stonePalettes.generated.ts +501 -0
  184. package/assets/templates/themes/stone/stoneTheme.ts +190 -207
  185. package/assets/templates/themes/y2k/palette.config.json +166 -0
  186. package/assets/templates/themes/y2k/y2kPaletteRefs.generated.ts +54 -0
  187. package/assets/templates/themes/y2k/y2kPalettes.generated.receipt.json +872 -0
  188. package/assets/templates/themes/y2k/y2kPalettes.generated.ts +550 -0
  189. package/assets/templates/themes/y2k/y2kPalettes.ts +257 -0
  190. package/assets/templates/themes/y2k/y2kTheme.ts +164 -391
  191. package/authoring/codemod/codemod.doc.mjs +1 -1
  192. package/authoring/config/config.doc.mjs +4 -4
  193. package/authoring/debug/parse.d.mts +1 -1
  194. package/authoring/discover/discover.doc.mjs +1 -1
  195. package/authoring/doctypes/_schema.d.mts +4 -0
  196. package/authoring/doctypes/_schema.mjs +4 -0
  197. package/authoring/doctypes/reference/type.ts +14 -2
  198. package/authoring/gap-report/gap-report.doc.mjs +1 -1
  199. package/authoring/integration/integration.doc.mjs +6 -6
  200. package/clients/cli/commands/discover.mjs +1 -1
  201. package/clients/cli/commands/discover.sources.test.mjs +6 -0
  202. package/clients/cli/commands/docs.doc.mjs +1 -1
  203. package/clients/cli/commands/docs.mjs +27 -2
  204. package/clients/cli/commands/docs.test.mjs +1 -1
  205. package/clients/cli/commands/doctor-integration-docs.doc.mjs +1 -1
  206. package/clients/cli/commands/doctor.doc.mjs +13 -1
  207. package/clients/cli/commands/doctor.mjs +25 -9
  208. package/clients/cli/commands/integration-check.doc.mjs +11 -0
  209. package/clients/cli/commands/integration-check.test.mjs +36 -3
  210. package/clients/cli/commands/integration-pack.doc.mjs +1 -1
  211. package/clients/cli/commands/integration-verify.doc.mjs +1 -1
  212. package/clients/cli/commands/integration.mjs +15 -3
  213. package/clients/cli/commands/theme-targets.doc.mjs +1 -1
  214. package/clients/cli/commands/upgrade.doc.mjs +2 -2
  215. package/clients/cli/lib/define-command.mjs +5 -3
  216. package/foundation/agent-docs/agent-docs.d.mts +14 -2
  217. package/foundation/agent-docs/agent-docs.mjs +65 -4
  218. package/foundation/agent-docs/agent-docs.test.mjs +107 -0
  219. package/foundation/discovery/docs-discovery.d.mts +93 -2
  220. package/foundation/discovery/docs-discovery.mjs +237 -8
  221. package/foundation/discovery/runner-allowlist.d.mts +2 -0
  222. package/foundation/discovery/runner-allowlist.mjs +4 -0
  223. package/foundation/discovery/runner-commands.d.mts +29 -13
  224. package/foundation/discovery/runner-commands.mjs +253 -17
  225. package/foundation/discovery/stray-pointers.mjs +11 -5
  226. package/foundation/discovery/stray-pointers.test.mjs +6 -0
  227. package/foundation/doc-compiler/compile.mjs +8 -1
  228. package/foundation/doc-compiler/doc-loads.test.mjs +3 -0
  229. package/foundation/doc-compiler/doc-syntax.d.mts +194 -0
  230. package/foundation/doc-compiler/doc-syntax.mjs +739 -0
  231. package/foundation/doc-compiler/doc-syntax.test.mjs +383 -0
  232. package/foundation/doc-compiler/links.d.mts +13 -16
  233. package/foundation/doc-compiler/links.mjs +40 -7
  234. package/foundation/doc-compiler/tree.d.mts +5 -0
  235. package/foundation/doc-compiler/tree.mjs +9 -0
  236. package/foundation/env/package-manager.d.mts +18 -0
  237. package/foundation/env/package-manager.mjs +40 -0
  238. package/foundation/integrations/cli-requirement.d.mts +29 -0
  239. package/foundation/integrations/cli-requirement.mjs +47 -0
  240. package/foundation/integrations/cli-requirement.test.mjs +23 -2
  241. package/foundation/response/error-codes.test.mjs +9 -0
  242. package/foundation/response/response-types.doc.mjs +11 -11
  243. package/foundation/response/response-types.doc.test.mjs +29 -0
  244. package/package.json +9 -9
@@ -15,8 +15,8 @@ export const docs = {
15
15
  title: 'Custom themes',
16
16
  content: [
17
17
  {type: 'prose', text: "Use an installed built theme as the base for ordinary customization. Import it into your source and pass it as `extends` to `defineTheme({extends: importedTheme, ...})`. Build the result, then add the local slug. Only eject when you need to own and maintain a full source fork."},
18
- {type: 'code', lang: 'bash', label: 'Add to use, eject to fork', code: 'astryx theme list\nastryx theme add stone\nastryx theme eject stone\nastryx theme build src/themes/stone/stoneTheme.ts\nastryx theme add stone'},
19
- {type: 'prose', text: "For an annotated map of the whole surface (every defineTheme field, the token families, and the component override syntax, each with the CLI command that prints its reference), run `astryx theme template`. It writes `theme.template.ts` into your project to read and copy from (`astryx init --features theme` writes it as part of project setup)."},
18
+ {type: 'code', lang: 'bash', label: 'Add to use, eject to fork', code: '{@command theme list}\n{@command theme add stone}\n{@command theme eject stone}\n{@command theme build src/themes/stone/stoneTheme.ts}\n{@command theme add stone}'},
19
+ {type: 'prose', text: "For an annotated map of the whole surface (every defineTheme field, the token families, and the component override syntax, each with the CLI command that prints its reference), run `{@command theme template}`. It writes `theme.template.ts` into your project to read and copy from (`{@command init --features theme}` writes it as part of project setup)."},
20
20
  {type: 'prose', text: 'To apply a theme you created, see {@link generic:use-a-theme}. To generate colors from seed values, see the Palette section below. Before you eject a package theme instead, see when that fits in {@link generic:use-a-theme}.'},
21
21
  ],
22
22
  },
@@ -26,9 +26,9 @@ export const docs = {
26
26
  content: [
27
27
  {type: 'prose', text: 'Name a few seed colors and generate every shade a theme needs, light and dark; {@link generic:generate-a-palette} explains what a palette holds.'},
28
28
  {type: 'code', lang: 'json', label: 'Minimal palette config (palette.config.json)', code: '{"families": [{"id": "ocean", "seed": "#0074e2"}]}'},
29
- {type: 'code', lang: 'bash', label: 'Generate and preview', code: '# Print the palette without writing files\nastryx theme palette generate palette.config.json\n\n# Write palette + receipt, and open a visual preview\nastryx theme palette generate palette.config.json \\\n --out src/themes/ocean/tokens/ocean.palette.ts \\\n --preview preview.html'},
29
+ {type: 'code', lang: 'bash', label: 'Generate and preview', code: '# Print the palette without writing files\n{@command theme palette generate palette.config.json}\n\n# Write palette + receipt, and open a visual preview\n{@command theme palette generate palette.config.json} \\\n --out src/themes/ocean/tokens/ocean.palette.ts \\\n --preview preview.html'},
30
30
  {type: 'prose', text: "The command writes a `.ts` file exporting 21 shades (stops 0–100) for both light and dark, plus a `.receipt.json` to regenerate later. Point your theme's tokens at the palette, then run defineTheme (see below)."},
31
- {type: 'prose', text: 'For the full palette config fields and CLI flags, run `astryx docs cli/commands/theme-palette-generate`. For the integration-authoring walkthrough of connecting a palette to theme tokens, run `astryx docs authoring/building-blocks/themes/generate-a-palette`.'},
31
+ {type: 'prose', text: 'For the full palette config fields and CLI flags, run `{@command docs cli/commands/theme-palette-generate}`. For the integration-authoring walkthrough of connecting a palette to theme tokens, run `{@command docs authoring/building-blocks/themes/generate-a-palette}`.'},
32
32
  ],
33
33
  },
34
34
  {
@@ -60,8 +60,8 @@ export const docs = {
60
60
  ['typography, motion, radius, color', 'Child config replaces base entirely (these are scale inputs, not additive).'],
61
61
  ['adaptations', 'Width-breakpoint overrides merge by fixed name. Inherited ordered rules keep their relative order; child rules append and re-resolve against the child root axes.'],
62
62
  ]},
63
- {type: 'prose', text: "Inheritance is resolved when the theme is defined, so an extended theme is flat: `astryx theme build` emits one self-contained stylesheet holding everything the child inherited, and the base theme's CSS does not need to be loaded next to it. A base that is not a theme (most often an import that missed) throws when `defineTheme` runs, rather than producing a theme that silently inherits nothing."},
64
- {type: 'prose', text: 'For the integration-specific guidance on mapping a palette to tokens when extending, see `astryx docs authoring/building-blocks/themes/define-the-theme`.'},
63
+ {type: 'prose', text: "Inheritance is resolved when the theme is defined, so an extended theme is flat: `{@command theme build}` emits one self-contained stylesheet holding everything the child inherited, and the base theme's CSS does not need to be loaded next to it. A base that is not a theme (most often an import that missed) throws when `defineTheme` runs, rather than producing a theme that silently inherits nothing."},
64
+ {type: 'prose', text: 'For the integration-specific guidance on mapping a palette to tokens when extending, see `{@command docs authoring/building-blocks/themes/define-the-theme}`.'},
65
65
  ],
66
66
  },
67
67
  {
@@ -69,15 +69,15 @@ export const docs = {
69
69
  content: [
70
70
  {type: 'prose', text: 'The `components` field in defineTheme uses semantic component keys and style keys, not raw CSS selectors. Use `base` for all instances, `variant:value` or `stateName` for specific props/states, and let the theme pipeline choose the underlying selector. For raw external CSS escape hatches, prefer the data-attribute selector surface documented in {@link generic:styling-advanced}.'},
71
71
  {type: 'code', lang: 'tsx', label: 'Component overrides with standard CSS', code: "components: {\n card: {\n base: { borderRadius: '20px', padding: '24px' },\n },\n button: {\n base: {\n borderRadius: '9999px',\n textTransform: 'uppercase',\n '--button-focus-offset': '3px',\n },\n 'variant:ghost': { borderWidth: '2px', borderStyle: 'solid' },\n },\n}"},
72
- {type: 'prose', text: "Run `astryx theme targets` for every themeable key in the system (`astryx theme targets <Name>` to scope it, `--json` to lint a theme against it), and `astryx component <Name>` for one component's theming targets, public CSS variables, and which standard CSS properties are supported."},
72
+ {type: 'prose', text: "Run `{@command theme targets}` for every themeable key in the system (`{@command theme targets <Name>}` to scope it, `--json` to lint a theme against it), and `{@command component <Name>}` for one component's theming targets, public CSS variables, and which standard CSS properties are supported."},
73
73
  {type: 'list', style: 'do', items: ['Write standard CSS properties (borderRadius, padding); the pipeline expands them into internal vars.', 'Set public CSS vars directly when no standard property equivalent exists.']},
74
- {type: 'list', style: 'dont', items: ['Set private CSS vars (prefixed --_) directly. Use standard CSS properties instead. `astryx theme build` will error.', 'Set a public CSS var the component does not define. It compiles to CSS that never applies, and the build does not warn. Take the names from `astryx component <Name>`.']},
74
+ {type: 'list', style: 'dont', items: ['Set private CSS vars (prefixed --_) directly. Use standard CSS properties instead. `{@command theme build}` will error.', 'Set a public CSS var the component does not define. It compiles to CSS that never applies, and the build does not warn. Take the names from `{@command component <Name>}`.']},
75
75
  ],
76
76
  },
77
77
  {
78
78
  title: 'Custom Variants',
79
79
  content: [
80
- {type: 'prose', text: "Themes can add new prop values to any component. Any `prop:value` key where the value isn't a built-in gets treated as a new variant. Use `astryx theme build` to generate TypeScript augmentations for type safety."},
80
+ {type: 'prose', text: "Themes can add new prop values to any component. Any `prop:value` key where the value isn't a built-in gets treated as a new variant. Use `{@command theme build}` to generate TypeScript augmentations for type safety."},
81
81
  {type: 'code', lang: 'tsx', label: 'Adding custom variants', code: "components: {\n button: {\n 'variant:secondary': { backgroundColor: 'rgba(0,0,0,0.06)' },\n 'variant:primary-muted': {\n backgroundColor: 'light-dark(#F2F4F6, #28292C)',\n color: 'var(--color-text-primary)',\n },\n },\n banner: {\n 'status:neutral': {\n backgroundColor: 'var(--color-background-muted)',\n color: 'var(--color-text-secondary)',\n },\n },\n}"},
82
82
  {type: 'code', lang: 'tsx', label: 'Using custom variants', code: "// TypeScript knows about 'primary-muted' after astryx theme build\n<Button variant=\"primary-muted\" label=\"Save draft\" />\n<Banner status=\"neutral\" title=\"Note\" />"},
83
83
  {type: 'prose', text: "Custom variants only work when the theme that defines them is active. The component's variant map is extended via module augmentation, with no changes to the component source needed."},
@@ -104,15 +104,15 @@ export const docs = {
104
104
  {type: 'prose', text: "Precedence follows rule order. Root theme values apply first, then every matching rule in declaration order. A later rule may deliberately restore a root value. `onDark` and `onLight` media-surface overrides apply after adaptations and win on the same leaf."},
105
105
  {type: 'prose', text: "`extends` preserves the base rule order and appends child rules. Inherited conditions use the child's effective breakpoint map. An empty child rule is a no-op, not a removal operator."},
106
106
  {type: 'prose', text: "A rule may replace a theme-local token only when the exact name is already enrolled by root `localTokens` or an enrolled base. Component writes in a rule are validated exactly like root `components`: same targets, axes, and value domains. The one addition is that a rule may not be the only place a custom value is enrolled: a value that is valid only because a theme enrolls it generates unconditional type augmentation, so declare it on the root theme first and let rules restyle it. Built-in values need no root declaration. When rules can match together, their ordered portable and local token writes are validated as one effective graph; any reachable cycle fails before CSS is emitted."},
107
- {type: 'prose', text: 'Adaptations compile to CSS media queries with no resize listener or styling rerender. Runtime and `astryx theme build` use the same compiler, but only a built theme is present at first paint in an SSR app.'},
107
+ {type: 'prose', text: 'Adaptations compile to CSS media queries with no resize listener or styling rerender. Runtime and `{@command theme build}` use the same compiler, but only a built theme is present at first paint in an SSR app.'},
108
108
  ],
109
109
  },
110
110
  {
111
111
  id: 'building-themes-for-production',
112
112
  title: 'Build a theme',
113
113
  content: [
114
- {type: 'prose', text: '`astryx theme build` compiles a defineTheme file into production-ready artifacts. Recommended for SSR apps (Next.js, Remix) where styles must be present on first paint.'},
115
- {type: 'code', lang: 'bash', label: 'Build a theme', code: 'astryx theme build ./src/themes/ocean.ts'},
114
+ {type: 'prose', text: '`{@command theme build}` compiles a defineTheme file into production-ready artifacts. Recommended for SSR apps (Next.js, Remix) where styles must be present on first paint.'},
115
+ {type: 'code', lang: 'bash', label: 'Build a theme', code: '{@command theme build ./src/themes/ocean.ts}'},
116
116
  {type: 'table', headers: ['File', 'Description'], rows: [
117
117
  ['ocean.css', 'Pre-compiled CSS with token overrides, component overrides, and prose element styles in @scope rules'],
118
118
  ['ocean.js', 'ES module exporting the theme object with `__built: true` and pre-resolved token values.'],
@@ -121,7 +121,7 @@ export const docs = {
121
121
  ]},
122
122
  {type: 'prose', text: 'The `__built: true` flag tells Theme to skip runtime `<style>` injection; the CSS file handles it. Load the generated CSS wherever you load the module.'},
123
123
  {type: 'code', lang: 'tsx', label: 'Using a custom built theme', code: "import {Theme} from '@astryxdesign/core/theme';\nimport {oceanTheme} from './themes/ocean';\nimport './themes/ocean.css';\n\n<Theme theme={oceanTheme}>\n <App />\n</Theme>"},
124
- {type: 'prose', text: "After upgrading Astryx, rerun `astryx theme build` for every custom prebuilt theme. Deploy the regenerated files together. The runtime intentionally trusts `__built: true` and will not repair stale CSS from an older build. The build also warns when the theme names font families it does not load. See {@link generic:font-setup} for the full recipe."},
124
+ {type: 'prose', text: "After upgrading Astryx, rerun `{@command theme build}` for every custom prebuilt theme. Deploy the regenerated files together. The runtime intentionally trusts `__built: true` and will not repair stale CSS from an older build. The build also warns when the theme names font families it does not load. See {@link generic:font-setup} for the full recipe."},
125
125
  {type: 'prose', text: 'For the runtime vs built tradeoff, see the Runtime vs Built section of {@link generic:use-a-theme}.'},
126
126
  ],
127
127
  },
@@ -130,7 +130,7 @@ export const docs = {
130
130
  title: 'Built themes with an icon registry',
131
131
  content: [
132
132
  {type: 'prose', text: "`theme build` emits an icon import when it detects a named import used by the theme's `icons:` field. It does not compile that registry module. Move the registry to a separate module and use a named import."},
133
- {type: 'code', lang: 'bash', label: 'Compiling the icon registry sidecar', code: "# Emit the built theme\nastryx theme build ./src/themes/ocean.ts -o dist/theme.css --icons-specifier ./icons.mjs\n\n# Compile the icon registry alongside it\nesbuild src/themes/icons.tsx --bundle --format=esm --outfile=dist/icons.mjs \\\n --external:react --external:lucide-react --jsx=automatic"},
133
+ {type: 'code', lang: 'bash', label: 'Compiling the icon registry sidecar', code: "# Emit the built theme\n{@command theme build ./src/themes/ocean.ts -o dist/theme.css --icons-specifier ./icons.mjs}\n\n# Compile the icon registry alongside it\nesbuild src/themes/icons.tsx --bundle --format=esm --outfile=dist/icons.mjs \\\n --external:react --external:lucide-react --jsx=automatic"},
134
134
  {type: 'prose', text: 'In the example above, the generated theme imports `./icons.mjs` from `dist`. If the second command is skipped, `theme build` can still succeed, but loading or bundling the generated module fails because `dist/icons.mjs` is missing. `--icons-specifier` changes the emitted import; it does not create or verify the target file. Match the specifier to a module that resolves from the generated JS file.'},
135
135
  {type: 'prose', text: 'Without `--icons-specifier`, the detected source import specifier is emitted unchanged. In the default flow without `--out`, a bundler can resolve an extensionless `./icons` to the neighboring `icons.tsx` source, but Node ESM does not perform that lookup and reports `ERR_MODULE_NOT_FOUND`. Moving the output with `--out` also changes where relative imports resolve from.'},
136
136
  {type: 'prose', text: 'Keep `react` and the icon library external so the registry does not bundle its own copies of those dependencies.'},
@@ -140,7 +140,7 @@ export const docs = {
140
140
  title: 'Building a Theme Family',
141
141
  content: [
142
142
  {type: 'prose', text: 'Use family mode when an app switches among one base theme and its selected descendants. The build writes one keyed CSS file containing every member, plus one keyed JavaScript module and one declaration file, beside the root source.'},
143
- {type: 'code', lang: 'bash', label: 'Build one family', code: "astryx theme build --family \\\n ./src/themes/ocean.mjs \\\n ./src/themes/ocean-calm.mjs \\\n ./src/themes/ocean-calm-deep.mjs \\\n --family-key ocean-family"},
143
+ {type: 'code', lang: 'bash', label: 'Build one family', code: "{@command theme build} --family \\\n ./src/themes/ocean.mjs \\\n ./src/themes/ocean-calm.mjs \\\n ./src/themes/ocean-calm-deep.mjs \\\n --family-key ocean-family"},
144
144
  {type: 'prose', text: 'The family stylesheet eagerly downloads every selected member so first paint is complete. Switching members changes only the theme identity; it does not add, remove, or reorder stylesheets.'},
145
145
  ],
146
146
  },
@@ -4,7 +4,7 @@
4
4
 
5
5
  export const docs = {
6
6
  name: 'browser-support',
7
- title: 'Browser Support',
7
+ title: 'Browser support',
8
8
  category: 'guide',
9
9
  description:
10
10
  'What browsers Astryx targets, which modern platform features it depends on, and how to support older browsers for your own audience.',
@@ -21,7 +21,7 @@ export const docs = {
21
21
  type: 'code',
22
22
  lang: 'text',
23
23
  label: 'Set up the design system',
24
- code: 'Install @astryxdesign/core, @stylexjs/stylex, @astryxdesign/theme-neutral, and @astryxdesign/cli in this project, then run `astryx init` to set up agent docs. Read the generated files to learn the conventions.',
24
+ code: 'Install @astryxdesign/core, @stylexjs/stylex, @astryxdesign/theme-neutral, and @astryxdesign/cli in this project, then run `{@command init}` to set up agent docs. Read the generated files to learn the conventions.',
25
25
  },
26
26
  {
27
27
  type: 'prose',
@@ -31,7 +31,7 @@ export const docs = {
31
31
  type: 'code',
32
32
  lang: 'text',
33
33
  label: 'Give it a look',
34
- code: 'Ask me what look and feel this app should have. Run `astryx theme list`, install the closest theme package, and run `theme add <slug>`; use `--package` when owners share a slug. Import `themes` and `defaultThemeSlug` from the generated module once and pass `themes[defaultThemeSlug]` to `<Theme>`. Customize with `defineTheme({extends: importedTheme, ...})`. Use `theme eject` only when I ask for an independent source fork. Default to neutral if I have no preference, and show me the result before moving on.',
34
+ code: 'Ask me what look and feel this app should have. Run `{@command theme list}`, install the closest theme package, and run `theme add <slug>`; use `--package` when owners share a slug. Import `themes` and `defaultThemeSlug` from the generated module once and pass `themes[defaultThemeSlug]` to `<Theme>`. Customize with `defineTheme({extends: importedTheme, ...})`. Use `theme eject` only when I ask for an independent source fork. Default to neutral if I have no preference, and show me the result before moving on.',
35
35
  },
36
36
  ],
37
37
  },
@@ -50,17 +50,17 @@ export const docs = {
50
50
  type: 'code',
51
51
  lang: 'bash',
52
52
  label: 'Terminal',
53
- code: `npm install @astryxdesign/core @stylexjs/stylex @astryxdesign/theme-neutral @astryxdesign/cli`,
53
+ code: `{@pm install @astryxdesign/core @stylexjs/stylex @astryxdesign/theme-neutral @astryxdesign/cli}`,
54
54
  },
55
55
  {
56
56
  type: 'prose',
57
- text: "Then run `astryx init` to install the AI agent cheat sheet (AGENTS.md/CLAUDE.md). It's non-interactive; no prompts; so it's safe for AI agents, CI, and scripts. Add `--all` for pointers to the theme and page-building workflows.",
57
+ text: "Then run `{@command init}` to install the AI agent cheat sheet (AGENTS.md/CLAUDE.md). It's non-interactive; no prompts; so it's safe for AI agents, CI, and scripts. Add `--all` for pointers to the theme and page-building workflows.",
58
58
  },
59
59
  {
60
60
  type: 'code',
61
61
  lang: 'bash',
62
62
  label: 'Terminal',
63
- code: `astryx init`,
63
+ code: `{@command init}`,
64
64
  },
65
65
  ],
66
66
  },
@@ -76,7 +76,7 @@ export const docs = {
76
76
  type: 'code',
77
77
  lang: 'bash',
78
78
  label: 'Terminal',
79
- code: `npm i -g @astryxdesign/cli`,
79
+ code: `{@pm install @astryxdesign/cli --global}`,
80
80
  },
81
81
  {
82
82
  type: 'prose',
@@ -89,7 +89,7 @@ export const docs = {
89
89
  content: [
90
90
  {
91
91
  type: 'prose',
92
- text: 'Import the reset and base styles in your global CSS. Then run `astryx theme add neutral`; the generated app module imports the theme’s production CSS and font CSS.',
92
+ text: 'Import the reset and base styles in your global CSS. Then run `{@command theme add neutral}`; the generated app module imports the theme’s production CSS and font CSS.',
93
93
  },
94
94
  {
95
95
  type: 'code',
@@ -100,7 +100,7 @@ export const docs = {
100
100
  },
101
101
  {
102
102
  type: 'prose',
103
- text: 'Run `astryx theme list` to see every theme.',
103
+ text: 'Run `{@command theme list}` to see every theme.',
104
104
  },
105
105
  {
106
106
  type: 'code',
@@ -139,7 +139,7 @@ import {themes, defaultThemeSlug} from './astryx-themes';
139
139
  content: [
140
140
  {
141
141
  type: 'prose',
142
- text: 'Import each component from its own entry, the path `astryx component <Name>` prints. This keeps bundles small and makes intent clear.',
142
+ text: 'Import each component from its own entry, the path `{@command component <Name>}` prints. This keeps bundles small and makes intent clear.',
143
143
  },
144
144
  {
145
145
  type: 'code',
@@ -218,8 +218,8 @@ const overrides = stylex.create({
218
218
  label: 'Clone and run an example',
219
219
  code: `git clone https://github.com/facebook/astryx.git
220
220
  cd astryx/apps/example-nextjs
221
- pnpm install
222
- pnpm dev`,
221
+ {@pm install}
222
+ {@pm run dev}`,
223
223
  },
224
224
  ],
225
225
  },
@@ -246,11 +246,11 @@ pnpm dev`,
246
246
  type: 'code',
247
247
  lang: 'bash',
248
248
  label: 'Terminal',
249
- code: `astryx component # list all components
250
- astryx component Button # props, usage, theming for Button
251
- astryx docs # list all doc topics
252
- astryx template --list # available page templates
253
- astryx docs tokens # spacing, color, radius reference`,
249
+ code: `{@command component} # list all components
250
+ {@command component Button} # props, usage, theming for Button
251
+ {@command docs} # list all doc topics
252
+ {@command template --list} # available page templates
253
+ {@command docs tokens} # spacing, color, radius reference`,
254
254
  },
255
255
  ],
256
256
  },
@@ -41,7 +41,7 @@ export const docs = {
41
41
  'Trace where the surface sits: its route, entry point, navigation path, parent shell, and the page or block pattern it is meant to use.',
42
42
  'Inspect sibling surfaces that do the same or adjacent jobs. Record their shared headers, actions, layout primitives, spacing, density, states, and narrow-screen behavior.',
43
43
  'Read project guidance, including the root and relevant nested `AGENTS.md` files. Record app-owned wrapper components and intentional app conventions.',
44
- 'Record the installed `@astryxdesign/core`, `@astryxdesign/cli`, and integration-package versions from the project manifest and lockfile. Run the installed invocation of `astryx component --list` to see core and integration components, then inspect app-owned wrappers that do not appear in that catalog.',
44
+ 'Record the installed `@astryxdesign/core`, `@astryxdesign/cli`, and integration-package versions from the project manifest and lockfile. Run the installed invocation of `{@command component --list}` to see core and integration components, then inspect app-owned wrappers that do not appear in that catalog.',
45
45
  'List the real data states, roles and permissions, supported locales and RTL behavior, and mobile or narrow-width needs that affect the task.',
46
46
  ],
47
47
  },
@@ -179,10 +179,10 @@ export const docs = {
179
179
  "Compare the route with sibling surfaces that do the same job. Identify the app's shared header, actions, shell, page pattern, spacing, and density before judging the target.",
180
180
  'Inspect every JSX opening tag. Moving raw HTML behind a PascalCase helper does not make the underlying pattern an Astryx component.',
181
181
  'Count every raw SVG element used as an icon, including `svg`, `path`, `circle`, `rect`, `line`, `polyline`, `polygon`, `ellipse`, and `g`. For an inline SVG helper, count its raw SVG elements once in the helper definition, not again at each render. Count each icon-library component rendered directly outside an Astryx icon surface.',
182
- 'Look up a possible replacement with `astryx component <Name> --dense`. Do not invent a component or prop that the installed version does not provide.',
183
- 'Run the installed `astryx component --list` and inspect app-owned wrappers before rebuilding a pattern. Prefer the component the app or one of its installed integrations already uses for the job.',
182
+ 'Look up a possible replacement with `{@command component <Name> --dense}`. Do not invent a component or prop that the installed version does not provide.',
183
+ 'Run the installed `{@command component --list}` and inspect app-owned wrappers before rebuilding a pattern. Prefer the component the app or one of its installed integrations already uses for the job.',
184
184
  'Inspect every `stylex.create` declaration, inline style, `className`, and `stylex.props` use. Look for a component prop or token first.',
185
- "When replacing a literal spacing value, read `astryx docs spacing --full` for the matching step or token and the target component doc for the prop's accepted scale. Do not guess a pixel-to-step mapping.",
185
+ "When replacing a literal spacing value, read `{@command docs spacing --full}` for the matching step or token and the target component doc for the prop's accepted scale. Do not guess a pixel-to-step mapping.",
186
186
  'Choose the root that matches the surface. Use `Layout` for a page, `Center` for centered content, and `AppShell` only when the surface owns global application chrome.',
187
187
  'Render realistic empty, loading, error, long-content, and interactive states. Check narrow and wide widths plus each supported color mode.',
188
188
  'Verify the target roles and permissions, supported locales and RTL behavior, and mobile needs. Follow the real task from entry to completion instead of judging only the static page.',
@@ -205,11 +205,11 @@ export const docs = {
205
205
  items: [
206
206
  'Record the exact revision, named surface, route, and source files in scope. If the files are outside version control, record a content hash for each file and say that no project revision was available.',
207
207
  "Write down the app's purpose, target users, surface task, entry point, navigation path, parent shell, expected page pattern, and sibling surfaces used for comparison.",
208
- 'Record project guidance, theme, density, installed Astryx and integration versions, the relevant output of `astryx component --list`, and app-owned wrappers or conventions.',
208
+ 'Record project guidance, theme, density, installed Astryx and integration versions, the relevant output of `{@command component --list}`, and app-owned wrappers or conventions.',
209
209
  'List the states and context that matter, including real data shapes, roles and permissions, empty, loading, error, long content, interaction, narrow width, wide width, supported color modes, locales, and RTL behavior when they apply.',
210
210
  'Run the product and capture each named rendered state. Use screenshots or a live browser result for visible claims, and follow the target user task from entry to completion.',
211
211
  'Run the build, type check, tests, and accessibility checks. Keep their commands and results with the review.',
212
- 'For each Astryx component whose replacement, prop, or composition is in question, read `astryx component <Name> --dense`.',
212
+ 'For each Astryx component whose replacement, prop, or composition is in question, read `{@command component <Name> --dense}`.',
213
213
  ],
214
214
  },
215
215
  ],
@@ -67,7 +67,7 @@ export const docs = {
67
67
  type: 'code',
68
68
  lang: 'bash',
69
69
  label: 'Install',
70
- code: 'npm install @astryxdesign/core @stylexjs/stylex @astryxdesign/theme-neutral',
70
+ code: '{@pm install @astryxdesign/core @stylexjs/stylex @astryxdesign/theme-neutral}',
71
71
  },
72
72
  {
73
73
  type: 'code',
@@ -79,7 +79,7 @@ export const docs = {
79
79
  },
80
80
  {
81
81
  type: 'prose',
82
- text: "Done. Components work out of the box \u2014 style them with `className`, `xstyle`, or `style`. Swap `theme-neutral` for any theme package (`astryx theme list` shows what's available).",
82
+ text: "Done. Components work out of the box \u2014 style them with `className`, `xstyle`, or `style`. Swap `theme-neutral` for any theme package (`{@command theme list}` shows what's available).",
83
83
  },
84
84
  ],
85
85
  },
@@ -91,7 +91,7 @@ export const docs = {
91
91
  type: 'code',
92
92
  lang: 'bash',
93
93
  label: 'Install (add to an existing Tailwind v4 app)',
94
- code: 'npm install @astryxdesign/core @stylexjs/stylex @astryxdesign/theme-neutral',
94
+ code: '{@pm install @astryxdesign/core @stylexjs/stylex @astryxdesign/theme-neutral}',
95
95
  },
96
96
  {
97
97
  type: 'code',
@@ -123,13 +123,13 @@ export const docs = {
123
123
  content: [
124
124
  {
125
125
  type: 'prose',
126
- text: 'Only needed when you write your own StyleX (`stylex.create()`) or swizzle a component (`astryx swizzle <Component>`), which copies its StyleX source into your app. The plain path already supports `xstyle` overrides \u2014 this path is for your own StyleX code. Some built-in page templates also use StyleX for layout; if you scaffold one and see "Unexpected stylex.create call at runtime", add the compiler plugin for your bundler below.',
126
+ text: 'Only needed when you write your own StyleX (`stylex.create()`) or swizzle a component (`{@command swizzle <Component>}`), which copies its StyleX source into your app. The plain path already supports `xstyle` overrides \u2014 this path is for your own StyleX code. Some built-in page templates also use StyleX for layout; if you scaffold one and see "Unexpected stylex.create call at runtime", add the compiler plugin for your bundler below.',
127
127
  },
128
128
  {
129
129
  type: 'code',
130
130
  lang: 'bash',
131
131
  label: 'Install',
132
- code: 'npm install @astryxdesign/core @stylexjs/stylex @astryxdesign/theme-neutral',
132
+ code: '{@pm install @astryxdesign/core @stylexjs/stylex @astryxdesign/theme-neutral}',
133
133
  },
134
134
  {
135
135
  type: 'code',
@@ -4,9 +4,9 @@
4
4
 
5
5
  export const docs = {
6
6
  name: 'theme',
7
- title: 'Theme System',
7
+ title: 'Theming',
8
8
  category: 'guide',
9
- keywords: ['theme', 'dark mode', 'defineTheme', 'provider'],
9
+ keywords: ['theme', 'theming', 'theme system', 'dark mode', 'defineTheme', 'provider'],
10
10
  description:
11
11
  'How to use and create themes: see Use a theme for applying themes, and Author a theme for creating and customizing them.',
12
12
 
@@ -39,11 +39,11 @@ export const docs = {
39
39
  type: 'code',
40
40
  lang: 'bash',
41
41
  label: 'Quick start',
42
- code: 'astryx theme add stone # use an existing theme\nastryx theme eject stone # fork its source to customize\nastryx theme build src/themes/stone/stoneTheme.ts',
42
+ code: '{@command theme add stone} # use an existing theme\n{@command theme eject stone} # fork its source to customize\n{@command theme build src/themes/stone/stoneTheme.ts}',
43
43
  },
44
44
  {
45
45
  type: 'prose',
46
- text: 'For a new coordinated color system, run `astryx theme palette generate palette.config.json --out palette.generated.ts`. Review and commit the generated palette module and receipt, import its `palette` export, then reference stable stops from semantic tokens. Regenerating an accepted palette updates every mapped token that keeps those references; generation does not rewrite the theme.',
46
+ text: 'For a new coordinated color system, run `{@command theme palette generate palette.config.json --out palette.generated.ts}`. Review and commit the generated palette module and receipt, import its `palette` export, then reference stable stops from semantic tokens. Regenerating an accepted palette updates every mapped token that keeps those references; generation does not rewrite the theme.',
47
47
  },
48
48
  {
49
49
  type: 'code',
@@ -74,7 +74,7 @@ export const docs = {
74
74
  content: [
75
75
  {
76
76
  type: 'prose',
77
- text: 'Install an integration and Astryx discovers its themes automatically. Import one with `astryx theme add <name> --package <integration>`. Use `theme eject` only for an independent source fork. For the full walkthrough, see {@link generic:use-a-theme}.',
77
+ text: 'Install an integration and Astryx discovers its themes automatically. Import one with `{@command theme add <name> --package <integration>}`. Use `theme eject` only for an independent source fork. For the full walkthrough, see {@link generic:use-a-theme}.',
78
78
  },
79
79
  ],
80
80
  },
@@ -45,7 +45,7 @@ export const docs = {
45
45
  {
46
46
  type: 'code',
47
47
  lang: 'bash',
48
- code: 'astryx integration add component AcmeCarousel',
48
+ code: '{@command integration add component AcmeCarousel}',
49
49
  },
50
50
  {
51
51
  type: 'code',
@@ -26,7 +26,7 @@ export const docs = {
26
26
  {
27
27
  type: 'code',
28
28
  lang: 'bash',
29
- code: 'astryx integration add theme ocean',
29
+ code: '{@command integration add theme ocean}',
30
30
  },
31
31
  {
32
32
  type: 'code',
@@ -63,7 +63,7 @@ Declare theme root ./themes in astryx.integration.mjs.
63
63
  {
64
64
  type: 'code',
65
65
  lang: 'bash',
66
- code: 'astryx integration add theme ocean --from neutral',
66
+ code: '{@command integration add theme ocean --from neutral}',
67
67
  },
68
68
  {
69
69
  type: 'prose',
@@ -27,7 +27,7 @@ export const docs = {
27
27
  {
28
28
  type: 'code',
29
29
  lang: 'bash',
30
- code: 'astryx integration add doc deploying\n# Read it the way an app will\nastryx docs deploying',
30
+ code: '{@command integration add doc deploying}\n# Read it the way an app will\n{@command docs deploying}',
31
31
  },
32
32
  {
33
33
  type: 'code',
@@ -40,7 +40,7 @@ export const docs = {
40
40
  items: [
41
41
  'Name the topic in lowercase kebab-case, such as `deploying`. Readers type the name as a command argument, so it holds only letters, digits, `_`, and `-`.',
42
42
  'Keep the name stable: readers and links find the topic by it.',
43
- 'Pick a name `astryx docs` does not already list: no Core topic, and no section such as `tokens` or `layout`. To take over or add to a Core topic, see {@link generic:extend-or-replace}.',
43
+ 'Pick a name `{@command docs}` does not already list: no Core topic, and no section such as `tokens` or `layout`. To take over or add to a Core topic, see {@link generic:extend-or-replace}.',
44
44
  ],
45
45
  },
46
46
  ],
@@ -57,7 +57,7 @@ export const docs = {
57
57
  type: 'code',
58
58
  lang: 'javascript',
59
59
  label: 'docs/deploying.doc.mjs',
60
- code: "/** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */\nexport default {\n type: 'generic',\n name: 'deploying',\n title: 'Deploying',\n description: 'Ship an app built with Acme widgets.',\n sections: [{\n id: 'build-before-you-ship',\n title: 'Build before you ship',\n content: [\n {type: 'prose', text: 'Build the app, then upload the `dist` folder.'},\n {type: 'code', lang: 'bash', code: 'npm run build'},\n {type: 'list', style: 'unordered', items: ['Keep `dist` out of git.']},\n {type: 'table', headers: ['Variable', 'Value'], rows: [['`NODE_ENV`', '`production`']]},\n ],\n }],\n};",
60
+ code: "/** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */\nexport default {\n type: 'generic',\n name: 'deploying',\n title: 'Deploying',\n description: 'Ship an app built with Acme widgets.',\n sections: [{\n id: 'build-before-you-ship',\n title: 'Build before you ship',\n content: [\n {type: 'prose', text: 'Build the app, then upload the `dist` folder.'},\n {type: 'code', lang: 'bash', code: '{@@pm run build}'},\n {type: 'list', style: 'unordered', items: ['Keep `dist` out of git.']},\n {type: 'table', headers: ['Variable', 'Value'], rows: [['`NODE_ENV`', '`production`']]},\n ],\n }],\n};",
61
61
  },
62
62
  {
63
63
  type: 'prose',
@@ -75,17 +75,17 @@ export const docs = {
75
75
  },
76
76
  {
77
77
  id: 'write-commands-without-a-runner',
78
- title: 'Write commands without a runner',
78
+ title: 'Write commands for every reader',
79
79
  content: [
80
80
  {
81
81
  type: 'prose',
82
- text: 'Start every CLI command in a doc with the word astryx alone, with no runner such as npx or pnpm exec in front. The CLI prefixes each one when it prints the doc, with the command the reader runs: `pnpm exec astryx` or `yarn astryx` from their package manager, or the `cliCommand` an integration sets. See {@link generic:cli-command}. `doctor integration validate` (and so `integration check`) lists each command written with a runner as a `runner_command` note, with its file, line and the bare command to write. A note fails nothing. An install step, which runs before the CLI is installed, is the one exception: write the scoped package name, `@astryxdesign/cli`, after the download runner. The unscoped name after a download runner is always listed, because it fetches an unrelated package.',
82
+ text: "Write an Astryx command as `{@@command doctor}` and a package-manager step as `{@@pm install @acme/widgets}`, never with a runner such as npx or pnpm exec, or a package manager's own command, in front. The CLI shows each one with the command the reader runs: `pnpm exec astryx doctor` or `yarn astryx doctor`, `pnpm add @acme/widgets` or `npm install @acme/widgets`, or the `cliCommand` an integration sets. {@link generic:doc-syntax} lists every token. A command written bare, the word astryx and a command, is shown the same way. `doctor integration validate` (and so `integration check`) names each command written another way, with the token that replaces it; {@link generic:doc-syntax} lists what it checks. An install step, which runs before the CLI is installed, is `{@@pm dlx @astryxdesign/cli init}`.",
83
83
  },
84
84
  {
85
85
  type: 'code',
86
86
  lang: 'javascript',
87
87
  label: 'docs/deploying.doc.mjs',
88
- code: "{type: 'prose', text: 'Check the app with `astryx doctor` before you ship.'},\n{type: 'code', lang: 'bash', code: 'astryx doctor'},",
88
+ code: "{type: 'prose', text: 'Check the app with {@@command doctor} before you ship.'},\n{type: 'code', lang: 'bash', code: '{@@command doctor}'},",
89
89
  },
90
90
  {
91
91
  type: 'code',
@@ -27,7 +27,7 @@ export const docs = {
27
27
  {
28
28
  type: 'code',
29
29
  lang: 'bash',
30
- code: "astryx integration add agent-doc 'Use AcmeCarousel for rotating content.'",
30
+ code: "{@command integration add agent-doc 'Use AcmeCarousel for rotating content.'}",
31
31
  },
32
32
  {
33
33
  type: 'prose',
@@ -92,12 +92,12 @@ export default {
92
92
  content: [
93
93
  {
94
94
  type: 'prose',
95
- text: "An app's `astryx init` writes your lines at the end of its managed agent block, each labeled with your package name. The CLI owns the heading, the labels, and the markers.",
95
+ text: "An app's `{@command init}` writes your lines at the end of its managed agent block, each labeled with your package name. The CLI owns the heading, the labels, and the markers.",
96
96
  },
97
97
  {
98
98
  type: 'code',
99
99
  lang: 'bash',
100
- code: 'astryx init --features agents',
100
+ code: '{@command init --features agents}',
101
101
  },
102
102
  {
103
103
  type: 'code',
@@ -123,9 +123,9 @@ export default {
123
123
  {
124
124
  type: 'code',
125
125
  lang: 'bash',
126
- code: `astryx init --features agents
126
+ code: `{@command init --features agents}
127
127
  # Or: --from takes the Core version the app had before
128
- astryx upgrade --from <version> --apply`,
128
+ {@command upgrade --from <version> --apply}`,
129
129
  },
130
130
  {
131
131
  type: 'code',
@@ -43,7 +43,7 @@ export const docs = {
43
43
  },
44
44
  {
45
45
  type: 'prose',
46
- text: 'For example, ship a carousel as an integration. Any app that installs it can find it with `astryx search carousel`, and the CLI uses it like any Astryx Core component.',
46
+ text: 'For example, ship a carousel as an integration. Any app that installs it can find it with `{@command search carousel}`, and the CLI uses it like any Astryx Core component.',
47
47
  },
48
48
  {
49
49
  type: 'prose',
@@ -55,7 +55,7 @@ export const docs = {
55
55
  },
56
56
  {
57
57
  type: 'prose',
58
- text: "Every integration runs `astryx integration check --strict` in its own build: it is required, not optional, so a doc, prop, or link that stops matching the code fails your build instead of your users' apps. See {@link generic:checks}.",
58
+ text: "Every integration runs `{@command integration check --strict}` in its own build: it is required, not optional, so a doc, prop, or link that stops matching the code fails your build instead of your users' apps. See {@link generic:checks}.",
59
59
  },
60
60
  ],
61
61
  };
@@ -82,7 +82,7 @@ export default {
82
82
  },
83
83
  {
84
84
  type: 'prose',
85
- text: 'Then check the package-scoped template list ({@link generic:template-doc-overview}) and confirm the entry carries the relationship you set. `astryx component` does not show integration blocks, so the list is where to check.',
85
+ text: 'Then check the package-scoped template list ({@link generic:template-doc-overview}) and confirm the entry carries the relationship you set. `{@command component}` does not show integration blocks, so the list is where to check.',
86
86
  },
87
87
  ],
88
88
  },
@@ -37,7 +37,7 @@ export const docs = {
37
37
  {
38
38
  type: 'code',
39
39
  lang: 'bash',
40
- code: 'astryx doctor integration components',
40
+ code: '{@command doctor integration components}',
41
41
  },
42
42
  {
43
43
  type: 'code',
@@ -178,11 +178,11 @@ reason: AcmeCarousel depends on \`@acme/motion\` (imported in AcmeCarousel.ts
178
178
  ],
179
179
  [
180
180
  "It depends on a type the compiler can't work out",
181
- 'Make the types compile with `npx tsc --noEmit`, then run the check again',
181
+ 'Make the types compile with `{@pm exec tsc --noEmit}`, then run the check again',
182
182
  ],
183
183
  [
184
184
  "The package's TypeScript config has an error",
185
- 'Fix `tsconfig.json` until `npx tsc -p .` reads it',
185
+ 'Fix `tsconfig.json` until `{@pm exec tsc -p .}` reads it',
186
186
  ],
187
187
  ['Its props are typed `any`', 'Give the component a props type'],
188
188
  [
@@ -27,7 +27,7 @@ export const docs = {
27
27
  {
28
28
  type: 'code',
29
29
  lang: 'bash',
30
- code: 'astryx doctor integration docs\n# In an app, check an installed package\nastryx doctor integration docs @acme/astryx-widgets',
30
+ code: '{@command doctor integration docs}\n# In an app, check an installed package\n{@command doctor integration docs @acme/astryx-widgets}',
31
31
  },
32
32
  {
33
33
  type: 'code',
@@ -44,7 +44,7 @@ export const docs = {
44
44
  },
45
45
  {
46
46
  type: 'prose',
47
- text: "Point at another doc with a link, never by writing `astryx docs <name>` in prose: `{@link generic:<name>}` for one of your package's topics, or `{@link @astryxdesign/cli:generic:<name>}` for a Core doc (`namespace:` for a Core namespace). The CLI prints the link as the command that opens the doc, and doctor checks that the doc exists. The check lists each written pointer to a doc that exists as a `stray_doc_pointer` warning, with the link to write instead. A command with more words, or one in a code block, is a walkthrough and is not listed.",
47
+ text: "Point at another doc with a link, never by writing `{@command docs <name>}` in prose: `{@link generic:<name>}` for one of your package's topics, or `{@link @astryxdesign/cli:generic:<name>}` for a Core doc (`namespace:` for a Core namespace). The CLI prints the link as the command that opens the doc, and doctor checks that the doc exists. The check lists each written pointer to a doc that exists as a `stray_doc_pointer` warning, with the link to write instead. A command with more words, or one in a code block, is a walkthrough and is not listed.",
48
48
  },
49
49
  {
50
50
  type: 'prose',
@@ -109,7 +109,7 @@ export const docs = {
109
109
  {
110
110
  type: 'code',
111
111
  lang: 'bash',
112
- code: 'astryx doctor integration validate',
112
+ code: '{@command doctor integration validate}',
113
113
  },
114
114
  {
115
115
  type: 'code',
@@ -144,12 +144,12 @@ fix: Remove \`summary\`: SingleComponentDoc has no field \`summary\`.`,
144
144
  content: [
145
145
  {
146
146
  type: 'prose',
147
- text: '`astryx doctor` also measures every read and warns on one over 32 KB. Run it in your package or in an app that installs it; `doctor integration docs` does not check size.',
147
+ text: '`{@command doctor}` also measures every read and warns on one over 32 KB. Run it in your package or in an app that installs it; `doctor integration docs` does not check size.',
148
148
  },
149
149
  {
150
150
  type: 'code',
151
151
  lang: 'bash',
152
- code: 'astryx doctor',
152
+ code: '{@command doctor}',
153
153
  },
154
154
  {
155
155
  type: 'code',
@@ -173,7 +173,7 @@ fix: Remove \`summary\`: SingleComponentDoc has no field \`summary\`.`,
173
173
  {
174
174
  type: 'code',
175
175
  lang: 'bash',
176
- code: 'astryx integration verify',
176
+ code: '{@command integration verify}',
177
177
  },
178
178
  {
179
179
  type: 'code',