@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
@@ -106,7 +106,7 @@ export const docs = {
106
106
  items: [
107
107
  '`integration add` appends the manifest and templates directory when a `files` list already exists. Add the other directories yourself.',
108
108
  'If `package.json` sets `sideEffects`, include CSS in it, as above, so bundlers keep side-effect stylesheet imports.',
109
- 'Run `npm pack --dry-run` and read the real file list instead of reasoning from the workspace.',
109
+ 'Run `{@pm-only npm "the tarball the registry receives" pack --dry-run}` and read the real file list instead of reasoning from the workspace.',
110
110
  ],
111
111
  },
112
112
  ],
@@ -2,8 +2,9 @@
2
2
 
3
3
  /**
4
4
  * @file `astryx docs authoring/building-blocks/docs/extend-or-replace`:
5
- * take over an existing topic with `replaces`, merge sections into one with
6
- * `extends`, and check overlaps with Core topics.
5
+ * take over an existing topic or guide with `replaces`, merge sections into
6
+ * one with `extends` (placing each with `before` or `after`), and check
7
+ * overlaps with Core topics.
7
8
  */
8
9
 
9
10
  /** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
@@ -13,7 +14,7 @@ export const docs = {
13
14
  placement: {parent: 'namespace:docs', slot: 'guides', order: 40},
14
15
  title: 'Extend or replace a topic',
15
16
  category: 'guide',
16
- description: 'Take over a topic, or merge sections into it.',
17
+ description: 'Take over a topic or guide, or merge sections into it.',
17
18
  sections: [
18
19
  {
19
20
  id: 'replace-a-topic',
@@ -26,7 +27,7 @@ export const docs = {
26
27
  {
27
28
  type: 'code',
28
29
  lang: 'bash',
29
- code: 'astryx integration add doc acme-getting-started --replaces getting-started\n# The old name now opens your topic\nastryx docs getting-started',
30
+ code: '{@command integration add doc acme-getting-started --replaces getting-started}\n# The old name now opens your topic\n{@command docs getting-started}',
30
31
  },
31
32
  {
32
33
  type: 'code',
@@ -51,7 +52,7 @@ export const docs = {
51
52
  {
52
53
  type: 'code',
53
54
  lang: 'bash',
54
- code: 'astryx integration add doc acme-theming --extends theme\nastryx docs theme --index',
55
+ code: '{@command integration add doc acme-theming --extends theme}\n{@command docs theme --index}',
55
56
  },
56
57
  {
57
58
  type: 'code',
@@ -63,7 +64,8 @@ export const docs = {
63
64
  type: 'list',
64
65
  style: 'unordered',
65
66
  items: [
66
- "Read the base topic's keys with `--index`, and give a section that replaces one that key as its `id`. A section without an `id` matches only a base section with exactly its title, or one whose `id` is the key its title makes, so `Integration Themes` is added beside a base `Integration themes` that has no `id`.",
67
+ "Read the base topic's keys with `--index`, and give a section that replaces one that key as its `id`. A section that replaces one keeps its place. A section without an `id` matches only a base section with exactly its title, or one whose `id` is the key its title makes, so `Integration Themes` is added beside a base `Integration themes` that has no `id`.",
68
+ "Set `before` or `after` to a base section's key to add a new section there instead of at the end. A key that names no section adds it at the end, and `astryx doctor integration validate` lists a note. An older CLI rejects these fields, so declare an `@astryxdesign/cli` peer range that starts at the release that reads them; `astryx integration verify` warns without it.",
67
69
  "The topic keeps the base's title and description, and readers open it by the base's name.",
68
70
  'Replace the `Overview` placeholder that `integration add` writes, or it is added to the base topic.',
69
71
  "Extend a topic to correct or add to it. A copy made with `replaces` stops getting the owner's fixes.",
@@ -71,6 +73,36 @@ export const docs = {
71
73
  },
72
74
  ],
73
75
  },
76
+ {
77
+ id: 'replace-or-extend-a-cli-guide',
78
+ title: 'Replace or extend a CLI guide',
79
+ content: [
80
+ {
81
+ type: 'prose',
82
+ text: "A guide in the CLI's docs tree has a route rather than a topic name. Set `replaces` or `extends` to that route to change the guide for every app that installs your package: say what differs for your users on the page agents already read.",
83
+ },
84
+ {
85
+ type: 'code',
86
+ lang: 'javascript',
87
+ label: 'docs/acme-quick-start.doc.mjs',
88
+ code: "export default {\n type: 'generic',\n name: 'acme-quick-start',\n extends: 'authoring/quick-start',\n title: 'Acme quick start',\n description: 'What differs when you build integrations at Acme.',\n sections: [\n {id: 'use-the-acme-registry', title: 'Use the Acme registry', before: 'fill-in-package-json', content: [/* ... */]},\n ],\n};",
89
+ },
90
+ {
91
+ type: 'list',
92
+ style: 'unordered',
93
+ items: [
94
+ 'Your doc stays a flat topic: do not give it a `placement`. Readers open the guide by its route, never by your `name`.',
95
+ 'With `replaces`, readers of the route get your doc, under your package. With `extends`, each section you add or replace names your package.',
96
+ 'A name that holds no topic or guide, such as a namespace, changes nothing; `astryx doctor integration validate` lists it as a note, with the guides below a namespace.',
97
+ ],
98
+ },
99
+ {
100
+ type: 'code',
101
+ lang: 'bash',
102
+ code: '# Every guide route, by namespace\nastryx docs authoring --depth all\nastryx docs cli --depth all\n# The keys to place sections by\nastryx docs authoring/quick-start --index',
103
+ },
104
+ ],
105
+ },
74
106
  {
75
107
  id: 'check-overlaps-with-core-topics',
76
108
  title: 'Check overlaps with Core topics',
@@ -82,7 +114,7 @@ export const docs = {
82
114
  {
83
115
  type: 'code',
84
116
  lang: 'bash',
85
- code: 'astryx doctor integration docs',
117
+ code: '{@command doctor integration docs}',
86
118
  },
87
119
  {
88
120
  type: 'code',
@@ -60,7 +60,7 @@ export const docs = {
60
60
  content: [
61
61
  {
62
62
  type: 'prose',
63
- text: 'Astryx never loads font files. defineTheme and the built CSS only set font-family: naming a webfont (Fraunces, JetBrains Mono, and so on) makes every browser look for it, and quietly fall back when the app has not loaded it. `astryx theme build` warns when a theme names families that are neither CSS generics nor common system fonts and prints the snippet to add; loading the font is always the app\'s job.',
63
+ text: "Astryx never loads font files. defineTheme and the built CSS only set font-family: naming a webfont (Fraunces, JetBrains Mono, and so on) makes every browser look for it, and quietly fall back when the app has not loaded it. `{@command theme build}` warns when a theme names families that are neither CSS generics nor common system fonts and prints the snippet to add; loading the font is always the app's job.",
64
64
  },
65
65
  {
66
66
  type: 'code',
@@ -40,7 +40,7 @@ export const docs = {
40
40
  type: 'code',
41
41
  lang: 'bash',
42
42
  code: `# Print the palette without writing files
43
- astryx theme palette generate themes/ocean/palette.config.json
43
+ {@command theme palette generate themes/ocean/palette.config.json}
44
44
  # Write the palette and its receipt
45
45
  astryx theme palette generate themes/ocean/palette.config.json \\
46
46
  --out themes/ocean/tokens/ocean.palette.ts`,
@@ -37,11 +37,11 @@ export const docs = {
37
37
  content: [
38
38
  {
39
39
  type: 'prose',
40
- text: 'Your `@astryxdesign/core` (and, if you use it, `@astryxdesign/cli`) `peerDependencies` ranges must include the version of the CLI installed globally. If they do not, Astryx skips your package outside projects, and `astryx doctor` warns and names the range.',
40
+ text: 'Your `@astryxdesign/core` (and, if you use it, `@astryxdesign/cli`) `peerDependencies` ranges must include the version of the CLI installed globally. If they do not, Astryx skips your package outside projects, and `{@command doctor}` warns and names the range.',
41
41
  },
42
42
  {
43
43
  type: 'prose',
44
- text: "Inside a project that does not install your package, `astryx discover` offers it, with the command that adds it to that project, once your peer range admits the project's release.",
44
+ text: "Inside a project that does not install your package, `{@command discover}` offers it, with the command that adds it to that project, once your peer range admits the project's release.",
45
45
  },
46
46
  ],
47
47
  },
@@ -54,8 +54,8 @@ export const docs = {
54
54
  style: 'unordered',
55
55
  items: [
56
56
  "Installed in an app: it works in that app, as always, whichever `astryx` the person runs, because the app's version of Astryx answers there.",
57
- 'Installed next to the global install (`npm i -g @astryxdesign/cli your-package`), or in the same folder as the CLI by a tool that installs them together: it works in every folder outside a project. People and agents there see its components, templates, docs, themes, codemods, and discover source.',
58
- "Installed only globally, inside an app that does not install it: it adds nothing there. When it supports the app's version and loads, `astryx discover` lists it as one the app could add, with the app's install command.",
57
+ 'Installed next to the global install (`{@pm install @astryxdesign/cli your-package --global}`), or in the same folder as the CLI by a tool that installs them together: it works in every folder outside a project. People and agents there see its components, templates, docs, themes, codemods, and discover source.',
58
+ "Installed only globally, inside an app that does not install it: it adds nothing there. When it supports the app's version and loads, `{@command discover}` lists it as one the app could add, with the app's install command.",
59
59
  "Installed both ways: the app's copy is the one used in that app. In your own package folder, your working copy is used.",
60
60
  ],
61
61
  },
@@ -73,7 +73,7 @@ export const docs = {
73
73
  type: 'list',
74
74
  style: 'unordered',
75
75
  items: [
76
- 'Declare the `@astryxdesign/core` (and, if you use it, `@astryxdesign/cli`) `peerDependencies` range your package really supports. Outside a project, Astryx skips your package when that range leaves out the global version, and `astryx doctor` says why: too narrow, and global users lose it after an upgrade; too wide, and it loads against a Core it may not build with.',
76
+ 'Declare the `@astryxdesign/core` (and, if you use it, `@astryxdesign/cli`) `peerDependencies` range your package really supports. Outside a project, Astryx skips your package when that range leaves out the global version, and `{@command doctor}` says why: too narrow, and global users lose it after an upgrade; too wide, and it loads against a Core it may not build with.',
77
77
  'Keep imports in your docs and templates to packages an app installs with yours, since outside a project there is no app to check them against.',
78
78
  "If you set `cliCommand`, know that outside a project it starts every command Astryx prints, and that two global integrations naming different commands cancel out, falling back to `astryx` ({@link generic:cli-command}). Inside an app, only the app's integrations count.",
79
79
  'Try it globally before you publish, with the steps below.',
@@ -92,21 +92,21 @@ export const docs = {
92
92
  {
93
93
  type: 'code',
94
94
  lang: 'bash',
95
- code: 'npm pack\nnpm i -g @astryxdesign/cli ./your-package-1.0.0.tgz\nmkdir -p /tmp/try-global && cd /tmp/try-global\nastryx discover\nastryx docs\nastryx doctor',
95
+ code: '{@pm-only npm "the tarball the registry receives" pack}\n{@pm install @astryxdesign/cli ./your-package-1.0.0.tgz --global}\nmkdir -p /tmp/try-global && cd /tmp/try-global\n{@command discover}\n{@command docs}\n{@command doctor}',
96
96
  },
97
97
  {
98
98
  type: 'list',
99
99
  style: 'unordered',
100
100
  items: [
101
- '`astryx discover` lists your package as installed, with what it adds.',
102
- '`astryx docs` lists your topics, and `astryx search <one of your component names>` finds them.',
103
- "`astryx doctor`'s `computer-integrations` check lists your package as used, with no warning.",
104
- "In an app that does not install it, `astryx discover` lists it as one the app could add, with the app's install command, and none of its components or docs show up.",
101
+ '`{@command discover}` lists your package as installed, with what it adds.',
102
+ '`{@command docs}` lists your topics, and `{@command search <one of your component names>}` finds them.',
103
+ "`{@command doctor}`'s `computer-integrations` check lists your package as used, with no warning.",
104
+ "In an app that does not install it, `{@command discover}` lists it as one the app could add, with the app's install command, and none of its components or docs show up.",
105
105
  ],
106
106
  },
107
107
  {
108
108
  type: 'prose',
109
- text: 'Remove it again with `npm uninstall -g your-package`.',
109
+ text: 'Remove it again with `{@pm remove your-package --global}`.',
110
110
  },
111
111
  ],
112
112
  },
@@ -42,7 +42,7 @@ export const docs = {
42
42
  {
43
43
  type: 'code',
44
44
  lang: 'bash',
45
- code: 'npm i -g @astryxdesign/cli',
45
+ code: '{@pm install @astryxdesign/cli --global}',
46
46
  },
47
47
  {
48
48
  type: 'heading',
@@ -73,7 +73,7 @@ export const docs = {
73
73
  ],
74
74
  ['Outside any project', 'Your global version.'],
75
75
  [
76
- 'Commands for your computer, such as `astryx init --user`',
76
+ 'Commands for your computer, such as `{@command init --user}`',
77
77
  'Your global version, in any folder.',
78
78
  ],
79
79
  ],
@@ -82,7 +82,7 @@ export const docs = {
82
82
  [
83
83
  '`discoverSources`',
84
84
  'none',
85
- "Your own discover sources. `astryx discover` reports each as the host's.",
85
+ "Your own discover sources. `{@command discover}` reports each as the host's.",
86
86
  ],
87
87
  ],
88
88
  },
@@ -44,11 +44,11 @@ export const docs = {
44
44
  {
45
45
  type: 'code',
46
46
  lang: 'bash',
47
- code: 'npm i -g @astryxdesign/cli\n# or: pnpm add -g @astryxdesign/cli · yarn global add @astryxdesign/cli · bun add -g @astryxdesign/cli · volta install @astryxdesign/cli',
47
+ code: '{@pm install @astryxdesign/cli --global}\n# with Volta: volta install @astryxdesign/cli',
48
48
  },
49
49
  {
50
50
  type: 'prose',
51
- text: "Keep the CLI installed in each project too: that pins its version for teammates and CI ({@link generic:project-global-or-both}). Inside a project, whichever astryx command you type, the project's version answers. Outside a project, your global install answers with its own version, and a version you name, such as `npx @astryxdesign/cli@0.7.0`, answers as exactly that version.",
51
+ text: "Keep the CLI installed in each project too: that pins its version for teammates and CI ({@link generic:project-global-or-both}). Inside a project, whichever astryx command you type, the project's version answers. Outside a project, your global install answers with its own version, and a version you name, such as `{@pm dlx @astryxdesign/cli@0.7.0}`, answers as exactly that version.",
52
52
  },
53
53
  ],
54
54
  },
@@ -63,7 +63,7 @@ export const docs = {
63
63
  {
64
64
  type: 'code',
65
65
  lang: 'bash',
66
- code: 'npm config set prefix ~/.npm-global\nexport PATH="$HOME/.npm-global/bin:$PATH"\nnpm i -g @astryxdesign/cli',
66
+ code: '{@pm-only npm "moves the npm global folder" config set prefix ~/.npm-global}\nexport PATH="$HOME/.npm-global/bin:$PATH"\n{@pm-only npm "installs into the npm global folder above" i -g @astryxdesign/cli}',
67
67
  },
68
68
  {
69
69
  type: 'prose',
@@ -87,7 +87,7 @@ export const docs = {
87
87
  content: [
88
88
  {
89
89
  type: 'prose',
90
- text: "Your global install answers offline in a project with only Core, and so does any project that installs its own CLI. Outside a project, commands that read components, such as `astryx component Button`, need your global version's Core: after any command you run online, your global install downloads it once into the cache in the background, so they work offline from then on (not in CI, where nothing downloads by itself: {@link generic:ci-and-containers}; and not on Windows, where the first component command downloads it). Only a project whose own CLI cannot start needs a version installed or cached; when it is neither and cannot be fetched, your global install answers with a one-line warning, and Astryx waits 2 minutes before trying to download it again (10 minutes after a second failure in a row). {@link generic:problems} has the exact message.",
90
+ text: "Your global install answers offline in a project with only Core, and so does any project that installs its own CLI. Outside a project, commands that read components, such as `{@command component Button}`, need your global version's Core: after any command you run online, your global install downloads it once into the cache in the background, so they work offline from then on (not in CI, where nothing downloads by itself: {@link generic:ci-and-containers}; and not on Windows, where the first component command downloads it). Only a project whose own CLI cannot start needs a version installed or cached; when it is neither and cannot be fetched, your global install answers with a one-line warning, and Astryx waits 2 minutes before trying to download it again (10 minutes after a second failure in a row). {@link generic:problems} has the exact message.",
91
91
  },
92
92
  ],
93
93
  },
@@ -46,7 +46,7 @@ export const docs = {
46
46
  },
47
47
  {
48
48
  type: 'prose',
49
- text: 'This guide decides layout, not component APIs. Run `astryx build "<idea>"` to start from the closest template for your app type, and `astryx component <Name>` for a component\'s props.',
49
+ text: 'This guide decides layout, not component APIs. Run `{@command build "<idea>"}` to start from the closest template for your app type, and `{@command component <Name>}` for a component\'s props.',
50
50
  },
51
51
  ],
52
52
  slots: {
@@ -38,7 +38,7 @@ export const docs = {
38
38
  style: 'unordered',
39
39
  items: [
40
40
  'The kind is `generic` for a topic or guide, `namespace` for a docs section, `command` or `function` for a CLI command or API function, `schema` or `enum` for a schema or a fixed set of values, `component` for a component, and `page` or `block` for a template.',
41
- 'Name a component by its export name and a template by its id. Its link reads as the command that opens it, such as `astryx component AcmeCarousel --package @acme/widgets`.',
41
+ 'Name a component by its export name and a template by its id. Its link reads as the command that opens it, such as `{@command component AcmeCarousel --package @acme/widgets}`.',
42
42
  'Inside backticks or a code block, link syntax prints as written.',
43
43
  ],
44
44
  },
@@ -78,7 +78,7 @@ export const docs = {
78
78
  {
79
79
  type: 'code',
80
80
  lang: 'bash',
81
- code: 'astryx doctor integration docs',
81
+ code: '{@command doctor integration docs}',
82
82
  },
83
83
  {
84
84
  type: 'code',
@@ -46,7 +46,7 @@ export const docs = {
46
46
  type: 'list',
47
47
  style: 'ordered',
48
48
  items: [
49
- 'Install the packages and run `astryx init` for agent docs, then add the reset, `astryx.css`, and theme CSS imports (see Theme and CSS Setup below).',
49
+ 'Install the packages and run `{@command init}` for agent docs, then add the reset, `astryx.css`, and theme CSS imports (see Theme and CSS Setup below).',
50
50
  'Wrap the app root with Theme and choose the initial light, dark, or system mode behavior.',
51
51
  'Make Tailwind and design system CSS layer order explicit before replacing components.',
52
52
  'Render the foundation smoke test page and confirm primitives keep their padding before migrating any surface.',
@@ -70,18 +70,18 @@ export const docs = {
70
70
  type: 'code',
71
71
  lang: 'bash',
72
72
  label: 'Migration-oriented CLI pass',
73
- code: `astryx docs migration
74
- astryx docs theme
75
- astryx docs styling
76
- astryx template --list --type block
77
- astryx template AppShellTopNavWithSideNav --skeleton
78
- astryx template PopoverSettingsPanel --skeleton
79
- astryx component AppShell
80
- astryx component SideNav
81
- astryx component TopNav
82
- astryx component CommandPalette
83
- astryx component Button
84
- astryx component TextInput`,
73
+ code: `{@command docs migration}
74
+ {@command docs theme}
75
+ {@command docs styling}
76
+ {@command template --list --type block}
77
+ {@command template AppShellTopNavWithSideNav --skeleton}
78
+ {@command template PopoverSettingsPanel --skeleton}
79
+ {@command component AppShell}
80
+ {@command component SideNav}
81
+ {@command component TopNav}
82
+ {@command component CommandPalette}
83
+ {@command component Button}
84
+ {@command component TextInput}`,
85
85
  },
86
86
  {
87
87
  type: 'prose',
@@ -91,8 +91,8 @@ astryx component TextInput`,
91
91
  type: 'code',
92
92
  lang: 'bash',
93
93
  label: 'Short and JSON modes',
94
- code: `astryx docs migration --full --detail brief
95
- astryx component Button --json`,
94
+ code: `{@command docs migration --full --detail brief}
95
+ {@command component Button --json}`,
96
96
  },
97
97
  ],
98
98
  },
@@ -10,11 +10,12 @@
10
10
  export const docs = {
11
11
  type: 'namespace',
12
12
  name: 'migration',
13
- title: 'Migration Guide',
13
+ title: 'Migration',
14
14
  summary:
15
15
  'Migrate an existing Tailwind, shadcn, or Radix app to the design system incrementally — setup, component replacement, and verification.',
16
16
  keywords: [
17
17
  'migration',
18
+ 'migration guide',
18
19
  'migrate',
19
20
  'Tailwind',
20
21
  'shadcn',
@@ -205,7 +205,7 @@ tokens: {
205
205
  type: 'list',
206
206
  style: 'ordered',
207
207
  items: [
208
- 'Import the reset/base CSS and a theme CSS file early enough for first paint. For production SSR, prefer built themes from `astryx theme build` or published `/built` theme imports plus `theme.css`.',
208
+ 'Import the reset/base CSS and a theme CSS file early enough for first paint. For production SSR, prefer built themes from `{@command theme build}` or published `/built` theme imports plus `theme.css`.',
209
209
  'Choose one owner for color mode. Theme uses `data-theme="light|dark"` and `color-scheme` to resolve `light-dark()` tokens.',
210
210
  'Map the external library\'s semantic layer to system variables by intent, not by exact naming. For example, MUI `background.paper` maps to `--color-background-surface`.',
211
211
  'Use {@link namespace:tokens} and focused token docs when building mappings. Keep mappings small at first: text, surface/body/card/popover, border, accent, status, spacing, radius, typography, shadow.',
@@ -17,7 +17,7 @@ export const docs = {
17
17
  title: 'Page template',
18
18
  category: 'guide',
19
19
  description:
20
- 'Help people find a page: give it a category for `astryx search` and template listings, and flag a sparse starting shell as a scaffold.',
20
+ 'Help people find a page: give it a category for `{@command search}` and template listings, and flag a sparse starting shell as a scaffold.',
21
21
  sections: [
22
22
  {
23
23
  id: 'start-from-the-generated-page-doc',
@@ -56,7 +56,7 @@ export default {
56
56
  type: 'list',
57
57
  style: 'unordered',
58
58
  items: [
59
- 'Set `category` to the most specific supported `{Group} - {Variant}` value. Its words become search terms for `astryx search`, and it appears in the JSON template list.',
59
+ 'Set `category` to the most specific supported `{Group} - {Variant}` value. Its words become search terms for `{@command search}`, and it appears in the JSON template list.',
60
60
  'Set `scaffold: true` only for a deliberately sparse starting shell. The JSON template list reports it, so tools and galleries can tell a scaffold from a finished page.',
61
61
  "Fields that only Astryx's own gallery reads, such as `isHiddenFromOverview`, have no effect on integration templates.",
62
62
  ],
@@ -92,7 +92,7 @@ export const docs = {
92
92
  },
93
93
  {
94
94
  type: 'prose',
95
- text: "The first astryx command on your PATH is a version from before global mode, so it ignores your projects' versions. Run the command shown, or remove that install. `astryx doctor` lists every astryx command on your PATH in its `cli-on-path` check.",
95
+ text: "The first astryx command on your PATH is a version from before global mode, so it ignores your projects' versions. Run the command shown, or remove that install. `{@command doctor}` lists every astryx command on your PATH in its `cli-on-path` check.",
96
96
  },
97
97
  ],
98
98
  },
@@ -126,12 +126,12 @@ export const docs = {
126
126
  content: [
127
127
  {
128
128
  type: 'prose',
129
- text: "Astryx treats a copy as installed for your computer only when your package manager's own settings name its folder: npm's global prefix, Bun's `BUN_INSTALL`, Yarn's `global-folder`, pnpm's `PNPM_HOME`, or their defaults. A folder chosen only with a one-off flag, such as `yarn global add --global-folder ~/mine`, is not in any setting, so Astryx treats that copy like a project's: no daily update check and no agent guide. Save the folder in your settings so Astryx knows it is a global install:",
129
+ text: "Astryx treats a copy as installed for your computer only when your package manager's own settings name its folder: npm's global prefix, Bun's `BUN_INSTALL`, Yarn's `global-folder`, pnpm's `PNPM_HOME`, or their defaults. A folder chosen only with a one-off flag, such as `{@pm-only yarn-classic \"uses the Yarn 1 global folder\" global add --global-folder ~/mine}`, is not in any setting, so Astryx treats that copy like a project's: no daily update check and no agent guide. Save the folder in your settings so Astryx knows it is a global install:",
130
130
  },
131
131
  {
132
132
  type: 'code',
133
133
  lang: 'bash',
134
- code: 'yarn config set global-folder ~/mine # writes ~/.yarnrc\nexport BUN_INSTALL=~/mybun # in your shell profile, for Bun',
134
+ code: '{@pm-only yarn-classic "uses the Yarn 1 global folder" config set global-folder ~/mine} # writes ~/.yarnrc\nexport BUN_INSTALL=~/mybun # in your shell profile, for Bun',
135
135
  },
136
136
  ],
137
137
  },
@@ -145,7 +145,7 @@ export const docs = {
145
145
  },
146
146
  {
147
147
  type: 'prose',
148
- text: "In a project with nothing installed yet, such as a fresh clone, the same commands use that Core too, and offline the error reads `This project has no Core installed, and Core <version> could not be downloaded`: install the project's dependencies (`npm install`, or your package manager's), and the project's own Core answers from then on.",
148
+ text: "In a project with nothing installed yet, such as a fresh clone, the same commands use that Core too, and offline the error reads `This project has no Core installed, and Core <version> could not be downloaded`: install the project's dependencies (`{@pm install}`, or your package manager's), and the project's own Core answers from then on.",
149
149
  },
150
150
  ],
151
151
  },
@@ -182,11 +182,11 @@ export const docs = {
182
182
  type: 'list',
183
183
  style: 'unordered',
184
184
  items: [
185
- '`npm i -g` fails with `EACCES` (permission denied): do not use `sudo`. Use a Node version manager, or give npm a global folder you own: `npm config set prefix ~/.npm-global`, then add `~/.npm-global/bin` to your PATH.',
186
- "`astryx: command not found` after installing: your package manager's global bin folder is not on your PATH. `npm prefix -g` shows npm's (its `bin` folder on macOS and Linux); `pnpm setup` adds pnpm's.",
187
- '`pnpm add -g` stops with `ERR_PNPM_NO_GLOBAL_BIN_DIR`, often with Corepack: run `pnpm setup`, open a new terminal, and try again. Yarn 2 and later have no `yarn global`; use `npm i -g` instead.',
185
+ '`npm i -g` fails with `EACCES` (permission denied): do not use `sudo`. Use a Node version manager, or give npm a global folder you own: `{@pm-only npm "moves the npm global folder" config set prefix ~/.npm-global}`, then add `~/.npm-global/bin` to your PATH.',
186
+ '`astryx: command not found` after installing: your package manager\'s global bin folder is not on your PATH. `{@pm-only npm "prints the npm global folder" prefix -g}` shows npm\'s (its `bin` folder on macOS and Linux); `{@pm-only pnpm "sets up the pnpm global folder" setup}` adds pnpm\'s.',
187
+ '`pnpm add -g` stops with `ERR_PNPM_NO_GLOBAL_BIN_DIR`, often with Corepack: run `{@pm-only pnpm "sets up the pnpm global folder" setup}`, open a new terminal, and try again. Yarn 2 and later have no `yarn global`; use `npm i -g` instead.',
188
188
  'Windows: npm puts `astryx.cmd` in `%APPDATA%\\npm`, which must be on your PATH. If PowerShell says running scripts is disabled, run `astryx.cmd`, or allow scripts for your user with `Set-ExecutionPolicy -Scope CurrentUser RemoteSigned`.',
189
- 'Two installs, and the wrong one runs: `astryx doctor` outside a project lists every astryx command on your PATH, in the order your shell tries them.',
189
+ 'Two installs, and the wrong one runs: `{@command doctor}` outside a project lists every astryx command on your PATH, in the order your shell tries them.',
190
190
  ],
191
191
  },
192
192
  ],
@@ -90,7 +90,7 @@ export const docs = {
90
90
  {
91
91
  type: 'code',
92
92
  lang: 'bash',
93
- code: 'npm install @astryxdesign/core @astryxdesign/cli\nastryx init',
93
+ code: '{@pm install @astryxdesign/core @astryxdesign/cli}\n{@command init}',
94
94
  },
95
95
  {
96
96
  type: 'prose',
@@ -99,7 +99,7 @@ export const docs = {
99
99
  {
100
100
  type: 'code',
101
101
  lang: 'bash',
102
- code: 'npm i -g @astryxdesign/cli',
102
+ code: '{@pm install @astryxdesign/cli --global}',
103
103
  },
104
104
  {
105
105
  type: 'prose',
@@ -22,12 +22,12 @@ export const docs = {
22
22
  content: [
23
23
  {
24
24
  type: 'prose',
25
- text: 'Publish only a package that passes every check, then preview the upload with `npm publish --dry-run`. The dry run lists the files and the tag without uploading.',
25
+ text: 'Publish only a package that passes every check, then preview the upload with `{@pm-only npm "publishing goes through npm, which every Node install carries" publish --dry-run}`. The dry run lists the files and the tag without uploading.',
26
26
  },
27
27
  {
28
28
  type: 'code',
29
29
  lang: 'bash',
30
- code: 'astryx doctor integration validate && astryx doctor integration components && astryx doctor integration templates && astryx doctor integration docs && astryx integration verify\nnpm publish --dry-run --access public',
30
+ code: '{@command doctor integration validate} && {@command doctor integration components} && {@command doctor integration templates} && {@command doctor integration docs} && {@command integration verify}\n{@pm-only npm "publishing goes through npm, which every Node install carries" publish --dry-run --access public}',
31
31
  },
32
32
  {
33
33
  type: 'code',
@@ -51,7 +51,7 @@ export const docs = {
51
51
  {
52
52
  type: 'code',
53
53
  lang: 'bash',
54
- code: "npm pkg set 'files[]=components' 'files[]=templates' 'files[]=themes' 'files[]=docs' 'files[]=codemods' 'files[]=astryx.integration.mjs'\nnpm pack --dry-run",
54
+ code: "{@pm-only npm \"edits package.json\" pkg set 'files[]=components' 'files[]=templates' 'files[]=themes' 'files[]=docs' 'files[]=codemods' 'files[]=astryx.integration.mjs'}\n{@pm-only npm \"builds the tarball npm publishes\" pack --dry-run}",
55
55
  },
56
56
  {
57
57
  type: 'list',
@@ -70,12 +70,12 @@ export const docs = {
70
70
  content: [
71
71
  {
72
72
  type: 'prose',
73
- text: 'A scoped package is private by default, so publish it with `--access public`. Without `--tag`, npm tags the release `latest`, which is what `npm install @acme/astryx-widgets` installs.',
73
+ text: 'A scoped package is private by default, so publish it with `--access public`. Without `--tag`, npm tags the release `latest`, which is what `{@pm install @acme/astryx-widgets}` installs.',
74
74
  },
75
75
  {
76
76
  type: 'code',
77
77
  lang: 'bash',
78
- code: '# Publish a release\nnpm publish --access public\n\n# Or set the access once in package.json\nnpm pkg set publishConfig.access=public',
78
+ code: '# Publish a release\n{@pm-only npm "publishing goes through npm, which every Node install carries" publish --access public}\n\n# Or set the access once in package.json\n{@pm-only npm "Yarn has no pkg command" pkg set publishConfig.access=public}',
79
79
  },
80
80
  {
81
81
  type: 'prose',
@@ -84,7 +84,7 @@ export const docs = {
84
84
  {
85
85
  type: 'code',
86
86
  lang: 'bash',
87
- code: '# Only apps that ask for next get it: npm install @acme/astryx-widgets@next\nnpm publish --tag next\n\n# Make that version the default\nnpm dist-tag add @acme/astryx-widgets@1.1.0 latest\nnpm dist-tag ls @acme/astryx-widgets',
87
+ code: '# Only apps that ask for next get it: npm install @acme/astryx-widgets@next\n{@pm-only npm "publishing goes through npm, which every Node install carries" publish --tag next}\n\n# Make that version the default\n{@pm-only npm "dist-tags are set with npm, which every Node install carries" dist-tag add @acme/astryx-widgets@1.1.0 latest}\n{@pm-only npm "dist-tags are set with npm, which every Node install carries" dist-tag ls @acme/astryx-widgets}',
88
88
  },
89
89
  ],
90
90
  },
@@ -99,7 +99,7 @@ export const docs = {
99
99
  {
100
100
  type: 'code',
101
101
  lang: 'bash',
102
- code: 'mkdir check-release && cd check-release\nnpm init -y\nnpm install @astryxdesign/core @astryxdesign/cli @acme/astryx-widgets@1.0.0\nastryx component AcmeCarousel\nastryx doctor integration validate @acme/astryx-widgets',
102
+ code: 'mkdir check-release && cd check-release\n{@pm-only npm "npm, which every Node install carries, writes the package.json" init -y}\n{@pm install @astryxdesign/core @astryxdesign/cli @acme/astryx-widgets@1.0.0}\n{@command component AcmeCarousel}\n{@command doctor integration validate @acme/astryx-widgets}',
103
103
  },
104
104
  {
105
105
  type: 'prose',
@@ -39,13 +39,13 @@ export const docs = {
39
39
  {
40
40
  type: 'code',
41
41
  lang: 'bash',
42
- code: "mkdir acme-widgets && cd acme-widgets\nnpm init -y\nnpm pkg set name=@acme/astryx-widgets type=module\nnpm pkg set 'exports={}' --json\nnpm install -D @astryxdesign/cli @astryxdesign/core typescript@6",
42
+ code: 'mkdir acme-widgets && cd acme-widgets\n{@pm-only npm "writes package.json" init -y}\n{@pm-only npm "edits package.json" pkg set name=@acme/astryx-widgets type=module}\n{@pm-only npm "edits package.json" pkg set \'exports={}\' --json}\n{@pm install @astryxdesign/cli @astryxdesign/core typescript@6 --dev}',
43
43
  },
44
44
  {
45
45
  type: 'list',
46
46
  style: 'unordered',
47
47
  items: [
48
- 'Set `"type": "module"`: the `.js` files the CLI generates, such as a built theme, are ES modules, and Node fails to load them in a package marked `"type": "commonjs"`, which `npm init -y` writes on npm 11.',
48
+ 'Set `"type": "module"`: the `.js` files the CLI generates, such as a built theme, are ES modules, and Node fails to load them in a package marked `"type": "commonjs"`, which `{@pm-only npm "writes package.json" init -y}` writes on npm 11.',
49
49
  'Start with `"exports": {}`: each component and template you add then writes the public import that `integration verify` resolves.',
50
50
  'Run the CLI as `astryx`, which runs the `@astryxdesign/cli` you installed as a devDependency.',
51
51
  'Component commands read Core, so they need `@astryxdesign/core` installed.',
@@ -64,7 +64,7 @@ export const docs = {
64
64
  {
65
65
  type: 'code',
66
66
  lang: 'bash',
67
- code: 'astryx integration add component AcmeCarousel',
67
+ code: '{@command integration add component AcmeCarousel}',
68
68
  },
69
69
  {
70
70
  type: 'code',
@@ -82,7 +82,7 @@ export const docs = {
82
82
  {
83
83
  type: 'code',
84
84
  lang: 'bash',
85
- code: 'astryx component AcmeCarousel',
85
+ code: '{@command component AcmeCarousel}',
86
86
  },
87
87
  {
88
88
  type: 'prose',
@@ -100,7 +100,7 @@ export const docs = {
100
100
  {
101
101
  type: 'code',
102
102
  lang: 'bash',
103
- code: 'npm pkg set scripts.typecheck="astryx integration check --strict"\nnpm run typecheck',
103
+ code: '{@pm-only npm "edits package.json" pkg set scripts.typecheck="astryx integration check --strict"}\n{@pm run typecheck}',
104
104
  },
105
105
  {
106
106
  type: 'code',
@@ -127,7 +127,7 @@ export const docs = {
127
127
  {
128
128
  type: 'code',
129
129
  lang: 'bash',
130
- code: 'astryx integration verify\nnpm pack --pack-destination ..',
130
+ code: '{@command integration verify}\n{@pm-only npm "builds the publish tarball" pack --pack-destination ..}',
131
131
  },
132
132
  {
133
133
  type: 'code',
@@ -136,7 +136,7 @@ export const docs = {
136
136
  },
137
137
  {
138
138
  type: 'prose',
139
- text: '`integration verify` installs the packed package in a temporary app and confirms the component resolves through its public import there ({@link generic:checks}). It publishes nothing and leaves no `.tgz` file, so `npm pack` writes `../acme-astryx-widgets-1.0.0.tgz` for the next step.',
139
+ text: '`integration verify` installs the packed package in a temporary app and confirms the component resolves through its public import there ({@link generic:checks}). It publishes nothing and leaves no `.tgz` file, so `{@pm-only npm "builds the publish tarball" pack}` writes `../acme-astryx-widgets-1.0.0.tgz` for the next step.',
140
140
  },
141
141
  {
142
142
  type: 'heading',
@@ -150,7 +150,7 @@ export const docs = {
150
150
  {
151
151
  type: 'code',
152
152
  lang: 'bash',
153
- code: 'cd ..\nmkdir my-app && cd my-app\nnpm init -y\nnpm install @astryxdesign/core @astryxdesign/cli ../acme-astryx-widgets-1.0.0.tgz\nastryx component AcmeCarousel',
153
+ code: 'cd ..\nmkdir my-app && cd my-app\n{@pm-only npm "writes package.json" init -y}\n{@pm install @astryxdesign/core @astryxdesign/cli ../acme-astryx-widgets-1.0.0.tgz}\n{@command component AcmeCarousel}',
154
154
  },
155
155
  {
156
156
  type: 'code',
@@ -290,7 +290,7 @@ export const docs = {
290
290
  content: [
291
291
  {
292
292
  type: 'prose',
293
- text: 'In global mode: users can also install your package for their computer, beside the global CLI (`npm i -g @astryxdesign/cli your-package`). It then applies in folders outside any project, and inside a project only if the project installs it. See {@link namespace:global} and {@link generic:global-integrations}.',
293
+ text: 'In global mode: users can also install your package for their computer, beside the global CLI (`{@pm install @astryxdesign/cli your-package --global}`). It then applies in folders outside any project, and inside a project only if the project installs it. See {@link namespace:global} and {@link generic:global-integrations}.',
294
294
  },
295
295
  ],
296
296
  },
@@ -62,7 +62,7 @@ export const docs = {
62
62
  '`%APPDATA%\\astryx`',
63
63
  ],
64
64
  [
65
- 'Update checks and notices, and why the last notice or check did not happen (for `astryx doctor` only)',
65
+ 'Update checks and notices, and why the last notice or check did not happen (for `{@command doctor}` only)',
66
66
  '`<settings>/state.json`',
67
67
  '`<settings>/state.json`',
68
68
  '`<settings>\\state.json`',
@@ -128,7 +128,7 @@ export const docs = {
128
128
  style: 'unordered',
129
129
  items: [
130
130
  "`meta.answeredBy` on every successful `--json` result: `cli` (the version that answered), `core` (the Core it used, or `null`), and `copy`: `project` (the project's own CLI), `starting` (the astryx command you started, in a project with no CLI of its own), `matched` (the CLI version equal to the project's Core, when the project's own CLI cannot start), `carried` (outside a project), or `fallback` (that version could not be obtained, so the astryx command you started answered instead).",
131
- '`meta.available` entries from `astryx discover` with `source: "installed for this computer"`: an integration installed next to your global install that the project could add, with its install command in `install`.',
131
+ '`meta.available` entries from `{@command discover}` with `source: "installed for this computer"`: an integration installed next to your global install that the project could add, with its install command in `install`.',
132
132
  ],
133
133
  },
134
134
  ],
@@ -103,7 +103,7 @@ export default {
103
103
  {
104
104
  type: 'code',
105
105
  lang: 'bash',
106
- code: 'astryx doctor integration components\nastryx component SideNav\nastryx component AcmeSideNav\nastryx component SideNav --package @astryxdesign/core',
106
+ code: '{@command doctor integration components}\n{@command component SideNav}\n{@command component AcmeSideNav}\n{@command component SideNav --package @astryxdesign/core}',
107
107
  },
108
108
  {
109
109
  type: 'list',