An open source design system that's fully customizable and agent ready
TypeScript
fix(docs): reference the astryx CLI instead of the legacy xds command (#2948)
EJ Hammondb812c876a869
diff --git a/packages/cli/docs/getting-started.doc.mjs b/packages/cli/docs/getting-started.doc.mjsindex 69c266c13c..43319e875c 100644--- a/packages/cli/docs/getting-started.doc.mjs+++ b/packages/cli/docs/getting-started.doc.mjs@@ -21,7 +21,7 @@ export const docs = {type: 'code',lang: 'text',label: 'Paste this into your AI',- code: 'Install @xds/core, @xds/theme-default, and @xds/cli in this project. Run `npx xds init` to set up agent docs. Read the generated files to learn the conventions.',+ code: 'Install @xds/core, @xds/theme-default, and @xds/cli in this project. Run `npx astryx init` to set up agent docs. Read the generated files to learn the conventions.',},],},@@ -46,7 +46,7 @@ export const docs = {type: 'code',lang: 'bash',label: 'Terminal',- code: `npx xds init`,+ code: `npx astryx init`,},],},@@ -67,7 +67,7 @@ export const docs = {},{type: 'prose',- text: 'Available themes: @xds/theme-default (blue accent), @xds/theme-neutral (grayscale), @xds/theme-brutalist (zero radius, monospace). See `npx xds docs theme` for the full theming guide.',+ text: 'Available themes: @xds/theme-default (blue accent), @xds/theme-neutral (grayscale), @xds/theme-brutalist (zero radius, monospace). See `npx astryx docs theme` for the full theming guide.',},],},@@ -168,11 +168,11 @@ pnpm dev`,type: 'code',lang: 'bash',label: 'Terminal',- code: `npm run xds -- component # list all components-npm run xds -- component Button # props, usage, theming for Button-npm run xds -- docs # list all doc topics-npm run xds -- template --list # available page templates-npm run xds -- docs tokens # spacing, color, radius reference`,+ code: `npx astryx component # list all components+npx astryx component Button # props, usage, theming for Button+npx astryx docs # list all doc topics+npx astryx template --list # available page templates+npx astryx docs tokens # spacing, color, radius reference`,},],},diff --git a/packages/cli/docs/migration.doc.mjs b/packages/cli/docs/migration.doc.mjsindex d97c2d8430..7fb3680da7 100644--- a/packages/cli/docs/migration.doc.mjs+++ b/packages/cli/docs/migration.doc.mjs@@ -53,18 +53,18 @@ export const docs = {type: 'code',lang: 'bash',label: 'Migration-oriented CLI pass',- code: `npm run xds -- docs migration-npm run xds -- docs theme-npm run xds -- docs styling-npm run xds -- template --list --type block-npm run xds -- template AppShellTopNavWithSideNav --skeleton-npm run xds -- template PopoverSettingsPanel --skeleton-npm run xds -- component AppShell-npm run xds -- component SideNav-npm run xds -- component TopNav-npm run xds -- component CommandPalette-npm run xds -- component Button-npm run xds -- component TextInput`,+ code: `npx astryx docs migration+npx astryx docs theme+npx astryx docs styling+npx astryx template --list --type block+npx astryx template AppShellTopNavWithSideNav --skeleton+npx astryx template PopoverSettingsPanel --skeleton+npx astryx component AppShell+npx astryx component SideNav+npx astryx component TopNav+npx astryx component CommandPalette+npx astryx component Button+npx astryx component TextInput`,},{type: 'prose',@@ -74,8 +74,8 @@ npm run xds -- component TextInput`,type: 'code',lang: 'bash',label: 'Dense and JSON modes',- code: `npm run xds -- docs migration --dense-npm run xds -- component Button --json`,+ code: `npx astryx docs migration --dense+npx astryx component Button --json`,},],},@@ -237,10 +237,10 @@ export function AppRoot({children}: {children: React.ReactNode}) {code: `We are migrating this existing Tailwind/shadcn app to XDS incrementally.First run:-- npm run xds -- docs migration --dense-- npm run xds -- docs theme --dense-- npm run xds -- docs styling --dense-- npm run xds -- template AppShellTopNavWithSideNav --skeleton+- npx astryx docs migration --dense+- npx astryx docs theme --dense+- npx astryx docs styling --dense+- npx astryx template AppShellTopNavWithSideNav --skeletonThen migrate one route or shell surface at a time. Keep business logic and routing intact. Replace shadcn/Radix/Tailwind primitives with XDS components, remove hardcoded colors, verify light and dark mode, and take screenshots before moving to the next surface.`,},diff --git a/packages/cli/docs/principles.doc.dense.mjs b/packages/cli/docs/principles.doc.dense.mjsindex 3096e68154..8dba705d33 100644--- a/packages/cli/docs/principles.doc.dense.mjs+++ b/packages/cli/docs/principles.doc.dense.mjs@@ -7,8 +7,8 @@ export const docsDense = {sections: [{ title: 'Philosophy', content: [{ type: 'list', items: ['components over primitives', 'semantic tokens over hardcoded values', 'theme-agnostic code', 'open internals'] }] },{ title: 'Rules', content: [{ type: 'list', items: ['use components', 'StyleX or Tailwind for styling', 'semantic tokens only', 'CSS vars for colors', 'controlled form inputs', 'useXDSLinkComponent() for navigation'] }] },- { title: 'Styling', content: [{ type: 'prose', text: 'xstyle prop for component overrides. StyleX or Tailwind for layout. See xds docs styling.' }] },+ { title: 'Styling', content: [{ type: 'prose', text: 'xstyle prop for component overrides. StyleX or Tailwind for layout. See astryx docs styling.' }] },{ title: 'Anti-Patterns', content: [{ type: 'list', items: ['no inline styles on raw elements', 'no hardcoded colors — use tokens or Tailwind semantic classes', 'no hardcoded spacing', 'no hardcoded <a> — use useXDSLinkComponent()', 'read docs before inventing props'] }] },- { title: 'Tokens', content: [{ type: 'prose', text: 'run npx xds docs tokens for full reference' }] },+ { title: 'Tokens', content: [{ type: 'prose', text: 'run npx astryx docs tokens for full reference' }] },],};diff --git a/packages/cli/docs/principles.doc.mjs b/packages/cli/docs/principles.doc.mjsindex 8cd786ed22..40e36400dc 100644--- a/packages/cli/docs/principles.doc.mjs+++ b/packages/cli/docs/principles.doc.mjs@@ -39,8 +39,8 @@ export const docs = {style: 'ordered',items: ['Use components for everything they cover',- 'StyleX or Tailwind for custom styling; both are first-class (see \`npx xds docs styling\`)',- 'Semantic tokens, not hardcoded values (see \`npx xds docs tokens\`)',+ 'StyleX or Tailwind for custom styling; both are first-class (see \`npx astryx docs styling\`)',+ 'Semantic tokens, not hardcoded values (see \`npx astryx docs tokens\`)','CSS custom properties for colors, not hex values','Form inputs are controlled (value + onChange)','Use useLinkComponent() for navigation so consumers can plug in their framework router via LinkProvider',@@ -58,7 +58,7 @@ export const docs = {},{type: 'prose',- text: 'See \`npx xds docs styling\` for the complete guide with examples.',+ text: 'See \`npx astryx docs styling\` for the complete guide with examples.',},],},@@ -85,7 +85,7 @@ export const docs = {content: [{type: 'prose',- text: 'The design system provides semantic design tokens for spacing, color, radius, shadow, typography, and size. Tokens adapt to the active theme and color mode. Run \`npx xds docs tokens\` for the full reference with all values.',+ text: 'The design system provides semantic design tokens for spacing, color, radius, shadow, typography, and size. Tokens adapt to the active theme and color mode. Run \`npx astryx docs tokens\` for the full reference with all values.',},],},diff --git a/packages/cli/docs/principles.doc.zh.mjs b/packages/cli/docs/principles.doc.zh.mjsindex babc22a137..2bdc511159 100644--- a/packages/cli/docs/principles.doc.zh.mjs+++ b/packages/cli/docs/principles.doc.zh.mjs@@ -7,8 +7,8 @@ export const docsZh = {sections: [{ title: '设计哲学', content: [{ type: 'list', items: ['组件优于原始元素 — 优先使用 XDS 组件', '语义化令牌优于硬编码值', '主题无关的代码 — 深色模式自动生效', '开放的内部机制 — 所有基础组件均可导出和组合'] }] },{ title: '规则', content: [{ type: 'list', items: ['所有支持的场景都使用 XDS 组件', '使用 StyleX 或 Tailwind 进行样式设置', '使用语义化令牌,不使用硬编码值', '使用 CSS 变量设置颜色,不使用十六进制值', '表单输入为受控组件(value + onChange)', '使用 useXDSLinkComponent() 进行导航'] }] },- { title: '样式方法', content: [{ type: 'prose', text: '组件覆盖使用 xstyle 属性。布局使用 StyleX 或 Tailwind。详见 xds docs styling。' }] },+ { title: '样式方法', content: [{ type: 'prose', text: '组件覆盖使用 xstyle 属性。布局使用 StyleX 或 Tailwind。详见 astryx docs styling。' }] },{ title: '反模式', content: [{ type: 'list', items: ['不要在原始元素上使用内联样式', '不要硬编码颜色 — 使用令牌或 Tailwind 语义类', '不要硬编码间距', '不要硬编码 <a> 元素 — 使用 useXDSLinkComponent()', '不要自创属性。先阅读组件文档'] }] },- { title: '设计令牌', content: [{ type: 'prose', text: '运行 npx xds docs tokens 查看完整参考' }] },+ { title: '设计令牌', content: [{ type: 'prose', text: '运行 npx astryx docs tokens 查看完整参考' }] },],};diff --git a/packages/cli/docs/styling-libraries.doc.mjs b/packages/cli/docs/styling-libraries.doc.mjsindex 28b70efcbf..ef574a0668 100644--- a/packages/cli/docs/styling-libraries.doc.mjs+++ b/packages/cli/docs/styling-libraries.doc.mjs@@ -24,7 +24,7 @@ export const docs = {},{type: 'prose',- text: 'For available token names and values, run `npx xds docs tokens`. Focused references are also available with `npx xds docs color`, `npx xds docs spacing`, `npx xds docs shape`, `npx xds docs typography`, `npx xds docs elevation`, and `npx xds docs motion`.',+ text: 'For available token names and values, run `npx astryx docs tokens`. Focused references are also available with `npx astryx docs color`, `npx astryx docs spacing`, `npx astryx docs shape`, `npx astryx docs typography`, `npx astryx docs elevation`, and `npx astryx docs motion`.',},],},@@ -452,10 +452,10 @@ function RevenueChart({data}: {data: Array<{x: string; y: number}>}) {type: 'list',style: 'ordered',items: [- 'Import the reset/base CSS and a theme CSS file early enough for first paint. For production SSR, prefer built themes from `npx xds theme build` or published `/built` theme imports plus `theme.css`.',+ 'Import the reset/base CSS and a theme CSS file early enough for first paint. For production SSR, prefer built themes from `npx astryx theme build` or published `/built` theme imports plus `theme.css`.','Choose one owner for color mode. Theme uses `data-theme="light|dark"` and `color-scheme` to resolve `light-dark()` tokens.','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`.',- 'Use `npx xds docs 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.',+ 'Use `npx astryx docs 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.','Use token resolver APIs only for non-CSS APIs that need resolved values.',],},diff --git a/packages/cli/docs/styling.doc.mjs b/packages/cli/docs/styling.doc.mjsindex 6232c29908..39d4aaa288 100644--- a/packages/cli/docs/styling.doc.mjs+++ b/packages/cli/docs/styling.doc.mjs@@ -31,7 +31,7 @@ export const docs = {},{type: 'prose',- text: 'All approaches resolve to the same design tokens, so theming and dark mode work regardless of which you choose. For external styling libraries, run `npx xds docs styling-libraries`; it covers Tailwind, StyleX, Panda, Chakra, MUI, CSS-in-JS, CSS Modules, Sass, and `useTheme()` for non-CSS processing.',+ text: 'All approaches resolve to the same design tokens, so theming and dark mode work regardless of which you choose. For external styling libraries, run `npx astryx docs styling-libraries`; it covers Tailwind, StyleX, Panda, Chakra, MUI, CSS-in-JS, CSS Modules, Sass, and `useTheme()` for non-CSS processing.',},],},@@ -119,7 +119,7 @@ const overrides = stylex.create({},{type: 'prose',- text: 'The bridge is pure CSS with zero JS. Theme changes (dark mode, custom themes) apply automatically because the utilities reference the same CSS custom properties that components use. This is the paved Tailwind path; for other styling libraries that follow the same aliasing pattern, run `npx xds docs styling-libraries`.',+ text: 'The bridge is pure CSS with zero JS. Theme changes (dark mode, custom themes) apply automatically because the utilities reference the same CSS custom properties that components use. This is the paved Tailwind path; for other styling libraries that follow the same aliasing pattern, run `npx astryx docs styling-libraries`.',},],},@@ -264,7 +264,7 @@ const overrides = stylex.create({},{type: 'prose',- text: 'For systematic theming, use defineTheme component overrides instead of raw CSS selectors. defineTheme keeps the higher-level `prop:value` API (`variant:primary`, `size:sm`) and handles selector generation for you. Run `npx xds docs theme` for the full theming guide.',+ text: 'For systematic theming, use defineTheme component overrides instead of raw CSS selectors. defineTheme keeps the higher-level `prop:value` API (`variant:primary`, `size:sm`) and handles selector generation for you. Run `npx astryx docs theme` for the full theming guide.',},],},@@ -335,7 +335,7 @@ const styles = stylex.create({},{type: 'prose',- text: 'See `npx xds docs tokens` for the full token reference (all spacing, color, radius, shadow, and typography tokens with values). See `npx xds docs theme` for how to override tokens via defineTheme.',+ text: 'See `npx astryx docs tokens` for the full token reference (all spacing, color, radius, shadow, and typography tokens with values). See `npx astryx docs theme` for how to override tokens via defineTheme.',},],},diff --git a/packages/cli/docs/theme.doc.dense.mjs b/packages/cli/docs/theme.doc.dense.mjsindex e15470d205..0a5bd1ed2b 100644--- a/packages/cli/docs/theme.doc.dense.mjs+++ b/packages/cli/docs/theme.doc.dense.mjs@@ -10,9 +10,9 @@ export const docsDense = {{ title: 'Props', content: [null] },{ title: 'Custom Theme', content: [{ type: 'prose', text: 'CLI wizard or manual defineTheme. only override tokens that differ.' }, null] },{ title: 'defineTheme', content: [{ type: 'prose', text: 'scale configs (color, typography, radius, motion) + explicit token overrides + component overrides. color derives full palette from accent hex via HCT.' }, null, null] },- { title: 'Component Overrides', content: [{ type: 'prose', text: 'components field uses semantic component keys + style keys (base, variant:value, stateName), not raw selectors. for external CSS, prefer data-* selectors from `xds docs styling`. write standard CSS (borderRadius, padding) — pipeline expands to internal vars. public vars (--button-press-scale etc) set directly. private vars (--_*) cannot be set — use CSS properties. run `npx xds component <Name>` for details.' }, null, null, null, null] },- { title: 'Custom Variants', content: [{ type: 'prose', text: 'any unknown prop:value in components becomes a new variant. xds theme build generates TS augmentations. works on any extensible prop axis (variant, status, etc).' }, null, null, null, null] },- { title: 'Build for Production', content: [{ type: 'prose', text: 'npx xds theme build compiles defineTheme to static CSS. outputs .css + .js (__built:true) + .d.ts.' }, null, null, null, null] },+ { title: 'Component Overrides', content: [{ type: 'prose', text: 'components field uses semantic component keys + style keys (base, variant:value, stateName), not raw selectors. for external CSS, prefer data-* selectors from `astryx docs styling`. write standard CSS (borderRadius, padding) — pipeline expands to internal vars. public vars (--button-press-scale etc) set directly. private vars (--_*) cannot be set — use CSS properties. run `npx astryx component <Name>` for details.' }, null, null, null, null] },+ { title: 'Custom Variants', content: [{ type: 'prose', text: 'any unknown prop:value in components becomes a new variant. astryx theme build generates TS augmentations. works on any extensible prop axis (variant, status, etc).' }, null, null, null, null] },+ { title: 'Build for Production', content: [{ type: 'prose', text: 'npx astryx theme build compiles defineTheme to static CSS. outputs .css + .js (__built:true) + .d.ts.' }, null, null, null, null] },{ title: 'Runtime vs Built', content: [{ type: 'prose', text: 'runtime: useInsertionEffect injects styles client-side. built: static CSS on first paint. USE /built + theme.css FOR SSR.' }, null, null, null] },{ title: 'Light/Dark', content: [{ type: 'prose', text: 'light-dark() in token values via [light, dark] tuples. mode=system follows OS.' }, null, null] },{ title: 'Nesting', content: [{ type: 'prose', text: 'wrap sections in separate <XDSTheme> providers' }, null] },diff --git a/packages/cli/docs/theme.doc.mjs b/packages/cli/docs/theme.doc.mjsindex 2b62fa1d97..c61bc20c4b 100644--- a/packages/cli/docs/theme.doc.mjs+++ b/packages/cli/docs/theme.doc.mjs@@ -114,7 +114,7 @@ function App() {type: 'code',lang: 'bash',label: 'Scaffold with CLI',- code: 'npx xds theme',+ code: 'npx astryx theme',},],},@@ -227,7 +227,7 @@ const brandTheme = defineTheme({content: [{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 `xds docs styling`.',+ 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 `astryx docs styling`.',},{type: 'code',@@ -253,7 +253,7 @@ const brandTheme = defineTheme({},{type: 'prose',- text: 'Run `npx xds component <Name>` to see a component\'s theming targets, public CSS variables, and which standard CSS properties are supported.',+ text: 'Run `npx astryx component <Name>` to see a component\'s theming targets, public CSS variables, and which standard CSS properties are supported.',},{type: 'list',@@ -267,7 +267,7 @@ const brandTheme = defineTheme({type: 'list',style: 'dont',items: [- 'Set private CSS vars (prefixed --_) directly. Use standard CSS properties instead. `xds theme build` will error.',+ 'Set private CSS vars (prefixed --_) directly. Use standard CSS properties instead. `astryx theme build` will error.',],},],@@ -278,7 +278,7 @@ const brandTheme = defineTheme({content: [{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 `xds theme build` to generate TypeScript augmentations for type safety.',+ 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.',},{type: 'code',@@ -311,7 +311,7 @@ const brandTheme = defineTheme({type: 'code',lang: 'tsx',label: 'Using custom variants',- code: `// TypeScript knows about 'primary-muted' after xds theme build+ code: `// TypeScript knows about 'primary-muted' after astryx theme build<Button variant="primary-muted" label="Save draft" /><Banner status="neutral" title="Note" />`,},@@ -327,13 +327,13 @@ const brandTheme = defineTheme({content: [{type: 'prose',- text: '`npx xds 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.',+ text: '`npx 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.',},{type: 'code',lang: 'bash',label: 'Build a theme',- code: 'npx xds theme build ./src/themes/ocean.ts',+ code: 'npx astryx theme build ./src/themes/ocean.ts',},{type: 'prose',@@ -398,7 +398,7 @@ import './themes/ocean.css';['Import (custom theme)','defineTheme() directly',- "Built .js + .css from `npx xds theme build`",+ "Built .js + .css from `npx astryx theme build`",],['How it works',@@ -428,7 +428,7 @@ import './themes/ocean.css';items: ['Use the /built subpath + theme.css for production SSR apps.','Use runtime themes during development for fast iteration.',- 'Run `npx xds theme build` for custom themes to get the built artifacts.',+ 'Run `npx astryx theme build` for custom themes to get the built artifacts.',],},{@@ -576,7 +576,7 @@ function ChartConfig() {},{type: 'prose',- text: 'See `npx xds docs styling-libraries` for styling-library interop and `npx xds docs tokens` for the full token reference.',+ text: 'See `npx astryx docs styling-libraries` for styling-library interop and `npx astryx docs tokens` for the full token reference.',},],},diff --git a/packages/cli/docs/theme.doc.zh.mjs b/packages/cli/docs/theme.doc.zh.mjsindex f6390f5a6a..465ce23e65 100644--- a/packages/cli/docs/theme.doc.zh.mjs+++ b/packages/cli/docs/theme.doc.zh.mjs@@ -10,7 +10,7 @@ export const docsZh = {{ title: 'XDSTheme 属性', content: [null] },{ title: '创建自定义主题', content: [{ type: 'prose', text: '使用 CLI 向导(推荐)或手动 defineTheme。只覆盖与默认值不同的令牌。' }, null] },{ title: 'defineTheme', content: [{ type: 'prose', text: '支持比例配置(typography、radius、motion)+ 显式令牌覆盖 + 组件覆盖。' }, null, null] },- { title: '生产构建', content: [{ type: 'prose', text: 'npx xds theme build 将 defineTheme 编译为静态 CSS。输出 .css + .js(__built:true)+ .d.ts。' }, null, null, null, null] },+ { title: '生产构建', content: [{ type: 'prose', text: 'npx astryx theme build 将 defineTheme 编译为静态 CSS。输出 .css + .js(__built:true)+ .d.ts。' }, null, null, null, null] },{ title: '运行时 vs 构建', content: [{ type: 'prose', text: '运行时:useInsertionEffect 在客户端注入样式。构建:静态 CSS 在首次渲染时就存在。SSR 应用请使用 /built + theme.css。' }, null, null, null] },{ title: '亮/暗模式', content: [{ type: 'prose', text: "令牌值使用 [light, dark] 元组实现自动模式切换。XDSTheme 上 mode='system'(默认)跟随系统偏好。" }, null, null] },{ title: '嵌套主题', content: [{ type: 'prose', text: '将不同部分包裹在独立的 <XDSTheme> 提供者中。' }, null] },diff --git a/packages/cli/docs/tokens.doc.mjs b/packages/cli/docs/tokens.doc.mjsindex f3bb011ac8..2911865593 100644--- a/packages/cli/docs/tokens.doc.mjs+++ b/packages/cli/docs/tokens.doc.mjs@@ -1068,7 +1068,7 @@ export const docs = {},{"type": "prose",- "text": "See `npx xds docs styling` for how to apply tokens via xstyle, className, and compound component patterns. See `npx xds docs theme` for overriding tokens with defineTheme."+ "text": "See `npx astryx docs styling` for how to apply tokens via xstyle, className, and compound component patterns. See `npx astryx docs theme` for overriding tokens with defineTheme."}]}diff --git a/packages/cli/docs/working-with-ai.doc.mjs b/packages/cli/docs/working-with-ai.doc.mjsindex f17d39baa6..3cbd15a04f 100644--- a/packages/cli/docs/working-with-ai.doc.mjs+++ b/packages/cli/docs/working-with-ai.doc.mjs@@ -34,7 +34,7 @@ export const docs = {type: 'code',lang: 'text',label: 'Paste this into your AI',- code: 'Install @xds/cli and run `npx xds agent-docs` to set up your XDS context. Read the generated file.',+ code: 'Install @xds/cli and run `npx astryx agent-docs` to set up your XDS context. Read the generated file.',},{type: 'prose',@@ -48,9 +48,9 @@ export const docs = {type: 'code',lang: 'bash',label: 'Manual options',- code: `npx xds agent-docs --agent claude # CLAUDE.md-npx xds agent-docs --agent cursor # .cursorrules-npx xds agent-docs --agent codex # AGENTS.md (Copilot, Codex, etc.)`,+ code: `npx astryx agent-docs --agent claude # CLAUDE.md+npx astryx agent-docs --agent cursor # .cursorrules+npx astryx agent-docs --agent codex # AGENTS.md (Copilot, Codex, etc.)`,},],},@@ -65,9 +65,9 @@ npx xds agent-docs --agent codex # AGENTS.md (Copilot, Codex, etc.)`,type: 'list',style: 'ordered',items: [- '`npx xds template --list`: find a related page pattern to use as reference',- '`npx xds template <name> --skeleton`: study the layout structure',- '`npx xds component <Name>`: read props and examples for every component used',+ '`npx astryx template --list`: find a related page pattern to use as reference',+ '`npx astryx template <name> --skeleton`: study the layout structure',+ '`npx astryx component <Name>`: read props and examples for every component used',],},{@@ -88,7 +88,7 @@ npx xds agent-docs --agent codex # AGENTS.md (Copilot, Codex, etc.)`,lang: 'bash',label: 'Install as a Cursor user rule',code: `mkdir -p ~/.cursor/rules-npx xds agent-docs --agent-docs-path ~/.cursor/rules/xds.mdc`,+npx astryx agent-docs --agent-docs-path ~/.cursor/rules/xds.mdc`,},],},@@ -109,12 +109,12 @@ npx xds agent-docs --agent-docs-path ~/.cursor/rules/xds.mdc`,2. How do you make an Dialog non-dismissible?3. What prop does Selector use for its items?-If you don't know all three, run \`npx xds init --features agents\` to generate agent docs, then read the generated file.`,+If you don't know all three, run \`npx astryx init --features agents\` to generate agent docs, then read the generated file.`,},],},{- title: 'The npm run xds Pattern',+ title: 'The npx astryx Pattern',content: [{type: 'prose',@@ -130,16 +130,16 @@ If you don't know all three, run \`npx xds init --features agents\` to generate},{type: 'prose',- text: 'With this alias, agents use `npm run xds -- component --list` instead of guessing the binary path. The `--` separator is standard npm convention for passing flags to scripts.',+ text: 'With this alias, agents use `npx astryx component --list` instead of guessing the binary path. The `--` separator is standard npm convention for passing flags to scripts.',},{type: 'code',lang: 'bash',label: 'Reliable CLI invocation',- code: `npm run xds -- component --list-npm run xds -- component Dialog --dense-npm run xds -- docs styling --dense-npm run xds -- docs tokens --dense`,+ code: `npx astryx component --list+npx astryx component Dialog --dense+npx astryx docs styling --dense+npx astryx docs tokens --dense`,},],},@@ -154,9 +154,9 @@ npm run xds -- docs tokens --dense`,type: 'code',lang: 'bash',label: 'Dense output for pasting into AI conversations',- code: `npx xds component Dialog --dense-npx xds docs styling --dense-npx xds docs tokens --dense`,+ code: `npx astryx component Dialog --dense+npx astryx docs styling --dense+npx astryx docs tokens --dense`,},],},diff --git a/packages/cli/src/commands/agent-docs.mjs b/packages/cli/src/commands/agent-docs.mjsindex 55956f32c0..6c09e23fed 100644--- a/packages/cli/src/commands/agent-docs.mjs+++ b/packages/cli/src/commands/agent-docs.mjs@@ -98,7 +98,7 @@ export function resolveAgentPaths(targetDir, agent) {* "look at reference code" reflex before writing any UI.*/export function generateCompressedIndex(version, {coreDir, runPrefix = getRunPrefix()} = {}) {- const run = `${runPrefix} xds`;+ const run = `${runPrefix} astryx`;const lines = [XDS_MARKER_START];// Component count from live discovery@@ -466,7 +466,7 @@ export function registerAgentDocs(program) {}const runPrefix = getRunPrefix(targetDir);- const run = `${runPrefix} xds`;+ const run = `${runPrefix} astryx`;for (const t of targets) {humanLog(`✓ ${t}`);diff --git a/packages/cli/src/commands/agent-docs.test.mjs b/packages/cli/src/commands/agent-docs.test.mjsindex c7481081aa..b7c538d6b7 100644--- a/packages/cli/src/commands/agent-docs.test.mjs+++ b/packages/cli/src/commands/agent-docs.test.mjs@@ -38,29 +38,29 @@ describe('generateCompressedIndex', () => {it('includes theme nudge rule', () => {const result = generateCompressedIndex('1.0.0');- expect(result).toMatch(/xds theme/);+ expect(result).toMatch(/astryx theme/);expect(result).toMatch(/never override --astryx-color/);});it('includes upgrade command and migration rule', () => {const result = generateCompressedIndex('1.0.0');- expect(result).toContain('xds upgrade');- expect(result).toContain('xds upgrade --apply');- expect(result).toMatch(/always run .+ xds upgrade --apply/);+ expect(result).toContain('astryx upgrade');+ expect(result).toContain('astryx upgrade --apply');+ expect(result).toMatch(/always run .+ astryx upgrade --apply/);});it('uses custom runPrefix when provided', () => {const result = generateCompressedIndex('1.0.0', {runPrefix: 'yarn'});- expect(result).toContain('yarn xds component <Name>');- expect(result).toContain('yarn xds upgrade --apply');- expect(result).toContain('after @xds/core bump, always run yarn xds upgrade --apply');- expect(result).not.toContain('npx xds');+ expect(result).toContain('yarn astryx component <Name>');+ expect(result).toContain('yarn astryx upgrade --apply');+ expect(result).toContain('after @xds/core bump, always run yarn astryx upgrade --apply');+ expect(result).not.toContain('npx astryx');});it('uses pnpm exec prefix', () => {const result = generateCompressedIndex('1.0.0', {runPrefix: 'pnpm exec'});- expect(result).toContain('pnpm exec xds component <Name>');- expect(result).not.toContain('npx xds');+ expect(result).toContain('pnpm exec astryx component <Name>');+ expect(result).not.toContain('npx astryx');});});diff --git a/packages/core/src/CheckboxInput/CheckboxInput.doc.mjs b/packages/core/src/CheckboxInput/CheckboxInput.doc.mjsindex ba3efc4b36..2d5a5e29a7 100644--- a/packages/core/src/CheckboxInput/CheckboxInput.doc.mjs+++ b/packages/core/src/CheckboxInput/CheckboxInput.doc.mjs@@ -94,7 +94,7 @@ export const docs = {{name: 'labelIcon',type: 'IconType',- description: 'Icon to display before the label text. See `npx xds docs icons` for valid semantic names.',+ description: 'Icon to display before the label text. See `npx astryx docs icons` for valid semantic names.',},{name: 'status',diff --git a/packages/core/src/DropdownMenu/DropdownMenuItem.doc.mjs b/packages/core/src/DropdownMenu/DropdownMenuItem.doc.mjsindex 1c8e77c3aa..779feed31b 100644--- a/packages/core/src/DropdownMenu/DropdownMenuItem.doc.mjs+++ b/packages/core/src/DropdownMenu/DropdownMenuItem.doc.mjs@@ -12,7 +12,7 @@ export const docs = {{name: 'icon',type: 'IconType',- description: 'Icon to display before the label. See `npx xds docs icons` for valid semantic names.',+ description: 'Icon to display before the label. See `npx astryx docs icons` for valid semantic names.',},{name: 'label',diff --git a/packages/core/src/Field/Field.doc.mjs b/packages/core/src/Field/Field.doc.mjsindex 6084b878f9..66b355ceee 100644--- a/packages/core/src/Field/Field.doc.mjs+++ b/packages/core/src/Field/Field.doc.mjs@@ -84,7 +84,7 @@ export const docs = {{name: 'labelIcon',type: 'IconType',- description: 'Icon to display before the label text. See `npx xds docs icons` for valid semantic names.',+ description: 'Icon to display before the label text. See `npx astryx docs icons` for valid semantic names.',},{name: 'labelTooltip',diff --git a/packages/core/src/Field/FieldLabel.doc.mjs b/packages/core/src/Field/FieldLabel.doc.mjsindex 6c64502db1..b0af260219 100644--- a/packages/core/src/Field/FieldLabel.doc.mjs+++ b/packages/core/src/Field/FieldLabel.doc.mjs@@ -48,7 +48,7 @@ export const docs = {{name: 'labelIcon',type: 'IconType',- description: 'Icon before the label text. See `npx xds docs icons` for valid semantic names.',+ description: 'Icon before the label text. See `npx astryx docs icons` for valid semantic names.',},{name: 'labelTooltip',diff --git a/packages/core/src/Icon/Icon.doc.mjs b/packages/core/src/Icon/Icon.doc.mjsindex d3b92626d9..a63873ae2d 100644--- a/packages/core/src/Icon/Icon.doc.mjs+++ b/packages/core/src/Icon/Icon.doc.mjs@@ -11,7 +11,7 @@ export const docs = {{name: 'icon',type: 'IconName | ComponentType<SVGProps>',- description: 'Semantic icon name or SVG component. Run `npx xds docs icons` for valid names. Note: this prop is called `icon`, not `name`.',+ description: 'Semantic icon name or SVG component. Run `npx astryx docs icons` for valid names. Note: this prop is called `icon`, not `name`.',required: true,},{@@ -56,7 +56,7 @@ export const docsZh = {{name: 'icon',type: 'IconName | ComponentType<SVGProps>',- description: '语义图标名称或 SVG 组件。运行 `npx xds docs icons` 查看可用名称。',+ description: '语义图标名称或 SVG 组件。运行 `npx astryx docs icons` 查看可用名称。',required: true,},{@@ -112,7 +112,7 @@ export const docsDense = {],},propDescriptions: {- icon: 'Semantic icon name or SVG component. See `npx xds docs icons`.',+ icon: 'Semantic icon name or SVG component. See `npx astryx docs icons`.',color: 'Color variant mapped to XDS icon color tokens.',size: 'Icon size.',},diff --git a/packages/core/src/NumberInput/NumberInput.doc.mjs b/packages/core/src/NumberInput/NumberInput.doc.mjsindex 245be252d9..d53e8c432e 100644--- a/packages/core/src/NumberInput/NumberInput.doc.mjs+++ b/packages/core/src/NumberInput/NumberInput.doc.mjs@@ -76,12 +76,12 @@ export const docs = {{name: 'startIcon',type: 'IconType',- description: 'Icon to display at the start of the input. See `npx xds docs icons` for valid semantic names.',+ description: 'Icon to display at the start of the input. See `npx astryx docs icons` for valid semantic names.',},{name: 'labelIcon',type: 'IconType',- description: 'Icon to display before the label text. See `npx xds docs icons` for valid semantic names.',+ description: 'Icon to display before the label text. See `npx astryx docs icons` for valid semantic names.',},{name: 'status',diff --git a/packages/core/src/Selector/SelectorOption.doc.mjs b/packages/core/src/Selector/SelectorOption.doc.mjsindex b11ca170da..ff263e05a3 100644--- a/packages/core/src/Selector/SelectorOption.doc.mjs+++ b/packages/core/src/Selector/SelectorOption.doc.mjs@@ -20,7 +20,7 @@ export const docs = {name: 'icon',type: 'IconType',description:- 'Icon displayed before the label. See `npx xds docs icons` for valid semantic names.',+ 'Icon displayed before the label. See `npx astryx docs icons` for valid semantic names.',},{name: 'description',diff --git a/packages/core/src/SideNav/SideNavItem.doc.mjs b/packages/core/src/SideNav/SideNavItem.doc.mjsindex b8dfad0a46..6d8919204f 100644--- a/packages/core/src/SideNav/SideNavItem.doc.mjs+++ b/packages/core/src/SideNav/SideNavItem.doc.mjs@@ -23,12 +23,12 @@ export const docs = {{name: 'icon',type: 'IconType',- description: 'Icon displayed in the outline (unselected) variant. See `npx xds docs icons` for valid semantic names.',+ description: 'Icon displayed in the outline (unselected) variant. See `npx astryx docs icons` for valid semantic names.',},{name: 'selectedIcon',type: 'IconType',- description: 'Icon displayed when the item is selected (filled variant). See `npx xds docs icons` for valid semantic names.',+ description: 'Icon displayed when the item is selected (filled variant). See `npx astryx docs icons` for valid semantic names.',},{name: 'isSelected',diff --git a/packages/core/src/Switch/Switch.doc.mjs b/packages/core/src/Switch/Switch.doc.mjsindex 4e1bf91111..264c326565 100644--- a/packages/core/src/Switch/Switch.doc.mjs+++ b/packages/core/src/Switch/Switch.doc.mjs@@ -95,7 +95,7 @@ export const docs = {{name: 'labelIcon',type: 'IconType',- description: 'Icon displayed before the label text. See `npx xds docs icons` for valid semantic names.',+ description: 'Icon displayed before the label text. See `npx astryx docs icons` for valid semantic names.',},{name: 'labelTooltip',diff --git a/packages/core/src/TextArea/TextArea.doc.mjs b/packages/core/src/TextArea/TextArea.doc.mjsindex ec000983af..63b1283259 100644--- a/packages/core/src/TextArea/TextArea.doc.mjs+++ b/packages/core/src/TextArea/TextArea.doc.mjs@@ -110,7 +110,7 @@ export const docs = {name: 'startIcon',type: 'IconType',description:- 'Icon component rendered inside the leading edge of the textarea wrapper. See `npx xds docs icons` for valid semantic names.',+ 'Icon component rendered inside the leading edge of the textarea wrapper. See `npx astryx docs icons` for valid semantic names.',},{name: 'hasSpellCheck',diff --git a/packages/core/src/TextInput/TextInput.doc.mjs b/packages/core/src/TextInput/TextInput.doc.mjsindex e21d30fe48..75670f224a 100644--- a/packages/core/src/TextInput/TextInput.doc.mjs+++ b/packages/core/src/TextInput/TextInput.doc.mjs@@ -100,7 +100,7 @@ export const docs = {name: 'startIcon',type: 'IconType',description:- 'SVG icon component displayed at the start of the input. See `npx xds docs icons` for valid semantic names.',+ 'SVG icon component displayed at the start of the input. See `npx astryx docs icons` for valid semantic names.',},{name: 'status',diff --git a/packages/core/src/theme/Theme.doc.mjs b/packages/core/src/theme/Theme.doc.mjsindex 893a1048bc..3808916194 100644--- a/packages/core/src/theme/Theme.doc.mjs+++ b/packages/core/src/theme/Theme.doc.mjs@@ -39,12 +39,12 @@ export const docs = {},usage: {description:- 'Wraps a subtree with a specific XDS theme. For static production themes, use `npx xds theme build` and import the generated CSS plus built theme object for first-paint and SSR performance. Use runtime `defineTheme()` when themes are dynamic or for prototyping.\n\n`defineTheme` accepts a `tokens` object whose keys are CSS custom property names (always prefixed with `--`). Common token names include `--color-accent`, `--color-background-surface`, `--color-background-body`, `--color-text-primary`, `--color-text-secondary`, `--radius-container`, `--spacing-1` through `--spacing-6`. Values can be a string (same for light/dark) or a `[light, dark]` tuple.\n\nExample:\n```ts\nimport {defineTheme} from \'@xds/core/theme\';\nconst myTheme = defineTheme({\n name: \'ocean\',\n tokens: {\n \'--color-accent\': [\'#0077B6\', \'#48CAE4\'],\n \'--color-background-surface\': [\'#F0F8FF\', \'#0A1628\'],\n \'--color-text-primary\': [\'#0A1317\', \'#FFFFFF\'],\n \'--radius-container\': \'16px\',\n },\n});\n```',+ 'Wraps a subtree with a specific XDS theme. For static production themes, use `npx astryx theme build` and import the generated CSS plus built theme object for first-paint and SSR performance. Use runtime `defineTheme()` when themes are dynamic or for prototyping.\n\n`defineTheme` accepts a `tokens` object whose keys are CSS custom property names (always prefixed with `--`). Common token names include `--color-accent`, `--color-background-surface`, `--color-background-body`, `--color-text-primary`, `--color-text-secondary`, `--radius-container`, `--spacing-1` through `--spacing-6`. Values can be a string (same for light/dark) or a `[light, dark]` tuple.\n\nExample:\n```ts\nimport {defineTheme} from \'@xds/core/theme\';\nconst myTheme = defineTheme({\n name: \'ocean\',\n tokens: {\n \'--color-accent\': [\'#0077B6\', \'#48CAE4\'],\n \'--color-background-surface\': [\'#F0F8FF\', \'#0A1628\'],\n \'--color-text-primary\': [\'#0A1317\', \'#FFFFFF\'],\n \'--radius-container\': \'16px\',\n },\n});\n```',bestPractices: [{guidance: true,description:- 'Build app themes that are known ahead of time with `npx xds theme build`, then import the generated CSS and built theme object.',+ 'Build app themes that are known ahead of time with `npx astryx theme build`, then import the generated CSS and built theme object.',},{guidance: true,@@ -90,12 +90,12 @@ export const docs = {export const docsDense = {usage: {description:- 'Wraps subtree w/ specific XDS theme. For static production themes, use `npx xds theme build` + generated CSS + built theme object for first-paint/SSR performance. Use runtime `defineTheme()` for dynamic themes or prototyping. Token names always start with `--` (e.g. `--color-accent`, `--color-background-surface`).',+ 'Wraps subtree w/ specific XDS theme. For static production themes, use `npx astryx theme build` + generated CSS + built theme object for first-paint/SSR performance. Use runtime `defineTheme()` for dynamic themes or prototyping. Token names always start with `--` (e.g. `--color-accent`, `--color-background-surface`).',bestPractices: [{guidance: true,description:- 'Build app themes known ahead of time w/ `npx xds theme build`; import generated CSS + built theme object.',+ 'Build app themes known ahead of time w/ `npx astryx theme build`; import generated CSS + built theme object.',},{guidance: true,diff --git a/scripts/generate-token-docs.mjs b/scripts/generate-token-docs.mjsindex 9278e0e22e..06b33671cb 100644--- a/scripts/generate-token-docs.mjs+++ b/scripts/generate-token-docs.mjs@@ -232,7 +232,7 @@ const styles = stylex.create({},{type: 'prose',- text: "See `npx xds docs styling` for how to apply tokens via xstyle, className, and compound component patterns. See `npx xds docs theme` for overriding tokens with defineTheme.",+ text: "See `npx astryx docs styling` for how to apply tokens via xstyle, className, and compound component patterns. See `npx astryx docs theme` for overriding tokens with defineTheme.",},],});