An open source design system that's fully customizable and agent ready
TypeScript
refactor(cli): rename CLI command/bin from xds to astryx (#3019)
EJ Hammond1865b45958d6
diff --git a/.changeset/cli-astryx-bin.md b/.changeset/cli-astryx-bin.mdnew file mode 100644index 0000000000..d0b8b26a18--- /dev/null+++ b/.changeset/cli-astryx-bin.md@@ -0,0 +1,14 @@+---+'@astryxdesign/cli': patch+---++[breaking] Rename the CLI command/bin from `xds` to `astryx`+@ejhammond++The CLI binary is now `astryx` (was `xds`); `bin/xds.mjs` is renamed to+`bin/astryx.mjs`, the dual `xds`+`astryx` bin entries collapse to a single+`astryx`, and the program/manifest name is `astryx`. Invoke the CLI as+`npx astryx <command>` (e.g. `npx astryx component Button`). The swizzle+default output dir moves from `./components/xds` to `./components/astryx`.+Consumers using `npx xds`, an `xds` npm-script alias, or the `xds` MCP server+name should switch to `astryx`. Part of removing `xds` naming from the public API.diff --git a/.claude/commands/create-theme.md b/.claude/commands/create-theme.mdindex 441b5ab3c9..5b2849c5a7 100644--- a/.claude/commands/create-theme.md+++ b/.claude/commands/create-theme.md@@ -145,7 +145,7 @@ Component overrides generate scoped CSS:### Distribution- **Unbuilt**: `XDSTheme` generates CSS and injects `<style>` at runtime-- **Built**: `npx xds theme build` pre-compiles to a CSS file+- **Built**: `npx astryx theme build` pre-compiles to a CSS file## Extending an Existing Themediff --git a/.claude/commands/vibe-test.md b/.claude/commands/vibe-test.mdindex e056e3e3d4..edc4b3aba3 100644--- a/.claude/commands/vibe-test.md+++ b/.claude/commands/vibe-test.md@@ -53,7 +53,7 @@ Each sub-agent must:1. **Read the task file** at `results/<iteration>/tasks/<promptId>.json` (on the `xds` node)2. **Read the target-specific agent doc:**- - XDS → `AGENTS.md` (generated) + run `npx xds component --brief-all` for component catalog+ - XDS → `AGENTS.md` (generated) + run `npx astryx component --brief-all` for component catalog- Baseline → `AGENTS.baseline.md` + read `.baseline-docs/`- HTML → `AGENTS.html.md` (no design system docs needed)3. **Generate a React component** as a `.tsx` file responding to the promptdiff --git a/.claude/skills/writing-component-docs.md b/.claude/skills/writing-component-docs.mdindex 89ba555f3b..579fd615eb 100644--- a/.claude/skills/writing-component-docs.md+++ b/.claude/skills/writing-component-docs.md@@ -108,12 +108,12 @@ The CLI merges this onto `docs`: compressed descriptions replace English ones, b## CLI Flags```bash-npx xds component Button # Full docs (default)-npx xds --detail compact component Button # Token-optimized format-npx xds --detail brief component Button # Minimal one-line summary-npx xds --lang zh component Button # Chinese prose, same structure-npx xds --lang dense component Button # Compressed prose, same structure-npx xds --detail compact --lang dense component Button # Compact + compressed+npx astryx component Button # Full docs (default)+npx astryx --detail compact component Button # Token-optimized format+npx astryx --detail brief component Button # Minimal one-line summary+npx astryx --lang zh component Button # Chinese prose, same structure+npx astryx --lang dense component Button # Compressed prose, same structure+npx astryx --detail compact --lang dense component Button # Compact + compressed````--lang` controls which prose translation is used. `--detail` controls how much detail (full, compact, brief). They compose independently.@@ -134,9 +134,9 @@ Content is structured as sections with ordered content blocks:To add a new reference doc: create `packages/cli/docs/mytopic.doc.mjs` exporting a `docs` constant. It auto-discovers.```bash-npx xds docs # list topics-npx xds docs tokens # full output-npx xds docs tokens spacing # single section-npx xds --detail compact docs tokens # agent-friendly-npx xds --lang dense docs tokens # compressed prose+npx astryx docs # list topics+npx astryx docs tokens # full output+npx astryx docs tokens spacing # single section+npx astryx --detail compact docs tokens # agent-friendly+npx astryx --lang dense docs tokens # compressed prose```diff --git a/.github/scripts/api-cli-parity-test.mjs b/.github/scripts/api-cli-parity-test.mjsindex f34fef6cf8..b33b5be6a9 100644--- a/.github/scripts/api-cli-parity-test.mjs+++ b/.github/scripts/api-cli-parity-test.mjs@@ -19,7 +19,7 @@ import * as path from 'node:path';import * as fs from 'node:fs';const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../..');-const CLI = path.join(ROOT, 'packages/cli/bin/xds.mjs');+const CLI = path.join(ROOT, 'packages/cli/bin/astryx.mjs');const skipBaseline = process.argv.includes('--no-baseline');const baselineRef = process.argv.includes('--baseline')? process.argv[process.argv.indexOf('--baseline') + 1]@@ -278,7 +278,7 @@ if (!skipBaseline) {if (!fs.existsSync(path.join(wt, 'node_modules'))) {execSync('pnpm install --frozen-lockfile 2>/dev/null || true', {cwd: wt, timeout: 60_000});}- const oldCli = path.join(wt, 'packages/cli/bin/xds.mjs');+ const oldCli = path.join(wt, 'packages/cli/bin/astryx.mjs');for (const r of results) {const old = spawnSync(process.execPath, [oldCli, '--json', ...r.cli], {cwd: wt, encoding: 'utf8', timeout: 30_000,diff --git a/.github/scripts/cli-json-smoke-test.mjs b/.github/scripts/cli-json-smoke-test.mjsindex 6418132bbc..9c9a2944c3 100644--- a/.github/scripts/cli-json-smoke-test.mjs+++ b/.github/scripts/cli-json-smoke-test.mjs@@ -25,7 +25,7 @@ import * as path from 'node:path';const __dirname = path.dirname(fileURLToPath(import.meta.url));const ROOT = path.resolve(__dirname, '../..');-const CLI = path.join(ROOT, 'packages/cli/bin/xds.mjs');+const CLI = path.join(ROOT, 'packages/cli/bin/astryx.mjs');let passed = 0;let failed = 0;@@ -167,7 +167,7 @@ function checkJson(label, args, {expectError = false, expectType = null} = {}) {}// ----------------------------------------------------------------------------// 1. Auto-discover components from xds component --list (text mode)+// 1. Auto-discover components from astryx component --list (text mode)// ---------------------------------------------------------------------------const listResult = run(['component', '--list']);const componentNames = listResult.stdout@@ -181,7 +181,7 @@ console.log(`\ndiscovered ${componentNames.length} components`);const sampleComponent = componentNames.includes('Button') ? 'Button' : componentNames[0];// ----------------------------------------------------------------------------// 2. Auto-discover doc topics from xds docs (text mode)+// 2. Auto-discover doc topics from astryx docs (text mode)// ---------------------------------------------------------------------------const docsResult = run(['docs']);const docTopics = docsResult.stdoutdiff --git a/.github/scripts/cli-smoke-test.mjs b/.github/scripts/cli-smoke-test.mjsindex f16d87310c..0859603e02 100644--- a/.github/scripts/cli-smoke-test.mjs+++ b/.github/scripts/cli-smoke-test.mjs@@ -4,12 +4,12 @@/*** CLI smoke test — auto-discovers every command and checks for output + clean exit.*- * Nothing is hardcoded. Components are discovered from `xds component --list`,- * doc topics from `xds docs`, and detail levels from `xds --help`.+ * Nothing is hardcoded. Components are discovered from `astryx component --list`,+ * doc topics from `astryx docs`, and detail levels from `xds --help`.** Catches regressions like:- * - xds component <name> crashing on bad imports- * - xds docs returning empty content+ * - astryx component <name> crashing on bad imports+ * - astryx docs returning empty content* - any command exiting non-zero** Usage:@@ -25,7 +25,7 @@ import * as path from 'node:path';const __dirname = path.dirname(fileURLToPath(import.meta.url));const ROOT = path.resolve(__dirname, '../..');-const CLI = path.join(ROOT, 'packages/cli/bin/xds.mjs');+const CLI = path.join(ROOT, 'packages/cli/bin/astryx.mjs');let passed = 0;let failed = 0;@@ -86,10 +86,10 @@ const DETAIL_LEVELS = detailMatchconsole.log(`detail levels: ${DETAIL_LEVELS.join(', ')}`);// ----------------------------------------------------------------------------// 2. Discover components from xds component --list+// 2. Discover components from astryx component --list// ---------------------------------------------------------------------------console.log('\ncomponent listing');-check('xds component --list', ['component', '--list']);+check('astryx component --list', ['component', '--list']);const listResult = run(['component', '--list']);const componentNames = listResult.stdout@@ -115,7 +115,7 @@ const categories = listResult.stdoutconsole.log(`discovered ${categories.length} categories: ${categories.join(', ')}`);// ----------------------------------------------------------------------------// 4. Discover doc topics from xds docs+// 4. Discover doc topics from astryx docs// ---------------------------------------------------------------------------const docsResult = run(['docs']);const docTopics = docsResult.stdout@@ -131,34 +131,34 @@ console.log(`discovered ${docTopics.length} doc topics: ${docTopics.join(', ')}`// component --list with each detail levelfor (const detail of DETAIL_LEVELS) {- check(`xds component --list --detail ${detail}`, ['component', '--list', '--detail', detail]);+ check(`astryx component --list --detail ${detail}`, ['component', '--list', '--detail', detail]);}// component --category for each categoryconsole.log(`\ncomponent --category (${categories.length} categories)`);for (const cat of categories) {- check(`xds component --category ${cat}`, ['component', '--category', cat]);+ check(`astryx component --category ${cat}`, ['component', '--category', cat]);}// component docs: every component x every detail levelconsole.log(`\ncomponent docs (${componentNames.length} components x ${DETAIL_LEVELS.length} detail levels)`);for (const name of componentNames) {for (const detail of DETAIL_LEVELS) {- check(`xds component ${name} --detail ${detail}`, ['component', name, '--detail', detail]);+ check(`astryx component ${name} --detail ${detail}`, ['component', name, '--detail', detail]);}}// component --props for every componentconsole.log(`\ncomponent --props (${componentNames.length} components)`);for (const name of componentNames) {- check(`xds component ${name} --props`, ['component', name, '--props']);+ check(`astryx component ${name} --props`, ['component', name, '--props']);}// docs for each topicconsole.log('\ndocs');-check('xds docs (no args)', ['docs']);+check('astryx docs (no args)', ['docs']);for (const topic of docTopics) {- check(`xds docs ${topic}`, ['docs', topic]);+ check(`astryx docs ${topic}`, ['docs', topic]);}// ---------------------------------------------------------------------------diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex d9b511f5ad..aa4522dfc0 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -67,7 +67,7 @@ jobs:- run: pnpm install --frozen-lockfile- # docsite `generate` runs `xds theme build`, which imports the compiled+ # docsite `generate` runs `astryx theme build`, which imports the compiled# @astryxdesign/core/theme entry (dist/theme/index.js). Build core first so that# entry exists — otherwise generate fails with "Cannot find module".- name: Build core packagediff --git a/CLAUDE.md b/CLAUDE.mdindex 8e7eb3b6e1..2bc5bc24de 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -119,7 +119,7 @@ Documentation lives in two places:<!-- XDS-CLI:START -->XDS CLI|Run from repo root. Load agent docs before any component work.-XDS="node packages/cli/bin/xds.mjs"+XDS="node packages/cli/bin/astryx.mjs"BOOTSTRAP (run every branch, <500ms):$XDS help # discover all commands and options$XDS docs # list available doc topicsdiff --git a/README.md b/README.mdindex 10807d3e35..03ce572aee 100644--- a/README.md+++ b/README.md@@ -43,7 +43,7 @@ For reliable CLI access, add this script to your `package.json`:```json"scripts": {- "xds": "node node_modules/@astryxdesign/cli/bin/xds.mjs"+ "xds": "node node_modules/@astryxdesign/cli/bin/astryx.mjs"}```diff --git a/apps/docsite/.gitignore b/apps/docsite/.gitignoreindex 94f7146525..a22b86b707 100644--- a/apps/docsite/.gitignore+++ b/apps/docsite/.gitignore@@ -12,7 +12,7 @@ public/playground-types.jsonpublic/monaco/public/vendor/-# Auto-generated by `xds theme build` (pnpm build:theme). The theme source+# Auto-generated by `astryx theme build` (pnpm build:theme). The theme source# lives at src/themes/astryxTheme.ts; the built JS/CSS/d.ts files are# regenerated locally and in CI before next dev / next build.src/themes/astryx.jsdiff --git a/apps/docsite/package.json b/apps/docsite/package.jsonindex a9f58d6fdc..50ca1aed5d 100644--- a/apps/docsite/package.json+++ b/apps/docsite/package.json@@ -3,7 +3,7 @@"version": "0.0.1","private": true,"scripts": {- "build:theme": "xds theme build src/themes/astryxTheme.ts --out src/themes/astryx.css",+ "build:theme": "astryx theme build src/themes/astryxTheme.ts --out src/themes/astryx.css","generate": "pnpm build:theme && node scripts/generate-data.mjs && node scripts/generate-scope.mjs && node scripts/generate-playground-types.mjs && node scripts/copy-vendor.mjs","dev": "pnpm generate && next dev","build": "pnpm generate && next build",diff --git a/apps/docsite/src/app/(docs)/docs/[topic]/page.tsx b/apps/docsite/src/app/(docs)/docs/[topic]/page.tsxindex 05901753a7..b5579ac87a 100644--- a/apps/docsite/src/app/(docs)/docs/[topic]/page.tsx+++ b/apps/docsite/src/app/(docs)/docs/[topic]/page.tsx@@ -40,7 +40,7 @@ function getInstallSteps(pkgName: string): InstallStep[] {if (pkgName.endsWith('/cli')) {return [{label: 'Install the CLI', code: `npm install -D ${pkgName}`},- {label: 'Run a command', code: `npx xds component --list`},+ {label: 'Run a command', code: `npx astryx component --list`},];}return [diff --git a/apps/docsite/src/components/TemplatePreviewDialog.tsx b/apps/docsite/src/components/TemplatePreviewDialog.tsxindex ad7b6d722f..6310063fb4 100644--- a/apps/docsite/src/components/TemplatePreviewDialog.tsx+++ b/apps/docsite/src/components/TemplatePreviewDialog.tsx@@ -161,7 +161,7 @@ function TemplatePreviewHeader({const copyButton = (<HStack gap={2} vAlign="center">- <Code>{`npx xds template ${item.slug}`}</Code>+ <Code>{`npx astryx template ${item.slug}`}</Code><Buttonvariant="ghost"isIconOnly@@ -287,7 +287,7 @@ export function TemplatePreviewDialog({return null;}- const useCommand = `npx xds template ${current.slug} ./src/app/${current.slug}`;+ const useCommand = `npx astryx template ${current.slug} ./src/app/${current.slug}`;const handleCopyCmd = useCallback(() => {navigator.clipboard.writeText(useCommand).then(() => {setCmdCopied(true);diff --git a/apps/docsite/src/themes/astryxTheme.ts b/apps/docsite/src/themes/astryxTheme.tsindex 329edf367c..fe22244afc 100644--- a/apps/docsite/src/themes/astryxTheme.ts+++ b/apps/docsite/src/themes/astryxTheme.ts@@ -27,7 +27,7 @@import {defineTheme, type TokenValue} from '@astryxdesign/core/theme';// Relative import (not the `@/` alias) because this theme file is also loaded-// in isolation by the `xds theme build` CLI via jiti, which does not resolve+// in isolation by the `astryx theme build` CLI via jiti, which does not resolve// the `@/*` tsconfig path alias.import {BRAND_BLUE} from '../constants';diff --git a/apps/sandbox/.gitignore b/apps/sandbox/.gitignoreindex b111587c53..340703d198 100644--- a/apps/sandbox/.gitignore+++ b/apps/sandbox/.gitignore@@ -1,6 +1,6 @@node_modules-# Auto-generated by `xds init --features agents` (postinstall)+# Auto-generated by `astryx init --features agents` (postinstall)AGENTS.mdastryx.config.mjs.claude/CLAUDE.mddiff --git a/apps/sandbox/README.md b/apps/sandbox/README.mdindex c55cb83fe4..ba0e2f3974 100644--- a/apps/sandbox/README.md+++ b/apps/sandbox/README.md@@ -12,12 +12,12 @@ Before writing any code, install dependencies:npm install```-This automatically generates `AGENTS.md` with the XDS component index via `xds init --features agents`. **Read `AGENTS.md` for all XDS component documentation**: it contains CLI commands to browse components, tokens, themes, and design rules.+This automatically generates `AGENTS.md` with the XDS component index via `astryx init --features agents`. **Read `AGENTS.md` for all XDS component documentation**: it contains CLI commands to browse components, tokens, themes, and design rules.If `AGENTS.md` is missing, regenerate it:```bash-npx xds init --features agents+npx astryx init --features agents```## How it worksdiff --git a/apps/sandbox/package.json b/apps/sandbox/package.jsonindex 078c9d1ab1..75c46e3d04 100644--- a/apps/sandbox/package.json+++ b/apps/sandbox/package.json@@ -10,7 +10,7 @@"dev": "pnpm generate && (node ../../scripts/sync-templates.js --watch & next dev)","build": "pnpm generate && next build","start": "next start",- "postinstall": "xds init --features agents"+ "postinstall": "astryx init --features agents"},"dependencies": {"@heroicons/react": "^2.2.0",diff --git a/apps/sandbox/scripts/generate-changelog.js b/apps/sandbox/scripts/generate-changelog.jsindex e258ea9661..3f0608d2f3 100644--- a/apps/sandbox/scripts/generate-changelog.js+++ b/apps/sandbox/scripts/generate-changelog.js@@ -65,10 +65,10 @@ function parseChangelog(markdown, pkg) {if (inCodeBlock) {if (currentVersion && currentSection === 'upgrade') {const applyMatch = codeBlockContent.match(- /npx xds upgrade --apply --to [\d.]+/,+ /npx astryx upgrade --apply --to [\d.]+/,);const dryMatch = codeBlockContent.match(- /npx xds upgrade --to [\d.]+/,+ /npx astryx upgrade --to [\d.]+/,);if (applyMatch) currentVersion.upgradeCommand = applyMatch[0];if (dryMatch) currentVersion.dryRunCommand = dryMatch[0];@@ -140,10 +140,10 @@ function parseChangelog(markdown, pkg) {// Upgrade section: extract dry-run and apply commands from proseif (currentSection === 'upgrade') {- const dryMatch = line.match(/`(npx xds upgrade --to [\d.]+)`/);+ const dryMatch = line.match(/`(npx astryx upgrade --to [\d.]+)`/);if (dryMatch) currentVersion.dryRunCommand = dryMatch[1];const applyMatch = line.match(- /`(npx xds upgrade --apply --to [\d.]+)`/,+ /`(npx astryx upgrade --apply --to [\d.]+)`/,);if (applyMatch) currentVersion.upgradeCommand = applyMatch[1];continue;diff --git a/internal/eslint-plugin-astryx/no-raw-console-cli.js b/internal/eslint-plugin-astryx/no-raw-console-cli.jsindex cf052df93c..c82f574392 100644--- a/internal/eslint-plugin-astryx/no-raw-console-cli.js+++ b/internal/eslint-plugin-astryx/no-raw-console-cli.js@@ -23,13 +23,13 @@* and the banner — and are exempt:* - packages/cli/src/lib/json.mjs (defines humanLog / jsonOut)* - packages/cli/src/index.mjs (wiring / banner)- * - packages/cli/bin/xds.mjs (entrypoint / error boundary)+ * - packages/cli/bin/astryx.mjs (entrypoint / error boundary)*/const EXEMPT_SUFFIXES = ['packages/cli/src/lib/json.mjs','packages/cli/src/index.mjs',- 'packages/cli/bin/xds.mjs',+ 'packages/cli/bin/astryx.mjs',];function isExempt(filename) {diff --git a/internal/eslint-plugin-astryx/no-raw-console-cli.test.mjs b/internal/eslint-plugin-astryx/no-raw-console-cli.test.mjsindex 975880a502..1b08ed7b28 100644--- a/internal/eslint-plugin-astryx/no-raw-console-cli.test.mjs+++ b/internal/eslint-plugin-astryx/no-raw-console-cli.test.mjs@@ -41,10 +41,10 @@ ruleTester.run('no-raw-console-cli', rule, {code: `console.log('banner');`,filename: '/repo/packages/cli/src/index.mjs',},- // Exempt: bin/xds.mjs (entrypoint / error boundary)+ // Exempt: bin/astryx.mjs (entrypoint / error boundary){code: `console.log('raw');`,- filename: '/repo/packages/cli/bin/xds.mjs',+ filename: '/repo/packages/cli/bin/astryx.mjs',},// Exemption is path-suffix based and tolerant of Windows separators{diff --git a/internal/vibe-tests/environments/project-xds-tailwind/README.md b/internal/vibe-tests/environments/project-xds-tailwind/README.mdindex 8c3bdb0bbd..9277e55c76 100644--- a/internal/vibe-tests/environments/project-xds-tailwind/README.md+++ b/internal/vibe-tests/environments/project-xds-tailwind/README.md@@ -3,9 +3,9 @@This project uses XDS components with Tailwind CSS. Use the CLI to look up component props and usage before writing code:```bash-npx xds component --list # list all available components-npx xds component Button # look up props, variants, and usage-npx xds component IconButton # each component has its own entry+npx astryx component --list # list all available components+npx astryx component Button # look up props, variants, and usage+npx astryx component IconButton # each component has its own entry```Components use:diff --git a/internal/vibe-tests/environments/project-xds/README.md b/internal/vibe-tests/environments/project-xds/README.mdindex 1e01e3f6f3..467971f5c8 100644--- a/internal/vibe-tests/environments/project-xds/README.md+++ b/internal/vibe-tests/environments/project-xds/README.md@@ -3,9 +3,9 @@This project uses XDS components. Use the CLI to look up component props and usage before writing code:```bash-npx xds component --list # list all available components-npx xds component Button # look up props, variants, and usage-npx xds component IconButton # each component has its own entry+npx astryx component --list # list all available components+npx astryx component Button # look up props, variants, and usage+npx astryx component IconButton # each component has its own entry```If the CLI is not available, install dependencies first:diff --git a/internal/vibe-tests/src/correct-previews.ts b/internal/vibe-tests/src/correct-previews.tsindex 747085e138..de4b75ade7 100644--- a/internal/vibe-tests/src/correct-previews.ts+++ b/internal/vibe-tests/src/correct-previews.ts@@ -79,7 +79,7 @@ function getComponentDocs(code: string, target: string): string {for (const comp of components) {try {const output = execSync(- `npx xds component ${comp.replace('XDS', '')} --compact 2>/dev/null`,+ `npx astryx component ${comp.replace('XDS', '')} --compact 2>/dev/null`,{cwd: REPO_ROOT, encoding: 'utf-8', timeout: 5000},);if (output.trim()) {diff --git a/internal/vibe-tests/src/interactive.ts b/internal/vibe-tests/src/interactive.tsindex 12679e3e89..76a059f2c2 100644--- a/internal/vibe-tests/src/interactive.ts+++ b/internal/vibe-tests/src/interactive.ts@@ -743,15 +743,15 @@ function installAgentsDocs(): void {}}- // Generate fresh AGENTS.md from xds init CLI+ // Generate fresh AGENTS.md from astryx init CLItry {- execSync('npx xds init --features agents --agent-docs-path AGENTS.md', {+ execSync('npx astryx init --features agents --agent-docs-path AGENTS.md', {cwd: vibeTestsDir,stdio: 'pipe',});- console.log('✓ Generated AGENTS.md from CLI (xds init)');+ console.log('✓ Generated AGENTS.md from CLI (astryx init)');} catch (_error) {- console.warn('⚠ Failed to generate AGENTS.md via xds init');+ console.warn('⚠ Failed to generate AGENTS.md via astryx init');}}@@ -779,7 +779,7 @@ function installAstryxDocs(): void {// Update the header/brandingcontent = content.replace(/\bXDS\b/g, 'Astryx');content = content.replace(/`xds /g, '`astryx ');- content = content.replace(/npx xds /g, 'npx astryx ');+ content = content.replace(/npx astryx /g, 'npx astryx ');// CSS custom properties: docs should reference the new --astryx-* names// (the library still handles --xds-* via inverted fallback, but we don't// recommend the legacy names in forward-facing docs)diff --git a/internal/vibe-tests/src/setup-environment.mjs b/internal/vibe-tests/src/setup-environment.mjsindex c121fba2ef..3a625102e9 100644--- a/internal/vibe-tests/src/setup-environment.mjs+++ b/internal/vibe-tests/src/setup-environment.mjs@@ -75,10 +75,10 @@ export function createAgentProject(target, iterDir, promptId) {const themeDefaultLink = path.join(projectDir, 'node_modules', '@astryxdesign', 'theme-default');fs.symlinkSync(path.join(REPO_ROOT, 'packages', 'themes', 'default'), themeDefaultLink, 'dir');- // Symlink node_modules/.bin/xds → cli bin so npx xds works+ // Symlink node_modules/.bin/astryx → cli bin so npx astryx worksconst binDir = path.join(projectDir, 'node_modules', '.bin');ensureDir(binDir);- fs.symlinkSync(path.join(REPO_ROOT, 'packages', 'cli', 'bin', 'xds.mjs'), path.join(binDir, 'xds'), 'file');+ fs.symlinkSync(path.join(REPO_ROOT, 'packages', 'cli', 'bin', 'astryx.mjs'), path.join(binDir, 'astryx'), 'file');}if (target === 'baseline') {diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.mdindex 8a465a9ac0..1ef4bcd504 100644--- a/packages/cli/CHANGELOG.md+++ b/packages/cli/CHANGELOG.md@@ -4,37 +4,37 @@#### Breaking Changes-- **New `xds upgrade` codemods** — This release ships codemods for the DatePicker→Input rename (`rename-date-picker-to-input`), Stack `element`→`as` (`rename-stack-element-to-as`), Chat `isStreaming`→`isStopShown` (`rename-isStreaming-to-isStopShown`), imperative `ref`→`handleRef` (`rename-imperative-ref-to-handleRef`), the menu/selector `children`→`endContent` move (`migrate-item-children-to-endcontent`), and the selector function-children→`renderOption` move (`migrate-selector-children-to-render-option`). The bare-name migration (`drop-xds-prefix-imports`, `drop-xds-meta-prefix`) and the theme `migrate-theme-selectors-to-data-attrs` codemod ship as optional, run them explicitly. (#2879, #2957)+- **New `astryx upgrade` codemods** — This release ships codemods for the DatePicker→Input rename (`rename-date-picker-to-input`), Stack `element`→`as` (`rename-stack-element-to-as`), Chat `isStreaming`→`isStopShown` (`rename-isStreaming-to-isStopShown`), imperative `ref`→`handleRef` (`rename-imperative-ref-to-handleRef`), the menu/selector `children`→`endContent` move (`migrate-item-children-to-endcontent`), and the selector function-children→`renderOption` move (`migrate-selector-children-to-render-option`). The bare-name migration (`drop-xds-prefix-imports`, `drop-xds-meta-prefix`) and the theme `migrate-theme-selectors-to-data-attrs` codemod ship as optional, run them explicitly. (#2879, #2957)#### Upgrade```bash-npx xds upgrade --apply+npx astryx upgrade --apply```#### New Features- **`astryx` binary** — The CLI is now also available as `astryx` (same launcher as `xds`), part of the un-prefix migration. Component discovery, the doc gate, and CI checks are prefix-agnostic — both `XDS{Name}.tsx` and bare `{Name}.tsx` source files are recognized. (#2867, #2878)-- **`xds doctor`** — New health-check command for diagnosing project/setup issues. (#2565)-- **Unified search** — `xds search` searches across components, hooks, docs, and templates in one query. (#2564)+- **`astryx doctor`** — New health-check command for diagnosing project/setup issues. (#2565)+- **Unified search** — `astryx search` searches across components, hooks, docs, and templates in one query. (#2564)- **Capability manifest** — Full machine-readable capability manifest for agent discovery, plus stable machine-readable error codes on every error. (#2562, #2563)- **`@xds/cli/api` hook export** — The `hook` is exposed via `@xds/cli/api` with types and parity coverage. (#2558)-- **CLI exit-code policy** — Every user-visible error now exits with code 1 in both human and `--json` modes (previously several command-layer errors printed a message but exited 0, invisible to CI scripts and AI agents). `xds bogus-cmd`, `xds theme bogus-subcommand`, the bare `theme` group with an unknown subcommand, and "command not found"/"did you mean…" paths all exit 1. Help, version, and bare-list invocations still exit 0. Introduces `lib/cli-error.mjs` as the canonical exit-code helper.+- **CLI exit-code policy** — Every user-visible error now exits with code 1 in both human and `--json` modes (previously several command-layer errors printed a message but exited 0, invisible to CI scripts and AI agents). `xds bogus-cmd`, `astryx theme bogus-subcommand`, the bare `theme` group with an unknown subcommand, and "command not found"/"did you mean…" paths all exit 1. Help, version, and bare-list invocations still exit 0. Introduces `lib/cli-error.mjs` as the canonical exit-code helper.- **Migration guide** — Added an explicit guide for moving existing Tailwind, shadcn, and Radix applications to XDS incrementally.- **Data-attribute selector docs** — Documented the data-attribute selector surface in CLI docs alongside the core dual-emit change.#### Fixes- **`--json` on Commander short-circuits** — `--json` now honored on parse errors and `--help`. A new shim wires `exitOverride()` and a JSON-aware `configureOutput` onto every command and patches `outputHelp` to emit a `{apiVersion, type:'help', data}` envelope under `--json`. Parse errors produce `{apiVersion, error}` on stdout with exit 1; unknown subcommands now error instead of silently emitting help with exit 0; `--detail` is choice-validated. Non-`--json` invocations are unchanged.-- **`--json` contract enforcement** — Commands that don't support `--json` reject the flag in a `preAction` hook _before_ running side effects, so `xds init --json` no longer creates files and _then_ errors, leaving partial state behind.+- **`--json` contract enforcement** — Commands that don't support `--json` reject the flag in a `preAction` hook _before_ running side effects, so `astryx init --json` no longer creates files and _then_ errors, leaving partial state behind.- **`--json` envelope documented** — Success responses are `{ type, data }`; error responses are `{ error, suggestions? }`. The `--json` help text describes both.- **`xds --version --json`** — Emits `{ type: 'version', data: { version } }` instead of plain text.- **`xds --json` (no subcommand)** — Emits `{ type: 'help', data: { commands, jsonSupported, ... } }` instead of human help text.-- **`xds upgrade --json`** — "Already up to date" and "no codemods in version range" paths emit structured `{ type: 'upgrade.status', ... }` envelopes. The codemod runner is silent under `--json` so prompts and progress lines no longer corrupt stdout.-- **`xds discover --json`** — Includes `meta: { configured: false }` when no packages are configured, distinguishing "configured but empty" from "not configured".+- **`astryx upgrade --json`** — "Already up to date" and "no codemods in version range" paths emit structured `{ type: 'upgrade.status', ... }` envelopes. The codemod runner is silent under `--json` so prompts and progress lines no longer corrupt stdout.+- **`astryx discover --json`** — Includes `meta: { configured: false }` when no packages are configured, distinguishing "configured but empty" from "not configured".- **`xds gap-report --json`** — Returns a structured error instead of starting an interactive prompt when required flags are missing; the "gh CLI missing" path also emits a JSON error.-- **`xds theme --json`** — The `theme` parent command (without a subcommand) rejects `--json` cleanly; `theme build --json` continues to work.-- **Theme CSS prose regression** — `xds theme build` now uses a single CSS generation path (`@xds/core`'s generator) and treats a failed `@xds/core/theme` import as a hard build error instead of a silent fallback, fixing the docsite Markdown typography regression after the XDS-prefix migration. (#2964)+- **`astryx theme --json`** — The `theme` parent command (without a subcommand) rejects `--json` cleanly; `theme build --json` continues to work.+- **Theme CSS prose regression** — `astryx theme build` now uses a single CSS generation path (`@xds/core`'s generator) and treats a failed `@xds/core/theme` import as a hard build error instead of a silent fallback, fixing the docsite Markdown typography regression after the XDS-prefix migration. (#2964)#### Contributors@@ -89,10 +89,10 @@ Thanks to everyone who contributed to this release:#### New Features-- `--skip-install` and `--force-install` flags for `xds upgrade` (#1547)-- `npx xds docs icons` reference + updated icon prop descriptions (#1500)+- `--skip-install` and `--force-install` flags for `astryx upgrade` (#1547)+- `npx astryx docs icons` reference + updated icon prop descriptions (#1500)- Theme nudge in generated agent docs (#1456)-- Theme `expandColorScale` — derive color tokens from accent hex in `xds theme build` (#1452)+- Theme `expandColorScale` — derive color tokens from accent hex in `astryx theme build` (#1452)- Component groups read from doc files instead of hardcoded map (#1650)- Page and block template system (#1393)@@ -108,7 +108,7 @@ Thanks to everyone who contributed to this release:#### Upgrade```sh-npx xds upgrade --apply --to 0.0.13+npx astryx upgrade --apply --to 0.0.13```---@@ -122,7 +122,7 @@ npx xds upgrade --apply --to 0.0.13#### Upgrade```sh-npx xds upgrade --apply --to 0.0.12+npx astryx upgrade --apply --to 0.0.12```---@@ -136,7 +136,7 @@ npx xds upgrade --apply --to 0.0.12#### Upgrade```sh-npx xds upgrade --apply --to 0.0.10+npx astryx upgrade --apply --to 0.0.10```---@@ -156,7 +156,7 @@ npx xds upgrade --apply --to 0.0.10#### Upgrade```sh-npx xds upgrade --apply --to 0.0.8+npx astryx upgrade --apply --to 0.0.8```---@@ -170,7 +170,7 @@ npx xds upgrade --apply --to 0.0.8#### Upgrade```sh-npx xds upgrade --apply --to 0.0.7+npx astryx upgrade --apply --to 0.0.7```---@@ -189,7 +189,7 @@ npx xds upgrade --apply --to 0.0.7#### Upgrade```sh-npx xds upgrade --apply --to 0.0.6+npx astryx upgrade --apply --to 0.0.6```---@@ -210,7 +210,7 @@ npx xds upgrade --apply --to 0.0.6#### Features-- **`xds theme build`** — Renamed from `build-theme` to `theme build` (#570)+- **`astryx theme build`** — Renamed from `build-theme` to `theme build` (#570)- **`--lang` flag** — TranslationDoc support for i18n/compressed docs (#611)- **`--zh` flag** — Chinese Simplified doc output (#567)@@ -233,8 +233,8 @@ npx xds upgrade --apply --to 0.0.6#### New Features-- `xds upgrade` command with codemod support-- `xds theme build` (formerly `build-theme`)+- `astryx upgrade` command with codemod support+- `astryx theme build` (formerly `build-theme`)#### Codemods@@ -256,7 +256,7 @@ npx xds upgrade --apply --to 0.0.6#### Upgrade```sh-npx xds upgrade --apply --to 0.0.2+npx astryx upgrade --apply --to 0.0.2```---diff --git a/packages/cli/CONTRIBUTING.md b/packages/cli/CONTRIBUTING.mdindex e4df87d4a6..ab90b6184f 100644--- a/packages/cli/CONTRIBUTING.md+++ b/packages/cli/CONTRIBUTING.md@@ -180,12 +180,12 @@ Nothing to do in the CLI. Props come from `.doc.mjs` files in `packages/core/src2. Add a `{Name}.doc.mjs` in the same directory (or add to the parent's `.doc.mjs` if it's a sub-component)3. Done — the CLI auto-discovers it, the API auto-discovers it, the parity test auto-discovers it-If the component has no `.doc.mjs`, `xds component {Name}` returns a clean error and CI's smoke test skips it.+If the component has no `.doc.mjs`, `astryx component {Name}` returns a clean error and CI's smoke test skips it.### Adding a new doc topic1. Add `{topic}.doc.mjs` in `packages/cli/docs/`-2. Done — auto-discovered by `xds docs` and the `docs()` API function+2. Done — auto-discovered by `astryx docs` and the `docs()` API function### Adding a new template@@ -199,7 +199,7 @@ packages/cli/templates/{name}/1. Create `packages/cli/templates/{name}/page.tsx` with a default-exported React component2. Create `packages/cli/templates/{name}/template.doc.mjs` with a `doc` export (`TemplateDoc`)-3. Done — auto-discovered by `xds template --list` and the `template()` API function+3. Done — auto-discovered by `astryx template --list` and the `template()` API function**Rules:**- No extra files — no CSS, no images, no other assets. Everything lives in `page.tsx`.diff --git a/packages/cli/README.md b/packages/cli/README.mdindex 01d9e6a7e2..a7d1f589d0 100644--- a/packages/cli/README.md+++ b/packages/cli/README.md@@ -3,15 +3,15 @@The CLI is the primary interface for working with the design system, for humans and machines alike. It provides component documentation, design tokens, page templates, theming tools, and upgrade codemods, all accessible via terminal commands, a typed JSON API, or programmatic imports. AI agents and build tools use the same API that powers the CLI, enabling end-to-end frontend development loops.```bash-npx xds --help-npx xds search button-npx xds component Button-npx xds docs tokens-npx xds docs migration-npx xds template --list+npx astryx --help+npx astryx search button+npx astryx component Button+npx astryx docs tokens+npx astryx docs migration+npx astryx template --list```-### Finding things: `xds search`+### Finding things: `astryx search`When you don't know whether what you need is a component, a hook, a docs topic,or a template, search across all of them at once. Results are ranked by@@ -20,25 +20,25 @@ fuzzy matching for typos) and tagged with their domain plus the follow-upcommand to run:```bash-$ npx xds search button+$ npx astryx search buttonResults for "button" (20):[component] ButtonButton triggers an action when clicked. Use it for form submissions…- → npx xds component Button+ → npx astryx component Button[component] IconButtonA button that shows only an icon with no visible text…- → npx xds component IconButton+ → npx astryx component IconButton[hook] useClickableContainerMakes a container element clickable while preserving nested…- → npx xds hook useClickableContainer+ → npx astryx hook useClickableContainer[template] Banner — CollapsibleCombine an action button, dismiss control, and expandable detail area…- → npx xds template BannerCollapsibleContent+ → npx astryx template BannerCollapsibleContent```Options:@@ -125,11 +125,11 @@ if (isError(result)) {| Code | Meaning || --- | --- || `ERR_UNKNOWN` | Generic fallback for any error without a more specific code. |-| `ERR_UNKNOWN_COMMAND` | A top-level command name was not recognized (e.g. `xds bogus`). |-| `ERR_UNKNOWN_SUBCOMMAND` | A subcommand under a group was not recognized (e.g. `xds theme bogus`). |+| `ERR_UNKNOWN_COMMAND` | A top-level command name was not recognized (e.g. `astryx bogus`). |+| `ERR_UNKNOWN_SUBCOMMAND` | A subcommand under a group was not recognized (e.g. `astryx theme bogus`). || `ERR_INVALID_OPTION` | An unknown flag was passed, or `--json` was used on a command that doesn't support it. || `ERR_INVALID_ARGUMENT` | An option/argument value was rejected, or required flags were missing. |-| `ERR_MISSING_ARGUMENT` | A required positional argument was omitted (e.g. `xds theme build` with no file). |+| `ERR_MISSING_ARGUMENT` | A required positional argument was omitted (e.g. `astryx theme build` with no file). || `ERR_INVALID_LANG` | `--lang` was given a value outside its choices (`en`, `zh`, `dense`). || `ERR_INVALID_DETAIL` | `--detail` was given a value outside its choices (`full`, `compact`, `brief`). || `ERR_NODE_VERSION` | The running Node.js version is below the supported minimum. |@@ -171,7 +171,7 @@ choices, and defaults), whether it supports `--json`, and the response `type`discriminators each command can emit. Think of it as an OpenAPI spec for the CLI.```bash-xds manifest --json # dedicated surface — type: "manifest"+astryx manifest --json # dedicated surface — type: "manifest"xds --json # bare invocation — embeds the same payload under data.manifest```@@ -198,7 +198,7 @@ Shape:"options": [{"flag": "--props", "type": "boolean", "description": "Print only the props table"}],"json": true,"responseTypes": ["component.list", "component.detail", "component.detail.props", "…"],- "examples": ["xds component Button --props --json"]+ "examples": ["astryx component Button --props --json"]}// …one entry per command; subcommands (e.g. `theme build`) nest under `subcommands`],@@ -218,7 +218,7 @@ command without describing it fails CI.**Backwards-compat:** the bare `xds --json` envelope keeps `type: "help"` and itsoriginal shallow fields (`name`, `version`, `commands` as a `string[]` of names,`jsonSupported`); the full structured manifest is additive under `data.manifest`.-For the standalone manifest envelope (`type: "manifest"`), use `xds manifest --json`.+For the standalone manifest envelope (`type: "manifest"`), use `astryx manifest --json`.## Programmatic API@@ -324,14 +324,14 @@ Every response has a `type` string that uniquely identifies it:## Doctor-`xds doctor` runs a series of health checks against your project and+`astryx doctor` runs a series of health checks against your project andenvironment and reports `PASS` / `WARN` / `FAIL` for each, with an actionablefix for anything that isn't passing. It's read-only; it never installs ormutates anything, so it's safe to run anywhere, including CI.```-$ xds doctor-xds doctor — diagnosing your setup+$ astryx doctor+astryx doctor — diagnosing your setup✓ Node.js versionNode v22.13.0 meets the minimum (>=22.13.0).@@ -346,7 +346,7 @@ xds doctor — diagnosing your setupNo astryx.config.mjs found — using defaults.ℹ AI agent docsNo agent docs (CLAUDE.md / AGENTS.md / .cursorrules) found.- → fix: Generate agent docs with `xds init --features agents`.+ → fix: Generate agent docs with `astryx init --features agents`.✓ @astryxdesign/core peer dependenciesAll peer dependencies satisfied (react, react-dom).ℹ Package manager@@ -372,12 +372,12 @@ No failures — but review the ⚠ warnings above when you can.### CI gate-The exit code is the contract: `xds doctor` exits `0` when there are no+The exit code is the contract: `astryx doctor` exits `0` when there are nofailures (warnings are fine) and `1` when any check fails. That makes itusable directly as a CI step:```yaml-- run: npx xds doctor+- run: npx astryx doctor```Use `--json` for a structured envelope (`{ apiVersion, type: "doctor",diff --git a/packages/cli/bin/xds.mjs b/packages/cli/bin/astryx.mjssimilarity index 100%rename from packages/cli/bin/xds.mjsrename to packages/cli/bin/astryx.mjsdiff --git a/packages/cli/docs/getting-started.doc.mjs b/packages/cli/docs/getting-started.doc.mjsindex b2e7dc71b7..d1048289f4 100644--- a/packages/cli/docs/getting-started.doc.mjs+++ b/packages/cli/docs/getting-started.doc.mjs@@ -157,7 +157,7 @@ pnpm dev`,lang: 'json',label: 'package.json',code: `"scripts": {- "xds": "node node_modules/@astryxdesign/cli/bin/xds.mjs"+ "xds": "node node_modules/@astryxdesign/cli/bin/astryx.mjs"}`,},{diff --git a/packages/cli/docs/working-with-ai.doc.mjs b/packages/cli/docs/working-with-ai.doc.mjsindex e57c02e2c6..9514527d5e 100644--- a/packages/cli/docs/working-with-ai.doc.mjs+++ b/packages/cli/docs/working-with-ai.doc.mjs@@ -118,14 +118,14 @@ If you don't know all three, run \`npx astryx init --features agents\` to generacontent: [{type: 'prose',- text: 'AI agents frequently invoke the CLI with incorrect paths (e.g. node_modules/@astryxdesign/cli/bin/docs.mjs instead of xds.mjs), leading to silent failures. Adding an npm script alias with the correct path eliminates this entirely.',+ text: 'AI agents frequently invoke the CLI with incorrect paths (e.g. node_modules/@astryxdesign/cli/bin/docs.mjs instead of astryx.mjs), leading to silent failures. Adding an npm script alias with the correct path eliminates this entirely.',},{type: 'code',lang: 'json',label: 'package.json',code: `"scripts": {- "xds": "node node_modules/@astryxdesign/cli/bin/xds.mjs"+ "xds": "node node_modules/@astryxdesign/cli/bin/astryx.mjs"}`,},{diff --git a/packages/cli/package-lock.json b/packages/cli/package-lock.jsonindex e456c9e029..1bd3af7a43 100644--- a/packages/cli/package-lock.json+++ b/packages/cli/package-lock.json@@ -13,7 +13,7 @@"commander": "^12.1.0"},"bin": {- "xds": "bin/xds.mjs"+ "xds": "bin/astryx.mjs"}},"node_modules/@clack/core": {diff --git a/packages/cli/package.json b/packages/cli/package.jsonindex 093adabf1c..2b48592670 100644--- a/packages/cli/package.json+++ b/packages/cli/package.json@@ -26,12 +26,11 @@],"type": "module","bin": {- "xds": "./bin/xds.mjs",- "astryx": "./bin/xds.mjs",- "cli": "./bin/xds.mjs"+ "astryx": "./bin/astryx.mjs",+ "cli": "./bin/astryx.mjs"},"exports": {- ".": "./bin/xds.mjs",+ ".": "./bin/astryx.mjs","./json": {"types": "./src/types/index.d.ts","import": "./src/lib/parse.mjs"@@ -49,7 +48,7 @@"CHANGELOG.md"],"scripts": {- "xds": "node bin/xds.mjs",+ "astryx": "node bin/astryx.mjs","typecheck:template-docs": "tsc --project tsconfig.template-docs.json","typecheck:json-api": "tsc --project tsconfig.json-api.json && tsc --project tsconfig.api-contract.json"},diff --git a/packages/cli/src/api/component.mjs b/packages/cli/src/api/component.mjsindex bfc7cc7af5..a31ab438a6 100644--- a/packages/cli/src/api/component.mjs+++ b/packages/cli/src/api/component.mjs@@ -3,7 +3,7 @@/*** @file Programmatic API for the component command.*- * Returns the same typed envelope { type, data } that `xds --json component` outputs.+ * Returns the same typed envelope { type, data } that `astryx --json component` outputs.* The CLI command handler is a thin wrapper around this function.*/diff --git a/packages/cli/src/api/doctor.mjs b/packages/cli/src/api/doctor.mjsindex 9e2a6b451b..bdd08be277 100644--- a/packages/cli/src/api/doctor.mjs+++ b/packages/cli/src/api/doctor.mjs@@ -1,7 +1,7 @@// Copyright (c) Meta Platforms, Inc. and affiliates./**- * @file Health-check engine for `xds doctor`.+ * @file Health-check engine for `astryx doctor`.** Runs a series of diagnostic checks against the user's project and* environment, returning a structured report. Each check is a small,@@ -347,7 +347,7 @@ export function checkAgentDocs(ctx) {label: 'AI agent docs',status: 'info',message: 'No agent docs (CLAUDE.md / AGENTS.md / .cursorrules) found.',- fix: 'Generate agent docs with `xds init --features agents`.',+ fix: 'Generate agent docs with `astryx init --features agents`.',};}@@ -369,7 +369,7 @@ export function checkAgentDocs(ctx) {label: 'AI agent docs',status: 'warn',message: `Agent docs present (${present.join(', ')}) but no XDS section markers found.`,- fix: 'Add the XDS section to your agent docs with `xds init --features agents`.',+ fix: 'Add the XDS section to your agent docs with `astryx init --features agents`.',};}@@ -525,7 +525,7 @@ export async function runChecks(options = {}) {/*** Programmatic API: run the doctor and return the same envelope shape that- * `xds doctor --json` emits.+ * `astryx doctor --json` emits.** @param {object} [options]* @param {string} [options.cwd]diff --git a/packages/cli/src/api/hook.mjs b/packages/cli/src/api/hook.mjsindex 4720bfb07a..abacb583e0 100644--- a/packages/cli/src/api/hook.mjs+++ b/packages/cli/src/api/hook.mjs@@ -3,7 +3,7 @@/*** @file Programmatic API for the hook command.*- * Returns the same typed envelope { type, data } that `xds --json hook` outputs.+ * Returns the same typed envelope { type, data } that `astryx --json hook` outputs.* The CLI command handler is a thin wrapper around this function.*/diff --git a/packages/cli/src/api/search.mjs b/packages/cli/src/api/search.mjsindex ac4bece5d5..a26b944c00 100644--- a/packages/cli/src/api/search.mjs+++ b/packages/cli/src/api/search.mjs@@ -272,26 +272,26 @@ function toResult(c, score, reason) {return {...base,import: c._import,- command: `xds component ${c.name}`,+ command: `astryx component ${c.name}`,};case 'hook':return {...base,import: c._import,- command: `xds hook ${c.name}`,+ command: `astryx hook ${c.name}`,};case 'doc':return {...base,title: c._title,- command: `xds docs ${c.name}`,+ command: `astryx docs ${c.name}`,};case 'template':return {...base,displayName: c._displayName,kind: c._kind,- command: `xds template ${c.name}`,+ command: `astryx template ${c.name}`,};default:return base;@@ -313,7 +313,7 @@ export async function search(query, options = {}) {if (!query || !String(query).trim()) {throw new AstryxError('A search query is required', [- {name: 'xds search button', reason: 'example'},+ {name: 'astryx search button', reason: 'example'},]);}diff --git a/packages/cli/src/cli-exit-codes.test.mjs b/packages/cli/src/cli-exit-codes.test.mjsindex 595056b969..4fc4a8b290 100644--- a/packages/cli/src/cli-exit-codes.test.mjs+++ b/packages/cli/src/cli-exit-codes.test.mjs@@ -21,7 +21,7 @@ import * as path from 'node:path';import {fileURLToPath} from 'node:url';const __dirname = path.dirname(fileURLToPath(import.meta.url));-const CLI = path.resolve(__dirname, '..', 'bin', 'xds.mjs');+const CLI = path.resolve(__dirname, '..', 'bin', 'astryx.mjs');function runCli(args) {return spawnSync(process.execPath, [CLI, ...args], {@@ -54,32 +54,32 @@ function parseEnvelope(r) {// ─── Error paths: must exit 1 ────────────────────────────────────────────────describe('exit codes — error paths (human mode → exit 1)', () => {- it('xds bogus-cmd → exit 1', () => {+ it('astryx bogus-cmd → exit 1', () => {const r = expectExit(['bogus-cmd'], 1);expect(r.stderr).toMatch(/unknown command/i);});- it('xds theme bogus → exit 1', () => {+ it('astryx theme bogus → exit 1', () => {const r = expectExit(['theme', 'bogus'], 1);expect(r.stderr).toMatch(/unknown subcommand/i);});- it('xds component bogus → exit 1', () => {+ it('astryx component bogus → exit 1', () => {const r = expectExit(['component', 'bogus'], 1);expect(r.stderr).toMatch(/no component named/i);});- it('xds hook bogus → exit 1', () => {+ it('astryx hook bogus → exit 1', () => {const r = expectExit(['hook', 'bogus'], 1);expect(r.stderr).toMatch(/no hook named/i);});- it('xds docs bogus → exit 1', () => {+ it('astryx docs bogus → exit 1', () => {const r = expectExit(['docs', 'bogus'], 1);expect(r.stderr).toMatch(/unknown topic/i);});- it('xds --bogus-flag → exit 1', () => {+ it('astryx --bogus-flag → exit 1', () => {const r = expectExit(['--bogus-flag'], 1);// Commander's unknown-option message goes to stderr.expect(r.stderr).toMatch(/unknown option/i);@@ -87,28 +87,28 @@ describe('exit codes — error paths (human mode → exit 1)', () => {});describe('exit codes — error paths (--json → exit 1, valid envelope)', () => {- it('xds bogus-cmd --json → exit 1, error envelope', () => {+ it('astryx bogus-cmd --json → exit 1, error envelope', () => {const r = expectExit(['bogus-cmd', '--json'], 1);const env = parseEnvelope(r);expect(env.apiVersion).toBe(1);expect(env.error).toMatch(/unknown command/i);});- it('xds component bogus --json → exit 1, error envelope', () => {+ it('astryx component bogus --json → exit 1, error envelope', () => {const r = expectExit(['component', 'bogus', '--json'], 1);const env = parseEnvelope(r);expect(env.apiVersion).toBe(1);expect(env.error).toMatch(/no component named/i);});- it('xds hook bogus --json → exit 1, error envelope', () => {+ it('astryx hook bogus --json → exit 1, error envelope', () => {const r = expectExit(['hook', 'bogus', '--json'], 1);const env = parseEnvelope(r);expect(env.apiVersion).toBe(1);expect(env.error).toMatch(/no hook named/i);});- it('xds docs bogus --json → exit 1, error envelope', () => {+ it('astryx docs bogus --json → exit 1, error envelope', () => {const r = expectExit(['docs', 'bogus', '--json'], 1);const env = parseEnvelope(r);expect(env.apiVersion).toBe(1);@@ -119,39 +119,39 @@ describe('exit codes — error paths (--json → exit 1, valid envelope)', () =>// ─── Success paths: must exit 0 (positive controls) ──────────────────────────describe('exit codes — success paths (exit 0)', () => {- it('xds (no args) → exit 0, prints help', () => {+ it('astryx (no args) → exit 0, prints help', () => {const r = expectExit([], 0);// Help should land on stdout (Commander default for help()).expect(r.stdout + r.stderr).toMatch(/Usage:/);});- it('xds --help → exit 0', () => {+ it('astryx --help → exit 0', () => {expectExit(['--help'], 0);});- it('xds --version → exit 0, prints a version', () => {+ it('astryx --version → exit 0, prints a version', () => {const r = expectExit(['--version'], 0);expect(r.stdout.trim()).toMatch(/^\d+\.\d+\.\d+/);});- it('xds component (list mode) → exit 0', () => {+ it('astryx component (list mode) → exit 0', () => {expectExit(['component'], 0);});- it('xds component Button → exit 0', () => {+ it('astryx component Button → exit 0', () => {expectExit(['component', 'Button'], 0);});- it('xds docs (list mode) → exit 0', () => {+ it('astryx docs (list mode) → exit 0', () => {expectExit(['docs'], 0);});- it('xds theme (no subcommand) → exit 0, shows help', () => {+ it('astryx theme (no subcommand) → exit 0, shows help', () => {// Bare theme without a subcommand is a help-display case → exit 0.expectExit(['theme'], 0);});- it('xds hook (list mode) → exit 0', () => {+ it('astryx hook (list mode) → exit 0', () => {expectExit(['hook'], 0);});});diff --git a/packages/cli/src/codemods/runner.mjs b/packages/cli/src/codemods/runner.mjsindex bc1fd609b3..0454a6b365 100644--- a/packages/cli/src/codemods/runner.mjs+++ b/packages/cli/src/codemods/runner.mjs@@ -366,7 +366,7 @@ export async function runCodemods(if (meta.description) {log.info(` ${meta.description}`);}- log.info(` Run: xds upgrade --codemod ${name} --path <dir> --apply`);+ log.info(` Run: astryx upgrade --codemod ${name} --path <dir> --apply`);}}diff --git a/packages/cli/src/codemods/transforms/v0.0.12/add-is-icon-only.mjs b/packages/cli/src/codemods/transforms/v0.0.12/add-is-icon-only.mjsindex 8d1eb9f06a..c609790d7f 100644--- a/packages/cli/src/codemods/transforms/v0.0.12/add-is-icon-only.mjs+++ b/packages/cli/src/codemods/transforms/v0.0.12/add-is-icon-only.mjs@@ -28,7 +28,7 @@* — these get `isIconOnly: true` since they pass props internally* - Removing redundant `children` that duplicate `label` on icon+text buttons*- * Run on demand: `xds upgrade --from 0.0.11 --to 0.0.12 --codemod add-is-icon-only`+ * Run on demand: `astryx upgrade --from 0.0.11 --to 0.0.12 --codemod add-is-icon-only`*/const TARGET_COMPONENTS = new Set([diff --git a/packages/cli/src/codemods/transforms/v0.0.15/index.mjs b/packages/cli/src/codemods/transforms/v0.0.15/index.mjsindex 96a69bfadb..b565525285 100644--- a/packages/cli/src/codemods/transforms/v0.0.15/index.mjs+++ b/packages/cli/src/codemods/transforms/v0.0.15/index.mjs@@ -78,7 +78,7 @@ export default [{// XDS-prefix migration (P2380608025). Optional + not tied to a version// bump: consumers run it explicitly during their migration, e.g.- // xds upgrade --codemod drop-xds-prefix-imports --codemod-only --apply+ // astryx upgrade --codemod drop-xds-prefix-imports --codemod-only --applyname: 'drop-xds-prefix-imports',transform: dropXdsPrefixImports,meta: dropXdsPrefixImportsMeta,diff --git a/packages/cli/src/codemods/transforms/v0.0.2/migrate-gap-to-numeric.mjs b/packages/cli/src/codemods/transforms/v0.0.2/migrate-gap-to-numeric.mjsindex 4e0f716396..41201770d4 100644--- a/packages/cli/src/codemods/transforms/v0.0.2/migrate-gap-to-numeric.mjs+++ b/packages/cli/src/codemods/transforms/v0.0.2/migrate-gap-to-numeric.mjs@@ -47,7 +47,7 @@ const GAP_PROPS = ['gap', 'rowGap', 'columnGap'];* Only XDS layout components accept the numeric gap scale. We must not* rewrite gap props on user-defined components or HTML elements that happen* to share the prop name — doing so would silently corrupt their code when- * `xds upgrade` runs.+ * `astryx upgrade` runs.*/const XDS_LAYOUT_ELEMENTS = new Set(['XDSStack',diff --git a/packages/cli/src/commands/build-theme.import-path.test.mjs b/packages/cli/src/commands/build-theme.import-path.test.mjsindex e600b6cece..fc479261a2 100644--- a/packages/cli/src/commands/build-theme.import-path.test.mjs+++ b/packages/cli/src/commands/build-theme.import-path.test.mjs@@ -1,7 +1,7 @@// Copyright (c) Meta Platforms, Inc. and affiliates./**- * @file Regression test for `xds theme build` install-instructions import paths.+ * @file Regression test for `astryx theme build` install-instructions import paths.** Covers the relDir-empty case: when the output directory equals the current* working directory, the relative dir is an empty string. Previously this@@ -20,7 +20,7 @@ import * as os from 'node:os';import {fileURLToPath} from 'node:url';const __dirname = path.dirname(fileURLToPath(import.meta.url));-const CLI_BIN = path.resolve(__dirname, '../../bin/xds.mjs');+const CLI_BIN = path.resolve(__dirname, '../../bin/astryx.mjs');const REPO_ROOT = path.resolve(__dirname, '../../../..');const CORE_THEME_ENTRY = path.join(REPO_ROOT,@@ -55,7 +55,7 @@ function writeTheme(dir, name) {return file;}-// `xds theme build` imports the compiled @astryxdesign/core/theme entry (there is no+// `astryx theme build` imports the compiled @astryxdesign/core/theme entry (there is no// in-CLI fallback generator). Build core once if it isn't already present so// the suite works in any CI job, regardless of job ordering.beforeAll(() => {diff --git a/packages/cli/src/commands/build-theme.mjs b/packages/cli/src/commands/build-theme.mjsindex fa57be78f2..a19546dab8 100644--- a/packages/cli/src/commands/build-theme.mjs+++ b/packages/cli/src/commands/build-theme.mjs@@ -8,8 +8,8 @@* - An updated JS module that references the built className** Usage:- * npx xds theme build ./src/themes/ocean.ts- * npx xds theme build ./src/themes/ocean.ts --out ./dist/ocean.css+ * npx astryx theme build ./src/themes/ocean.ts+ * npx astryx theme build ./src/themes/ocean.ts --out ./dist/ocean.css*/import * as fs from 'node:fs';@@ -22,7 +22,7 @@ import {jsonOut, humanLog} from '../lib/json.mjs';import {cliError} from '../lib/cli-error.mjs';import {ERROR_CODES} from '../lib/error-codes.mjs';-// Import shared theme processing from core. `xds theme build` MUST produce the+// Import shared theme processing from core. `astryx theme build` MUST produce the// exact same CSS as the `<Theme>` runtime, so it has exactly one generation// path: core's generator. There is no in-CLI fallback implementation — if this// import fails, the build fails (see the ERR_CORE_NOT_FOUND guard in the theme@@ -54,7 +54,7 @@ try {function generatedHeader(sourceFile, lang = 'js', command) {const timestamp = new Date().toISOString();const body = [- `@generated by \`xds theme build\` — do not edit manually.`,+ `@generated by \`astryx theme build\` — do not edit manually.`,`Source: ${sourceFile}`,];if (command) {@@ -207,7 +207,7 @@ async function generateVariantDeclarationsAsync(themeDef) {);if (!hasCustom) return null;- const sections = ['// Generated by xds theme build', 'export {};', ''];+ const sections = ['// Generated by astryx theme build', 'export {};', ''];for (const [component, props] of Object.entries(customValues)) {for (const [prop, values] of Object.entries(props)) {@@ -397,7 +397,7 @@ function generateBuiltModule(themeDef, iconInfo) {.join('\n');return `${iconImport}/**- * ${themeDef.name} theme — built by \`${getRunPrefix()} xds theme build\`+ * ${themeDef.name} theme — built by \`${getRunPrefix()} astryx theme build\`* Import the CSS file alongside this module:** import { ${toIdentifier(themeDef.name)}Theme } from './${themeDef.name}';@@ -586,7 +586,7 @@ export function registerTheme(program) {.description('Theme tools — build, export, and manage themes').action((options, cmd) => {// Parent group has no default behaviour. If the user passed an- // unknown subcommand (e.g. `xds theme bogus`), Commander hands it to+ // unknown subcommand (e.g. `astryx theme bogus`), Commander hands it to// us as a positional in cmd.args — exit 1 with a clear error.const extras = (cmd && cmd.args) || [];if (extras.length > 0) {@@ -596,7 +596,7 @@ export function registerTheme(program) {cliError(`unknown subcommand 'theme ${unknown}'`, {suggestions, code: ERROR_CODES.ERR_UNKNOWN_SUBCOMMAND});return;}- // Bare `xds theme` — show the subcommand list. Exit 0 (help is success).+ // Bare `astryx theme` — show the subcommand list. Exit 0 (help is success).theme.help();});@@ -662,12 +662,12 @@ export function registerTheme(program) {}// Generate CSS via core's shared generator — the SINGLE source of truth.- // `xds theme build` and the `<Theme>` runtime MUST emit identical CSS, so+ // `astryx theme build` and the `<Theme>` runtime MUST emit identical CSS, so// there is exactly one generation path: @astryxdesign/core/theme. If core could not// be imported, fail hard rather than silently producing divergent output.if (!_defineTheme || !_generateThemeRulesSplit) {cliError(- 'Could not load @astryxdesign/core/theme — `xds theme build` requires a ' ++ 'Could not load @astryxdesign/core/theme — `astryx theme build` requires a ' +'built, resolvable @astryxdesign/core so it emits the same CSS as the ' +'runtime <Theme>. Build @astryxdesign/core first (e.g. `pnpm -F @astryxdesign/core ' +'build`)' +@@ -735,7 +735,7 @@ export function registerTheme(program) {// Source path relative to cwd — used in @generated headersconst sourceRelative = path.relative(process.cwd(), filePath);- const buildCommand = `xds theme build ${sourceRelative}${options.out ? ' --out ' + path.relative(process.cwd(), path.resolve(process.cwd(), options.out)) : ''}`;+ const buildCommand = `astryx theme build ${sourceRelative}${options.out ? ' --out ' + path.relative(process.cwd(), path.resolve(process.cwd(), options.out)) : ''}`;// Determine output pathconst outPath = options.outdiff --git a/packages/cli/src/commands/build-theme.path-safety.test.mjs b/packages/cli/src/commands/build-theme.path-safety.test.mjsindex 54ea65739f..7d088ef451 100644--- a/packages/cli/src/commands/build-theme.path-safety.test.mjs+++ b/packages/cli/src/commands/build-theme.path-safety.test.mjs@@ -1,7 +1,7 @@// Copyright (c) Meta Platforms, Inc. and affiliates./**- * @file Path-safety regression tests for `xds theme build`.+ * @file Path-safety regression tests for `astryx theme build`.** Covers:* - Theme name with `..` segments cannot escape the output directory.@@ -19,7 +19,7 @@ import * as os from 'node:os';import {fileURLToPath} from 'node:url';const __dirname = path.dirname(fileURLToPath(import.meta.url));-const CLI_BIN = path.resolve(__dirname, '../../bin/xds.mjs');+const CLI_BIN = path.resolve(__dirname, '../../bin/astryx.mjs');function runCli(args, cwd) {try {diff --git a/packages/cli/src/commands/build-theme.prose.test.mjs b/packages/cli/src/commands/build-theme.prose.test.mjsindex 7ef537391f..7cc5bc7dcc 100644--- a/packages/cli/src/commands/build-theme.prose.test.mjs+++ b/packages/cli/src/commands/build-theme.prose.test.mjs@@ -1,9 +1,9 @@// Copyright (c) Meta Platforms, Inc. and affiliates./**- * @file Regression test for prose output of `xds theme build`.+ * @file Regression test for prose output of `astryx theme build`.*- * `xds theme build` has a single CSS-generation path — @astryxdesign/core's generator,+ * `astryx theme build` has a single CSS-generation path — @astryxdesign/core's generator,* the same one the <Theme> runtime uses (generateThemeCSS). It always emits* prose element defaults (h1–h6, p, small, code, hr) so unstyled HTML inherits* the theme's typography, exactly like the runtime. There is intentionally no@@ -17,7 +17,7 @@* components own block spacing — see the docsite Markdown regression);* - paragraphs use the body font, not the heading font.*- * Building `xds theme build` requires a compiled @astryxdesign/core (there is no in-CLI+ * Building `astryx theme build` requires a compiled @astryxdesign/core (there is no in-CLI* fallback generator), so this suite builds core once in beforeAll — mirroring* scripts/build-css.test.mjs — to stay self-sufficient regardless of CI job* ordering.@@ -31,7 +31,7 @@ import * as os from 'node:os';import {fileURLToPath} from 'node:url';const __dirname = path.dirname(fileURLToPath(import.meta.url));-const CLI_BIN = path.resolve(__dirname, '../../bin/xds.mjs');+const CLI_BIN = path.resolve(__dirname, '../../bin/astryx.mjs');const REPO_ROOT = path.resolve(__dirname, '../../../..');const CORE_THEME_ENTRY = path.join(REPO_ROOT,@@ -68,7 +68,7 @@ function writeTheme(dir, name) {return file;}-// `xds theme build` imports the compiled @astryxdesign/core/theme entry. Build core+// `astryx theme build` imports the compiled @astryxdesign/core/theme entry. Build core// once if it isn't already present so the suite works in any CI job.beforeAll(() => {if (!fs.existsSync(CORE_THEME_ENTRY)) {diff --git a/packages/cli/src/commands/component/index.mjs b/packages/cli/src/commands/component/index.mjsindex 6f0697912d..1321ebf880 100644--- a/packages/cli/src/commands/component/index.mjs+++ b/packages/cli/src/commands/component/index.mjs@@ -108,7 +108,7 @@ export function registerComponent(program) {}humanLog('');humanLog(`Import from the path shown (e.g. import {Button} from '@astryxdesign/core/Button')`);- humanLog(`Usage: ${run} xds component <name>`);+ humanLog(`Usage: ${run} astryx component <name>`);humanLog('');}break;@@ -131,7 +131,7 @@ export function registerComponent(program) {humanLog('');}humanLog(`Import from the path shown (e.g. import {Button} from '@astryxdesign/core/Button')`);- humanLog(`Usage: ${run} xds component <name>`);+ humanLog(`Usage: ${run} astryx component <name>`);humanLog('');break;}diff --git a/packages/cli/src/commands/detail-levels.test.mjs b/packages/cli/src/commands/detail-levels.test.mjsindex 0bce269f7d..690df46a6a 100644--- a/packages/cli/src/commands/detail-levels.test.mjs+++ b/packages/cli/src/commands/detail-levels.test.mjs@@ -22,7 +22,7 @@ import * as path from 'node:path';import {fileURLToPath} from 'node:url';const __dirname = path.dirname(fileURLToPath(import.meta.url));-const CLI_BIN = path.resolve(__dirname, '../../bin/xds.mjs');+const CLI_BIN = path.resolve(__dirname, '../../bin/astryx.mjs');// Repo root holds packages/core, which findCoreDir() walks up to locate.const REPO_ROOT = path.resolve(__dirname, '../../../..');diff --git a/packages/cli/src/commands/discover.mjs b/packages/cli/src/commands/discover.mjsindex 96ab2be44e..88d9def659 100644--- a/packages/cli/src/commands/discover.mjs+++ b/packages/cli/src/commands/discover.mjs@@ -4,10 +4,10 @@* @file discover command — find external Astryx packages and components** Usage:- * xds discover List all packages- * xds discover @scope/name List components in a package- * xds discover @scope/name/Component Show docs for a component- * xds discover searchterm Search across all packages+ * astryx discover List all packages+ * astryx discover @scope/name List components in a package+ * astryx discover @scope/name/Component Show docs for a component+ * astryx discover searchterm Search across all packages*/import {loadConfig} from '../lib/config.mjs';@@ -91,9 +91,9 @@ export function registerDiscover(program) {humanLog('');}humanLog('Usage:');- humanLog(' xds discover <package> Browse a package');- humanLog(' xds discover <package>/Component View component docs');- humanLog(' xds discover <search> Search all packages');+ humanLog(' astryx discover <package> Browse a package');+ humanLog(' astryx discover <package>/Component View component docs');+ humanLog(' astryx discover <search> Search all packages');humanLog('');}break;@@ -110,7 +110,7 @@ export function registerDiscover(program) {humanLog('');for (const comp of result.data.components) humanLog(' ' + comp);humanLog('');- humanLog('Usage: xds discover ' + result.data.name + '/<ComponentName>');+ humanLog('Usage: astryx discover ' + result.data.name + '/<ComponentName>');humanLog('');break;}@@ -133,7 +133,7 @@ export function registerDiscover(program) {humanLog('Found ' + result.data.matches.length + ' matches for "' + result.data.query + '":');humanLog('');for (const m of result.data.matches) {- humanLog(' xds discover ' + m.package + '/' + m.component);+ humanLog(' astryx discover ' + m.package + '/' + m.component);}humanLog('');break;diff --git a/packages/cli/src/commands/docs.mjs b/packages/cli/src/commands/docs.mjsindex e3246c6e90..ba2326400d 100644--- a/packages/cli/src/commands/docs.mjs+++ b/packages/cli/src/commands/docs.mjs@@ -7,9 +7,9 @@* Supports --detail (full|compact|brief) and --lang (en|zh|dense).** Usage:- * xds docs List available topics- * xds docs <topic> Print full doc- * xds docs <topic> <section> Print one section+ * astryx docs List available topics+ * astryx docs <topic> Print full doc+ * astryx docs <topic> <section> Print one section*/import {getRunPrefix} from '../utils/package-manager.mjs';@@ -130,8 +130,8 @@ export function registerDocs(program) {for (const entry of result.data) {humanLog(` ${entry.topic.padEnd(14)} ${entry.description}`);}- humanLog(`\nUsage: ${run} xds docs <topic>`);- humanLog(` ${run} xds docs <topic> <section>\n`);+ humanLog(`\nUsage: ${run} astryx docs <topic>`);+ humanLog(` ${run} astryx docs <topic> <section>\n`);break;}diff --git a/packages/cli/src/commands/docs.test.mjs b/packages/cli/src/commands/docs.test.mjsindex da0afd1808..ce410ad91a 100644--- a/packages/cli/src/commands/docs.test.mjs+++ b/packages/cli/src/commands/docs.test.mjs@@ -30,7 +30,7 @@ function createProgram() {describe('registerDocs', () => {it('lists available topics when no topic given', async () => {const program = createProgram();- await program.parseAsync(['node', 'xds', 'docs']);+ await program.parseAsync(['node', 'astryx', 'docs']);const output = console.log.mock.calls.map(c => c[0]).join('\n');expect(output).toContain('principles');@@ -44,7 +44,7 @@ describe('registerDocs', () => {});await expect(- program.parseAsync(['node', 'xds', 'docs', 'nonexistent']),+ program.parseAsync(['node', 'astryx', 'docs', 'nonexistent']),).rejects.toThrow('exit 1');const errorOutput = console.error.mock.calls.map(c => c[0]).join('\n');@@ -55,7 +55,7 @@ describe('registerDocs', () => {describe('hyphenated doc filenames', () => {it('lists hyphenated topics like getting-started', async () => {const program = createProgram();- await program.parseAsync(['node', 'xds', 'docs']);+ await program.parseAsync(['node', 'astryx', 'docs']);const output = console.log.mock.calls.map(c => c[0]).join('\n');expect(output).toContain('getting-started');@@ -63,7 +63,7 @@ describe('hyphenated doc filenames', () => {it('loads a hyphenated topic by name', async () => {const program = createProgram();- await program.parseAsync(['node', 'xds', 'docs', 'getting-started']);+ await program.parseAsync(['node', 'astryx', 'docs', 'getting-started']);const output = console.log.mock.calls.map(c => c[0]).join('\n');expect(output.length).toBeGreaterThan(0);@@ -82,7 +82,7 @@ describe('hyphenated doc filenames', () => {describe('migration docs', () => {it('lists the migration topic', async () => {const program = createProgram();- await program.parseAsync(['node', 'xds', 'docs']);+ await program.parseAsync(['node', 'astryx', 'docs']);const output = console.log.mock.calls.map(c => c[0]).join('\n');expect(output).toContain('migration');@@ -91,7 +91,7 @@ describe('migration docs', () => {it('loads migration docs by topic name', async () => {const program = createProgram();- await program.parseAsync(['node', 'xds', 'docs', 'migration']);+ await program.parseAsync(['node', 'astryx', 'docs', 'migration']);const output = console.log.mock.calls.map(c => c[0]).join('\n');expect(output).toContain('Migration Guide');diff --git a/packages/cli/src/commands/doctor.mjs b/packages/cli/src/commands/doctor.mjsindex 0874614865..23013af5cc 100644--- a/packages/cli/src/commands/doctor.mjs+++ b/packages/cli/src/commands/doctor.mjs@@ -1,12 +1,12 @@// Copyright (c) Meta Platforms, Inc. and affiliates./**- * @file `xds doctor` command — diagnose a project + environment and report+ * @file `astryx doctor` command — diagnose a project + environment and report* PASS / WARN / FAIL for each check with an actionable fix.** Designed to be usable both by humans (clean monochrome checklist) and by* AI agents / CI (`--json`). Exit code is the contract: 0 when there are no- * FAILs (warnings are fine), 1 when any check FAILs — so `xds doctor` works+ * FAILs (warnings are fine), 1 when any check FAILs — so `astryx doctor` works* as a CI gate.*/@@ -26,7 +26,7 @@ const GLYPH = {* @param {import('../api/doctor.mjs').DoctorReport} report*/function printHuman(report) {- humanLog('xds doctor — diagnosing your setup\n');+ humanLog('astryx doctor — diagnosing your setup\n');for (const check of report.checks) {const glyph = GLYPH[check.status] ?? '\u00b7';humanLog(` ${glyph} ${check.label}`);@@ -53,7 +53,7 @@ function printHuman(report) {}/**- * Register the `xds doctor` command.+ * Register the `astryx doctor` command.* @param {import('commander').Command} program*/export function registerDoctor(program) {diff --git a/packages/cli/src/commands/doctor.test.mjs b/packages/cli/src/commands/doctor.test.mjsindex 8e746dd8ef..3aebf6d6a6 100644--- a/packages/cli/src/commands/doctor.test.mjs+++ b/packages/cli/src/commands/doctor.test.mjs@@ -175,7 +175,7 @@ describe('doctor — individual checks', () => {it('agent-docs: INFO when no docs present', () => {const res = checkAgentDocs({cwd: tmpDir});expect(res.status).toBe('info');- expect(res.fix).toContain('xds init');+ expect(res.fix).toContain('astryx init');});it('agent-docs: WARN when docs exist without XDS markers', () => {@@ -255,7 +255,7 @@ function createProgram() {describe('doctor — command', () => {it('--json emits a doctor envelope', async () => {const program = createProgram();- await program.parseAsync(['node', 'xds', '--json', 'doctor']);+ await program.parseAsync(['node', 'astryx', '--json', 'doctor']);const out = logCalls.join('\n');const parsed = JSON.parse(out);expect(parsed.apiVersion).toBe(1);@@ -269,7 +269,7 @@ describe('doctor — command', () => {const prevExit = process.exitCode;process.exitCode = undefined;const program = createProgram();- await program.parseAsync(['node', 'xds', 'doctor']);+ await program.parseAsync(['node', 'astryx', 'doctor']);// In the repo, core resolves, so no failures → exitCode untouched.expect(process.exitCode).toBeUndefined();process.exitCode = prevExit;@@ -282,7 +282,7 @@ describe('doctor — command', () => {process.chdir(tmpDir);try {const program = createProgram();- await program.parseAsync(['node', 'xds', 'doctor']);+ await program.parseAsync(['node', 'astryx', 'doctor']);expect(process.exitCode).toBe(1);} finally {process.chdir(prevCwd);diff --git a/packages/cli/src/commands/gap-report.mjs b/packages/cli/src/commands/gap-report.mjsindex 65f541a325..041d72e2a0 100644--- a/packages/cli/src/commands/gap-report.mjs+++ b/packages/cli/src/commands/gap-report.mjs@@ -108,7 +108,7 @@ function writeGapReportConfig(targetDir, gapReportValue) {} else {const content = `/*** Astryx Configuration- * Generated by \`xds gap-report setup\`+ * Generated by \`astryx gap-report setup\`*/export default {gapReport: ${gapReportValue},@@ -257,7 +257,7 @@ export function registerGapReport(program) {if (json) return jsonError('Gap reporting is disabled', undefined, ERROR_CODES.ERR_GAP_REPORT_FAILED);humanLog(`Gap reporting is disabled (ASTRYX_GAP_REPORT=off or astryx.config.mjs).\n` +- `Run \`${getRunPrefix()} xds gap-report setup\` to configure.`,+ `Run \`${getRunPrefix()} astryx gap-report setup\` to configure.`,);return;}@@ -274,7 +274,7 @@ export function registerGapReport(program) {const msg ='GitHub CLI (gh) is not installed or not authenticated. ' +'Install it from https://cli.github.com and run `gh auth login`. ' +- `Or run \`${getRunPrefix()} xds gap-report setup\` to configure a custom command.`;+ `Or run \`${getRunPrefix()} astryx gap-report setup\` to configure a custom command.`;cliError(msg, {code: ERROR_CODES.ERR_GH_CLI});return;}diff --git a/packages/cli/src/commands/hook/index.mjs b/packages/cli/src/commands/hook/index.mjsindex a06332ef92..e9968b695e 100644--- a/packages/cli/src/commands/hook/index.mjs+++ b/packages/cli/src/commands/hook/index.mjs@@ -76,7 +76,7 @@ export function registerHook(program) {for (const h of hookNames) humanLog(` ${h}`);}humanLog('');- humanLog(`Usage: ${run} xds hook <name>`);+ humanLog(`Usage: ${run} astryx hook <name>`);humanLog('');}break;@@ -93,7 +93,7 @@ export function registerHook(program) {}humanLog('');}- humanLog(`Usage: ${run} xds hook <name>`);+ humanLog(`Usage: ${run} astryx hook <name>`);humanLog('');break;}diff --git a/packages/cli/src/commands/import-hint-correctness.test.mjs b/packages/cli/src/commands/import-hint-correctness.test.mjsindex 278d3d2ec7..2e9f56992d 100644--- a/packages/cli/src/commands/import-hint-correctness.test.mjs+++ b/packages/cli/src/commands/import-hint-correctness.test.mjs@@ -26,7 +26,7 @@ import {import {findCoreDir} from '../utils/paths.mjs';const __dirname = path.dirname(fileURLToPath(import.meta.url));-const CLI_BIN = path.resolve(__dirname, '../../bin/xds.mjs');+const CLI_BIN = path.resolve(__dirname, '../../bin/astryx.mjs');const REPO_ROOT = path.resolve(__dirname, '../../../..');function runCli(args) {@@ -120,7 +120,7 @@ describe('import hint correctness', () => {];for (const {name, expected} of representative) {- it(`npx xds component ${name} --detail brief shows ${expected}`, () => {+ it(`npx astryx component ${name} --detail brief shows ${expected}`, () => {const result = runCli(['component', name, '--detail', 'brief']);expect(result.code).toBe(0);expect(result.stdout).toContain(expected);@@ -132,7 +132,7 @@ describe('import hint correctness', () => {const representative = ['Button', 'Theme', 'Table', 'CheckboxInput'];for (const name of representative) {- it(`npx xds component ${name} (full) includes import statement`, () => {+ it(`npx astryx component ${name} (full) includes import statement`, () => {const result = runCli(['component', name]);expect(result.code).toBe(0);// The PR adds: **Import:** `import {XDS...} from '...';`diff --git a/packages/cli/src/commands/init.mjs b/packages/cli/src/commands/init.mjsindex d1270d08dc..ba7f67cf98 100644--- a/packages/cli/src/commands/init.mjs+++ b/packages/cli/src/commands/init.mjs@@ -3,8 +3,8 @@/*** @file init command — Interactive initialization wizard + feature installer*- * Interactive: `xds init` walks through all features- * Non-interactive: `xds init --features agents,theme,template`+ * Interactive: `astryx init` walks through all features+ * Non-interactive: `astryx init --features agents,theme,template`* Re-runnable: safe to run multiple times, idempotent** Features:@@ -67,7 +67,7 @@ function runAgents(targetDir, {interactive = true, agent, agentDocsPath} = {}) {process.exitCode = 1;return;}- const msg = `Could not install agent docs. Try again with \`${run} xds init --features agents\`.`;+ const msg = `Could not install agent docs. Try again with \`${run} astryx init --features agents\`.`;if (interactive) {p.log.warning(msg);} else {@@ -80,14 +80,14 @@ function runAgents(targetDir, {interactive = true, agent, agentDocsPath} = {}) {async function runTheme({interactive = true} = {}) {if (!interactive) {- humanLog(`✓ Theme scaffolding requires interactive mode. Run \`${run} xds theme\` instead.`);+ humanLog(`✓ Theme scaffolding requires interactive mode. Run \`${run} astryx theme\` instead.`);return;}p.note('Create a custom theme with your brand colors.\n' +- `Run \`${run} xds theme\` for the full theme wizard.\n` +- `Run \`${run} xds theme --list\` to see existing themes.`,+ `Run \`${run} astryx theme\` for the full theme wizard.\n` ++ `Run \`${run} astryx theme --list\` to see existing themes.`,'Themes',);}@@ -100,7 +100,7 @@ async function runTemplate(targetDir, {interactive = true, templateName} = {}) {if (!interactive) {if (!templateName) {- humanLog(`✓ Available templates: ${templates.join(', ')}. Use ${run} xds template <name> [path].`);+ humanLog(`✓ Available templates: ${templates.join(', ')}. Use ${run} astryx template <name> [path].`);return;}@@ -202,7 +202,7 @@ export function registerInit(program) {// with actionable guidance via the shared interactivity contract.requireInteractive({command: 'init',- hint: `\`${run} xds init --all\` or \`--features agents,theme,template\``,+ hint: `\`${run} astryx init --all\` or \`--features agents,theme,template\``,});p.intro('Welcome to the design system');@@ -229,7 +229,7 @@ export function registerInit(program) {// Feature: swizzle awarenessp.note(- `You can customize any component with:\n ${run} xds swizzle XDSButton\n ${run} xds swizzle --list`,+ `You can customize any component with:\n ${run} astryx swizzle Button\n ${run} astryx swizzle --list`,'Component Customization',);diff --git a/packages/cli/src/commands/interactive-guard.test.mjs b/packages/cli/src/commands/interactive-guard.test.mjsindex c5097f489b..b0f8fbdc8e 100644--- a/packages/cli/src/commands/interactive-guard.test.mjs+++ b/packages/cli/src/commands/interactive-guard.test.mjs@@ -20,7 +20,7 @@ import * as os from 'node:os';import {fileURLToPath} from 'node:url';const __dirname = path.dirname(fileURLToPath(import.meta.url));-const CLI = path.resolve(__dirname, '..', '..', 'bin', 'xds.mjs');+const CLI = path.resolve(__dirname, '..', '..', 'bin', 'astryx.mjs');let tmpDir;diff --git a/packages/cli/src/commands/json-contract.test.mjs b/packages/cli/src/commands/json-contract.test.mjsindex 8666bc9d61..bb23e64a71 100644--- a/packages/cli/src/commands/json-contract.test.mjs+++ b/packages/cli/src/commands/json-contract.test.mjs@@ -28,7 +28,7 @@ import * as os from 'node:os';import {fileURLToPath} from 'node:url';const __dirname = path.dirname(fileURLToPath(import.meta.url));-const CLI_BIN = path.resolve(__dirname, '../../bin/xds.mjs');+const CLI_BIN = path.resolve(__dirname, '../../bin/astryx.mjs');function runCli(args, {cwd} = {}) {const res = spawnSync('node', [CLI_BIN, ...args], {@@ -61,7 +61,7 @@ afterEach(() => {});describe('--json contract: rejects before side effects', () => {- it('xds init --json --features agents does not write .claude/CLAUDE.md', () => {+ it('astryx init --json --features agents does not write .claude/CLAUDE.md', () => {const before = fs.readdirSync(tmpDir);expect(before).toEqual([]);@@ -84,14 +84,14 @@ describe('--json contract: rejects before side effects', () => {expect(fs.existsSync(path.join(tmpDir, 'AGENTS.md'))).toBe(false);});- it('xds init --json --all does not write any files', () => {+ it('astryx init --json --all does not write any files', () => {const {status, stdout} = runCli(['init', '--json', '--all'], {cwd: tmpDir});expect(status).toBe(1);parseJson(stdout); // valid JSONexpect(fs.readdirSync(tmpDir)).toEqual([]);});- it('xds gap-report setup --json rejects before prompting', () => {+ it('astryx gap-report setup --json rejects before prompting', () => {const {status, stdout} = runCli(['gap-report', 'setup', '--json'], {cwd: tmpDir});expect(status).toBe(1);const parsed = parseJson(stdout);@@ -100,7 +100,7 @@ describe('--json contract: rejects before side effects', () => {expect(fs.existsSync(path.join(tmpDir, 'astryx.config.mjs'))).toBe(false);});- it('xds theme --json (parent, no subcommand) rejects without printing help', () => {+ it('astryx theme --json (parent, no subcommand) rejects without printing help', () => {const {status, stdout, stderr} = runCli(['theme', '--json'], {cwd: tmpDir});expect(status).toBe(1);const parsed = parseJson(stdout);@@ -110,7 +110,7 @@ describe('--json contract: rejects before side effects', () => {expect(stderr).not.toMatch(/Usage:/);});- it('xds postinstall --json rejects (hidden command not on allowlist)', () => {+ it('astryx postinstall --json rejects (hidden command not on allowlist)', () => {const {status, stdout} = runCli(['postinstall', '--json'], {cwd: tmpDir});expect(status).toBe(1);const parsed = parseJson(stdout);@@ -127,7 +127,7 @@ describe('--json contract: rejects before side effects', () => {});describe('--json contract: supported commands emit valid envelopes', () => {- it('xds --version --json emits { type: "version", data: { version } }', () => {+ it('astryx --version --json emits { type: "version", data: { version } }', () => {const {status, stdout} = runCli(['--version', '--json']);expect(status).toBe(0);const parsed = parseJson(stdout);@@ -136,7 +136,7 @@ describe('--json contract: supported commands emit valid envelopes', () => {expect(typeof parsed.data.version).toBe('string');});- it('xds --json (no subcommand) emits a help envelope', () => {+ it('astryx --json (no subcommand) emits a help envelope', () => {const {status, stdout} = runCli(['--json']);expect(status).toBe(0);const parsed = parseJson(stdout);@@ -145,7 +145,7 @@ describe('--json contract: supported commands emit valid envelopes', () => {expect(Array.isArray(parsed.data.jsonSupported)).toBe(true);});- it('xds gap-report --json --list-categories returns a typed envelope', () => {+ it('astryx gap-report --json --list-categories returns a typed envelope', () => {const {status, stdout} = runCli(['gap-report', '--json', '--list-categories'], {cwd: tmpDir});expect(status).toBe(0);const parsed = parseJson(stdout);@@ -153,7 +153,7 @@ describe('--json contract: supported commands emit valid envelopes', () => {expect(Array.isArray(parsed.data)).toBe(true);});- it('xds gap-report --json without required flags emits a structured error (no clack)', () => {+ it('astryx gap-report --json without required flags emits a structured error (no clack)', () => {// Configure gap-report so it doesn't error on "disabled" — we want to// hit the "interactive prompt would start" branch.fs.writeFileSync(@@ -168,7 +168,7 @@ describe('--json contract: supported commands emit valid envelopes', () => {expect(stdout).not.toMatch(/Which component/);});- it('xds upgrade --json --list returns the codemod list', () => {+ it('astryx upgrade --json --list returns the codemod list', () => {const {status, stdout} = runCli(['upgrade', '--json', '--list'], {cwd: tmpDir});expect(status).toBe(0);const parsed = parseJson(stdout);@@ -176,7 +176,7 @@ describe('--json contract: supported commands emit valid envelopes', () => {expect(Array.isArray(parsed.data)).toBe(true);});- it('xds upgrade --json (already up to date) emits upgrade.status', () => {+ it('astryx upgrade --json (already up to date) emits upgrade.status', () => {// Force a no-op range: from > to.const {status, stdout} = runCli(['upgrade', '--json', '--from', '99.0.0', '--to', '0.0.1'],@@ -190,7 +190,7 @@ describe('--json contract: supported commands emit valid envelopes', () => {expect(parsed.data.to).toBe('0.0.1');});- it('xds discover --json (no config) includes meta.configured=false', () => {+ it('astryx discover --json (no config) includes meta.configured=false', () => {const {status, stdout} = runCli(['discover', '--json'], {cwd: tmpDir});expect(status).toBe(0);const parsed = parseJson(stdout);@@ -199,7 +199,7 @@ describe('--json contract: supported commands emit valid envelopes', () => {expect(parsed.meta).toEqual({configured: false});});- it('xds template --json emits a typed envelope', () => {+ it('astryx template --json emits a typed envelope', () => {const {status, stdout} = runCli(['template', '--json'], {cwd: tmpDir});expect(status).toBe(0);const parsed = parseJson(stdout);@@ -207,14 +207,14 @@ describe('--json contract: supported commands emit valid envelopes', () => {expect(Array.isArray(parsed.data)).toBe(true);});- it('xds docs --json emits a typed envelope', () => {+ it('astryx docs --json emits a typed envelope', () => {const {status, stdout} = runCli(['docs', '--json'], {cwd: tmpDir});expect(status).toBe(0);const parsed = parseJson(stdout);expect(parsed.type).toMatch(/^docs\./);});- it('xds doctor --json emits a doctor envelope with checks + summary', () => {+ it('astryx doctor --json emits a doctor envelope with checks + summary', () => {// Run in a bare tmp dir → @astryxdesign/core won't resolve → a FAIL → exit 1.const {status, stdout} = runCli(['doctor', '--json'], {cwd: tmpDir});expect(status).toBe(1);diff --git a/packages/cli/src/commands/search.mjs b/packages/cli/src/commands/search.mjsindex 85f8c88e76..19b0aa8599 100644--- a/packages/cli/src/commands/search.mjs+++ b/packages/cli/src/commands/search.mjs@@ -9,11 +9,11 @@* next.** Usage:- * xds search button Ranked results across all domains- * xds search modal --type component Filter to a single domain- * xds search forms --limit 5 Cap the result count- * xds search button --detail Verbose (include import / reason)- * xds search button --json Typed JSON envelope+ * astryx search button Ranked results across all domains+ * astryx search modal --type component Filter to a single domain+ * astryx search forms --limit 5 Cap the result count+ * astryx search button --detail Verbose (include import / reason)+ * astryx search button --json Typed JSON envelope*/import {getRunPrefix} from '../utils/package-manager.mjs';@@ -71,7 +71,7 @@ export function registerSearch(program) {humanLog('');humanLog(`No results for "${q}".`);humanLog('');- humanLog(`Try a broader term, or browse: ${run} xds component --list`);+ humanLog(`Try a broader term, or browse: ${run} astryx component --list`);humanLog('');return;}diff --git a/packages/cli/src/commands/search.test.mjs b/packages/cli/src/commands/search.test.mjsindex ee53eaf785..de4a18ad2c 100644--- a/packages/cli/src/commands/search.test.mjs+++ b/packages/cli/src/commands/search.test.mjs@@ -17,7 +17,7 @@ import {fileURLToPath} from 'node:url';import {search, scoreCandidate, SEARCH_DOMAINS} from '../api/search.mjs';const __dirname = path.dirname(fileURLToPath(import.meta.url));-const CLI_BIN = path.resolve(__dirname, '../../bin/xds.mjs');+const CLI_BIN = path.resolve(__dirname, '../../bin/astryx.mjs');// Run against the monorepo root so @astryxdesign/core is discoverable.const REPO_ROOT = path.resolve(__dirname, '../../../..');const OPTS = {cwd: REPO_ROOT};@@ -39,7 +39,7 @@ describe('search() API — ranking', () => {expect(top.domain).toBe('component');expect(top.name).toBe('Button');expect(top.score).toBe(100);- expect(top.command).toBe('xds component Button');+ expect(top.command).toBe('astryx component Button');});it('returns components/hooks tagged with a matching keyword', async () => {@@ -61,9 +61,9 @@ describe('search() API — cross-domain', () => {// "color" is a doc topic AND appears across components.expect(domains.has('doc')).toBe(true);expect(domains.size).toBeGreaterThan(1);- // The doc topic should carry a follow-up `xds docs` command.+ // The doc topic should carry a follow-up `astryx docs` command.const docHit = data.results.find(r => r.domain === 'doc');- expect(docHit.command.startsWith('xds docs ')).toBe(true);+ expect(docHit.command.startsWith('astryx docs ')).toBe(true);});it('every result is tagged with a known domain and a command', async () => {@@ -196,7 +196,7 @@ describe('search CLI — exit codes + JSON contract', () => {it('shows the follow-up command hint in human output', () => {const r = runCli(['search', 'button']);- expect(r.stdout).toContain('xds component Button');+ expect(r.stdout).toContain('astryx component Button');expect(r.stdout).toContain('[component]');});});diff --git a/packages/cli/src/commands/swizzle-gap-safety.test.mjs b/packages/cli/src/commands/swizzle-gap-safety.test.mjsindex 207d23fe7f..a810251f45 100644--- a/packages/cli/src/commands/swizzle-gap-safety.test.mjs+++ b/packages/cli/src/commands/swizzle-gap-safety.test.mjs@@ -1,7 +1,7 @@// Copyright (c) Meta Platforms, Inc. and affiliates./**- * End-to-end safety tests for `xds swizzle --gap` and `xds gap-report`.+ * End-to-end safety tests for `astryx swizzle --gap` and `xds gap-report`.** Critical: these tests must NEVER actually invoke `gh issue create`. We* defend in depth:@@ -28,7 +28,7 @@ import * as path from 'node:path';import {fileURLToPath} from 'node:url';const __dirname = path.dirname(fileURLToPath(import.meta.url));-const cliBin = path.resolve(__dirname, '../../bin/xds.mjs');+const cliBin = path.resolve(__dirname, '../../bin/astryx.mjs');const repoRoot = path.resolve(__dirname, '../../../..');let shimDir;diff --git a/packages/cli/src/commands/swizzle.mjs b/packages/cli/src/commands/swizzle.mjsindex dd2f5975f4..f7b8983746 100644--- a/packages/cli/src/commands/swizzle.mjs+++ b/packages/cli/src/commands/swizzle.mjs@@ -65,7 +65,7 @@ export function registerSwizzle(program) {program.command('swizzle [component]').description('Copy component source for customization')- .option('--output <dir>', 'Output directory', './components/xds')+ .option('--output <dir>', 'Output directory', './components/astryx').option('--list', 'List available components').option('--gap <reason>', 'File a gap report explaining why you swizzled').option('--gap-category <category>', 'Gap category (for --gap mode)')@@ -102,9 +102,9 @@ export function registerSwizzle(program) {for (const name of components) {humanLog(` ${name}`);}- humanLog(`\nUsage: xds swizzle <component>\n`);- humanLog('Example: xds swizzle Button');- humanLog(' xds swizzle XDSButton (XDS prefix also works)\n');+ humanLog(`\nUsage: astryx swizzle <component>\n`);+ humanLog('Example: astryx swizzle Button');+ humanLog(' astryx swizzle XDSButton (XDS prefix also works)\n');return;}diff --git a/packages/cli/src/commands/swizzle.path-safety.test.mjs b/packages/cli/src/commands/swizzle.path-safety.test.mjsindex 44351d0c6f..806a4b9d9f 100644--- a/packages/cli/src/commands/swizzle.path-safety.test.mjs+++ b/packages/cli/src/commands/swizzle.path-safety.test.mjs@@ -1,7 +1,7 @@// Copyright (c) Meta Platforms, Inc. and affiliates./**- * @file Path-traversal regression tests for `xds swizzle --output`.+ * @file Path-traversal regression tests for `astryx swizzle --output`.** Spawns the CLI bin with a fake monorepo as cwd and asserts that* `--output ../escaped` is rejected with a clear error AND that no@@ -16,7 +16,7 @@ import * as os from 'node:os';import {fileURLToPath} from 'node:url';const __dirname = path.dirname(fileURLToPath(import.meta.url));-const CLI_BIN = path.resolve(__dirname, '../../bin/xds.mjs');+const CLI_BIN = path.resolve(__dirname, '../../bin/astryx.mjs');// Build a minimal fake monorepo: <root>/project/ contains a// node_modules/@astryxdesign/core/src/Button so findCoreDir succeeds, and@@ -98,7 +98,7 @@ describe('swizzle path safety', () => {it('requires --overwrite in non-interactive mode when files already exist', () => {const {project} = buildFakeRepo(tmpDir);- const outDir = path.join(project, 'components', 'xds', 'Button');+ const outDir = path.join(project, 'components', 'astryx', 'Button');fs.mkdirSync(outDir, {recursive: true});const existingPath = path.join(outDir, 'Button.tsx');fs.writeFileSync(existingPath, '// my customizations\n');diff --git a/packages/cli/src/commands/template.mjs b/packages/cli/src/commands/template.mjsindex bb00a6042c..6f192c4a33 100644--- a/packages/cli/src/commands/template.mjs+++ b/packages/cli/src/commands/template.mjs@@ -105,9 +105,9 @@ export function registerTemplate(program) {}}humanLog('\nUsage:');- humanLog(' xds template <name> [target-path] Scaffold page or block');- humanLog(' xds template <name> --skeleton Layout reference');- humanLog(' xds template --list --type block List only blocks\n');+ humanLog(' astryx template <name> [target-path] Scaffold page or block');+ humanLog(' astryx template <name> --skeleton Layout reference');+ humanLog(' astryx template --list --type block List only blocks\n');break;}diff --git a/packages/cli/src/commands/template.path-safety.test.mjs b/packages/cli/src/commands/template.path-safety.test.mjsindex 3daf3d3723..5e66837669 100644--- a/packages/cli/src/commands/template.path-safety.test.mjs+++ b/packages/cli/src/commands/template.path-safety.test.mjs@@ -1,7 +1,7 @@// Copyright (c) Meta Platforms, Inc. and affiliates./**- * @file Path-traversal regression tests for `xds template <name> <path>`.+ * @file Path-traversal regression tests for `astryx template <name> <path>`.** Drives the template API directly (it owns destination resolution +* path-safety enforcement). Spawning the CLI bin is unnecessary becausediff --git a/packages/cli/src/commands/upgrade.mjs b/packages/cli/src/commands/upgrade.mjsindex 465350e6d5..818794dc9e 100644--- a/packages/cli/src/commands/upgrade.mjs+++ b/packages/cli/src/commands/upgrade.mjs@@ -3,7 +3,7 @@/*** @file upgrade command — Full version-to-version upgrade pipeline*- * `xds upgrade` detects the consumer's @astryxdesign/core version, bumps all+ * `astryx upgrade` detects the consumer's @astryxdesign/core version, bumps all* @astryxdesign/* dependencies, installs them, and runs codemods to migrate* breaking API changes.*@@ -334,7 +334,7 @@ export function registerUpgrade(program) {} catch {if (!json) {p.log.warn(- `Could not update agent docs. Run \`${getRunPrefix()} xds agent-docs\` to update manually.`,+ `Could not update agent docs. Run \`${getRunPrefix()} astryx agent-docs\` to update manually.`,);}}diff --git a/packages/cli/src/commands/upgrade.test.mjs b/packages/cli/src/commands/upgrade.test.mjsindex b6c1264361..6d76cc2b69 100644--- a/packages/cli/src/commands/upgrade.test.mjs+++ b/packages/cli/src/commands/upgrade.test.mjs@@ -64,7 +64,7 @@ function writePkg(deps) {async function runJson(args) {const program = createProgram();try {- await program.parseAsync(['node', 'xds', ...args]);+ await program.parseAsync(['node', 'astryx', ...args]);} catch (err) {if (!String(err?.message || '').startsWith('__exit')) throw err;}@@ -100,7 +100,7 @@ describe('upgrade gate (semver comparison)', () => {it('blocks when current >= target by semver (e.g. 0.0.10 → 0.0.9)', async () => {writePkg({'@astryxdesign/core': '^0.0.10'});const program = createProgram();- await program.parseAsync(['node', 'xds', 'upgrade', '--to', '0.0.9']);+ await program.parseAsync(['node', 'astryx', 'upgrade', '--to', '0.0.9']);const output = stdoutCalls.join('') + logCalls.join('\n');expect(output).toMatch(/up to date|Already/i);});diff --git a/packages/cli/src/index.mjs b/packages/cli/src/index.mjsindex cad4a73bcb..fcfe6a81c3 100644--- a/packages/cli/src/index.mjs+++ b/packages/cli/src/index.mjs@@ -66,7 +66,7 @@ export const JSON_SUPPORTED = new Set([]);program- .name('xds')+ .name('astryx').description('Design system CLI — components, themes, and tooling').version(pkg.version).option('--zh', 'Output docs in Chinese Simplified')@@ -125,7 +125,7 @@ program// shallow fields (`name`, `version`, `commands` as a string[] of names,// `jsonSupported`) that earlier consumers read. The richer, structured// surface is embedded under `data.manifest` (and is also available- // standalone via `xds manifest --json` as `type: 'manifest'`).+ // standalone via `astryx manifest --json` as `type: 'manifest'`).process.__xdsJsonHandled = true;const manifest = buildManifest(program, {jsonSupported: JSON_SUPPORTED,@@ -271,7 +271,7 @@ for (const cmd of commands) {// Capability manifest — a single, self-describing view of the whole CLI so// agents can discover every command, argument, flag, and response type without-// scraping `--help`. `xds manifest --json` is the dedicated surface; the bare+// scraping `--help`. `astryx manifest --json` is the dedicated surface; the bare// `xds --json` embeds the same payload under data.manifest for convenience.program.command('manifest')@@ -293,7 +293,7 @@ programconsole.log(` ${c.name}${tag}`);if (c.description) console.log(` ${c.description}`);}- console.log(`\nRun \`xds manifest --json\` for the full structured manifest.\n`);+ console.log(`\nRun \`astryx manifest --json\` for the full structured manifest.\n`);});// Hidden command used by package.json postinstall scriptsdiff --git a/packages/cli/src/lib/cli-error.mjs b/packages/cli/src/lib/cli-error.mjsindex 9a9737435f..d46f7f9158 100644--- a/packages/cli/src/lib/cli-error.mjs+++ b/packages/cli/src/lib/cli-error.mjs@@ -24,7 +24,7 @@* and `xds --version` all exit 0. The user got what they asked for.** 4. **Empty / no-args invocations:** if the command has a sensible- * default (e.g. `xds component` lists all components, `xds docs` lists+ * default (e.g. `astryx component` lists all components, `astryx docs` lists* all topics), exit 0. If the command requires arguments (e.g. `xds* theme build`), Commander rejects it with exit 1.*diff --git a/packages/cli/src/lib/component-format.mjs b/packages/cli/src/lib/component-format.mjsindex 82bea05fc9..e82a403757 100644--- a/packages/cli/src/lib/component-format.mjs+++ b/packages/cli/src/lib/component-format.mjs@@ -55,7 +55,7 @@ function formatSubComponent(comp) {if (table) {out.push(table + '\n');} else {- out.push(`See \`xds component ${comp.name}\` for props and usage.\n`);+ out.push(`See \`astryx component ${comp.name}\` for props and usage.\n`);}return out;}diff --git a/packages/cli/src/lib/component-format.test.mjs b/packages/cli/src/lib/component-format.test.mjsindex 07948b20ff..2ded2d2814 100644--- a/packages/cli/src/lib/component-format.test.mjs+++ b/packages/cli/src/lib/component-format.test.mjs@@ -19,7 +19,7 @@ describe('formatFull sub-component rendering', () => {expect(out).toContain('### XDSRadioListItem');expect(out).not.toContain('undefined');// Points the reader at the sub-component's own docs instead of a blank.- expect(out).toContain('xds component XDSRadioListItem');+ expect(out).toContain('astryx component XDSRadioListItem');});it('renders a full props table for a sub-component that has inline props', () => {@@ -48,6 +48,6 @@ describe('formatFull sub-component rendering', () => {expect(out).toContain('| `label` |');expect(out).not.toContain('undefined');// With real props, it should NOT emit the "see docs" pointer.- expect(out).not.toContain('xds component XDSButtonGroup');+ expect(out).not.toContain('astryx component XDSButtonGroup');});});diff --git a/packages/cli/src/lib/error-codes.mjs b/packages/cli/src/lib/error-codes.mjsindex 5d0e0eeec4..1c49498735 100644--- a/packages/cli/src/lib/error-codes.mjs+++ b/packages/cli/src/lib/error-codes.mjs@@ -87,9 +87,9 @@ export const ERROR_CODES = Object.freeze({ERR_UNKNOWN: 'ERR_UNKNOWN',// ── CLI parsing / dispatch (Commander + bare invocation) ─────────- /** A top-level command name was not recognized (e.g. `xds bogus`). */+ /** A top-level command name was not recognized (e.g. `astryx bogus`). */ERR_UNKNOWN_COMMAND: 'ERR_UNKNOWN_COMMAND',- /** A subcommand under a command group was not recognized (e.g. `xds theme bogus`). */+ /** A subcommand under a command group was not recognized (e.g. `astryx theme bogus`). */ERR_UNKNOWN_SUBCOMMAND: 'ERR_UNKNOWN_SUBCOMMAND',/** An unknown flag/option was passed (Commander `unknownOption`). */ERR_INVALID_OPTION: 'ERR_INVALID_OPTION',diff --git a/packages/cli/src/lib/error-codes.test.mjs b/packages/cli/src/lib/error-codes.test.mjsindex 277f42738a..408fd107cb 100644--- a/packages/cli/src/lib/error-codes.test.mjs+++ b/packages/cli/src/lib/error-codes.test.mjs@@ -21,7 +21,7 @@ import {fileURLToPath} from 'node:url';import {ERROR_CODES, isErrorCode, allErrorCodes} from './error-codes.mjs';const __dirname = path.dirname(fileURLToPath(import.meta.url));-const CLI_BIN = path.resolve(__dirname, '../../bin/xds.mjs');+const CLI_BIN = path.resolve(__dirname, '../../bin/astryx.mjs');function runCli(args, {cwd} = {}) {const res = spawnSync('node', [CLI_BIN, ...args], {diff --git a/packages/cli/src/lib/json-contract.test.mjs b/packages/cli/src/lib/json-contract.test.mjsindex 55d3f5dc65..ba6b3a3e10 100644--- a/packages/cli/src/lib/json-contract.test.mjs+++ b/packages/cli/src/lib/json-contract.test.mjs@@ -27,7 +27,7 @@ import {} from './json.mjs';const __dirname = path.dirname(fileURLToPath(import.meta.url));-const CLI = path.resolve(__dirname, '..', '..', 'bin', 'xds.mjs');+const CLI = path.resolve(__dirname, '..', '..', 'bin', 'astryx.mjs');function runCli(args) {return spawnSync(process.execPath, [CLI, ...args], {@@ -137,14 +137,14 @@ describe('stdout discipline (humanLog / humanWarn)', () => {});describe('contract: every --json emission is valid JSON with apiVersion', () => {- it('xds --version --json', () => {+ it('astryx --version --json', () => {const r = runCli(['--version', '--json']);const env = JSON.parse(r.stdout);expect(env.apiVersion).toBe(API_VERSION);expect(env.type).toBe('version');});- it('xds --json (bare) help envelope', () => {+ it('astryx --json (bare) help envelope', () => {const r = runCli(['--json']);const env = JSON.parse(r.stdout);expect(env.apiVersion).toBe(API_VERSION);diff --git a/packages/cli/src/lib/json-shim.mjs b/packages/cli/src/lib/json-shim.mjsindex 60913fd67a..717d5c70d8 100644--- a/packages/cli/src/lib/json-shim.mjs+++ b/packages/cli/src/lib/json-shim.mjs@@ -15,7 +15,7 @@* and calls `_exit(0)`.** Neither path emits the JSON envelope, and neither throws (so the- * try/catch in `bin/xds.mjs` never sees them). The result: a --json+ * try/catch in `bin/astryx.mjs` never sees them). The result: a --json* consumer receives empty stdout + raw stderr, breaking the contract.** The shim closes the gap by:@@ -27,7 +27,7 @@* structured JSON help envelope (instead of raw text) when* --json is set.* 4. Routing unknown-subcommand attempts through the same error- * envelope path (so `xds bogus-cmd --json` gets exit 1 + envelope+ * envelope path (so `astryx bogus-cmd --json` gets exit 1 + envelope* instead of exit 0 + help envelope).** Non-JSON behavior is preserved exactly: every code path that printed@@ -57,13 +57,13 @@ function jsonActive() {/*** Build a structured JSON help envelope for a given Commander command.* Mirrors the existing root help envelope shape, but works for any- * subcommand (e.g. `xds component --help --json`).+ * subcommand (e.g. `astryx component --help --json`).** @param {import('commander').Command} cmd* @returns {{apiVersion: number, type: 'help', data: object}}*/export function buildHelpEnvelope(cmd) {- // Reconstruct the fully-qualified command name (e.g. "xds theme build").+ // Reconstruct the fully-qualified command name (e.g. "astryx theme build").const nameParts = [];let c = cmd;while (c) {@@ -276,9 +276,9 @@ function patchPrototype(CommandCtor) {* commander.helpDisplayed — `--help` was used (exit 0)* commander.help — same family (exit 0)* commander.version — `--version` was used (exit 0)- * commander.unknownCommand — `xds bogus-cmd`+ * commander.unknownCommand — `astryx bogus-cmd`* commander.unknownOption — `--bogus-flag`- * commander.missingArgument — `xds theme build` (no <file>)+ * commander.missingArgument — `astryx theme build` (no <file>)* commander.invalidArgument — bad value for argParser* commander.invalidOptionArgument* commander.excessArgumentsdiff --git a/packages/cli/src/lib/json-shim.test.mjs b/packages/cli/src/lib/json-shim.test.mjsindex a064c1b9a5..1fdd10011d 100644--- a/packages/cli/src/lib/json-shim.test.mjs+++ b/packages/cli/src/lib/json-shim.test.mjs@@ -25,7 +25,7 @@ import * as path from 'node:path';import {fileURLToPath} from 'node:url';const __dirname = path.dirname(fileURLToPath(import.meta.url));-const CLI_BIN = path.resolve(__dirname, '../../bin/xds.mjs');+const CLI_BIN = path.resolve(__dirname, '../../bin/astryx.mjs');function runCli(args) {const res = spawnSync('node', [CLI_BIN, ...args], {@@ -44,7 +44,7 @@ function parseJson(stdout) {}describe('--json shim: --help renders JSON envelope', () => {- it('xds --help --json emits a help envelope (not raw text), exit 0', () => {+ it('astryx --help --json emits a help envelope (not raw text), exit 0', () => {const {status, stdout, stderr} = runCli(['--help', '--json']);expect(status).toBe(0);expect(stderr).toBe('');@@ -52,38 +52,38 @@ describe('--json shim: --help renders JSON envelope', () => {expect(parsed.apiVersion).toBe(1);expect(parsed.type).toBe('help');expect(parsed.data).toBeDefined();- expect(parsed.data.command).toBe('xds');+ expect(parsed.data.command).toBe('astryx');// Should list known subcommandsconst subNames = parsed.data.subcommands.map((s) => s.name);expect(subNames).toContain('component');expect(subNames).toContain('theme');});- it('xds component --help --json emits a subcommand help envelope', () => {+ it('astryx component --help --json emits a subcommand help envelope', () => {const {status, stdout} = runCli(['component', '--help', '--json']);expect(status).toBe(0);const parsed = parseJson(stdout);expect(parsed.apiVersion).toBe(1);expect(parsed.type).toBe('help');- expect(parsed.data.command).toBe('xds component');+ expect(parsed.data.command).toBe('astryx component');// Should expose its optionsconst flags = parsed.data.options.map((o) => o.flags);expect(flags).toContain('--list');});- it('xds theme build --help --json emits a nested subcommand help envelope', () => {+ it('astryx theme build --help --json emits a nested subcommand help envelope', () => {const {status, stdout} = runCli(['theme', 'build', '--help', '--json']);expect(status).toBe(0);const parsed = parseJson(stdout);expect(parsed.apiVersion).toBe(1);expect(parsed.type).toBe('help');- expect(parsed.data.command).toBe('xds theme build');+ expect(parsed.data.command).toBe('astryx theme build');expect(parsed.data.usage).toMatch(/<file>/);});});describe('--json shim: parse errors emit JSON error envelope', () => {- it('xds theme build --json (missing required arg) emits error envelope, exit 1', () => {+ it('astryx theme build --json (missing required arg) emits error envelope, exit 1', () => {const {status, stdout} = runCli(['theme', 'build', '--json']);expect(status).toBe(1);const parsed = parseJson(stdout);@@ -92,7 +92,7 @@ describe('--json shim: parse errors emit JSON error envelope', () => {expect(parsed.error).toMatch(/file/i);});- it('xds --bogus-flag --json (unknown option) emits error envelope, exit 1', () => {+ it('astryx --bogus-flag --json (unknown option) emits error envelope, exit 1', () => {const {status, stdout} = runCli(['--bogus-flag', '--json']);expect(status).toBe(1);const parsed = parseJson(stdout);@@ -101,7 +101,7 @@ describe('--json shim: parse errors emit JSON error envelope', () => {expect(parsed.error).toMatch(/--bogus-flag/);});- it('xds component --json --bogus-flag (unknown option on subcmd) emits error envelope, exit 1', () => {+ it('astryx component --json --bogus-flag (unknown option on subcmd) emits error envelope, exit 1', () => {const {status, stdout} = runCli(['component', '--json', '--bogus-flag']);expect(status).toBe(1);const parsed = parseJson(stdout);@@ -111,7 +111,7 @@ describe('--json shim: parse errors emit JSON error envelope', () => {});describe('--json shim: unknown subcommand emits error envelope', () => {- it('xds bogus-cmd --json emits error envelope, exit 1 (not exit 0 + help)', () => {+ it('astryx bogus-cmd --json emits error envelope, exit 1 (not exit 0 + help)', () => {const {status, stdout} = runCli(['bogus-cmd', '--json']);expect(status).toBe(1);const parsed = parseJson(stdout);@@ -126,7 +126,7 @@ describe('--json shim: unknown subcommand emits error envelope', () => {});describe('--json shim: invalid --detail choice', () => {- it('xds --detail bogus --json emits a single error envelope, exit 1', () => {+ it('astryx --detail bogus --json emits a single error envelope, exit 1', () => {const {status, stdout} = runCli(['--detail', 'bogus', '--json']);expect(status).toBe(1);const parsed = parseJson(stdout);@@ -142,7 +142,7 @@ describe('--json shim: invalid --detail choice', () => {});describe('--json shim: invalid --lang choice', () => {- it('xds docs color --lang fr --json emits a single error envelope, exit 1', () => {+ it('astryx docs color --lang fr --json emits a single error envelope, exit 1', () => {const {status, stdout} = runCli(['docs', 'color', '--lang', 'fr', '--json']);expect(status).toBe(1);const parsed = parseJson(stdout);@@ -154,57 +154,57 @@ describe('--json shim: invalid --lang choice', () => {expect(topLevelBraces).toBe(1);});- it('xds docs color --lang fr (no --json) writes to stderr and exits 1', () => {+ it('astryx docs color --lang fr (no --json) writes to stderr and exits 1', () => {const {status, stdout, stderr} = runCli(['docs', 'color', '--lang', 'fr']);expect(status).toBe(1);expect(stdout).toBe('');expect(stderr).toMatch(/--lang/);});- it('xds docs color --lang zh is accepted (exit 0)', () => {+ it('astryx docs color --lang zh is accepted (exit 0)', () => {const {status} = runCli(['docs', 'color', '--lang', 'zh']);expect(status).toBe(0);});- it('xds docs color --lang en is accepted (exit 0)', () => {+ it('astryx docs color --lang en is accepted (exit 0)', () => {const {status} = runCli(['docs', 'color', '--lang', 'en']);expect(status).toBe(0);});});describe('--json shim: non-JSON behavior is preserved', () => {- it('xds theme build (no --json, missing arg) writes to stderr and exits 1', () => {+ it('astryx theme build (no --json, missing arg) writes to stderr and exits 1', () => {const {status, stdout, stderr} = runCli(['theme', 'build']);expect(status).toBe(1);expect(stdout).toBe('');expect(stderr).toMatch(/missing required argument/i);});- it('xds --bogus-flag (no --json) writes to stderr and exits 1', () => {+ it('astryx --bogus-flag (no --json) writes to stderr and exits 1', () => {const {status, stdout, stderr} = runCli(['--bogus-flag']);expect(status).toBe(1);expect(stdout).toBe('');expect(stderr).toMatch(/unknown option/i);});- it('xds bogus-cmd (no --json) writes to stderr and exits 1', () => {+ it('astryx bogus-cmd (no --json) writes to stderr and exits 1', () => {const {status, stdout, stderr} = runCli(['bogus-cmd']);expect(status).toBe(1);expect(stdout).toBe('');expect(stderr).toMatch(/unknown command/i);});- it('xds --detail bogus (no --json) writes to stderr and exits 1', () => {+ it('astryx --detail bogus (no --json) writes to stderr and exits 1', () => {const {status, stdout, stderr} = runCli(['--detail', 'bogus']);expect(status).toBe(1);expect(stdout).toBe('');expect(stderr).toMatch(/--detail/);});- it('xds --help (no --json) writes raw help text to stdout, exit 0', () => {+ it('astryx --help (no --json) writes raw help text to stdout, exit 0', () => {const {status, stdout, stderr} = runCli(['--help']);expect(status).toBe(0);- expect(stdout).toMatch(/^Usage: xds/);+ expect(stdout).toMatch(/^Usage: astryx/);expect(stderr).toBe('');});});diff --git a/packages/cli/src/lib/manifest.mjs b/packages/cli/src/lib/manifest.mjsindex be20149691..7892e580fa 100644--- a/packages/cli/src/lib/manifest.mjs+++ b/packages/cli/src/lib/manifest.mjs@@ -3,7 +3,7 @@/*** @file Capability manifest — self-describing CLI surface for agents.*- * `xds --json` (and `xds manifest --json`) emit a structured manifest that+ * `astryx --json` (and `astryx manifest --json`) emit a structured manifest that* lets an AI agent drive the entire CLI WITHOUT scraping `--help` text. It is* to the CLI what an OpenAPI spec is to an HTTP API.*@@ -22,7 +22,7 @@** @input a configured Commander `program` + the JSON_SUPPORTED allowlist* @output a `{ name, version, globalOptions, commands, responseTypes }` object- * @position consumed by the bare `xds --json` action and the `manifest` command+ * @position consumed by the bare `astryx --json` action and the `manifest` command*/import {API_VERSION} from './json.mjs';@@ -71,18 +71,18 @@ export const RESPONSE_TYPES = {* @type {Record<string, string[]>}*/const EXAMPLES = {- component: ['xds component', 'xds component XDSButton', 'xds component XDSButton --props --json'],- docs: ['xds docs', 'xds docs spacing --json'],- discover: ['xds discover --json'],- search: ['xds search modal --json', 'xds search button --type component --json'],- swizzle: ['xds swizzle XDSButton'],- template: ['xds template --json', 'xds template dashboard ./src/app'],- hook: ['xds hook', 'xds hook useToggle --json'],- 'theme build': ['xds theme build ./src/themes/ocean.ts --out ./dist/ocean.css'],- upgrade: ['xds upgrade --json'],- manifest: ['xds manifest --json', 'xds --json'],- doctor: ['xds doctor', 'xds doctor --json'],- init: ['xds init'],+ component: ['astryx component', 'astryx component XDSButton', 'astryx component XDSButton --props --json'],+ docs: ['astryx docs', 'astryx docs spacing --json'],+ discover: ['astryx discover --json'],+ search: ['astryx search modal --json', 'astryx search button --type component --json'],+ swizzle: ['astryx swizzle XDSButton'],+ template: ['astryx template --json', 'astryx template dashboard ./src/app'],+ hook: ['astryx hook', 'astryx hook useToggle --json'],+ 'theme build': ['astryx theme build ./src/themes/ocean.ts --out ./dist/ocean.css'],+ upgrade: ['astryx upgrade --json'],+ manifest: ['astryx manifest --json', 'astryx --json'],+ doctor: ['astryx doctor', 'astryx doctor --json'],+ init: ['astryx init'],};/**@@ -232,7 +232,7 @@ export function buildManifest(program, opts = {}) {.sort((a, b) => a.name.localeCompare(b.name));return {- name: 'xds',+ name: 'astryx',version,apiVersion: API_VERSION,description: program.description() || '',diff --git a/packages/cli/src/lib/manifest.test.mjs b/packages/cli/src/lib/manifest.test.mjsindex f8bdd724ff..df57928298 100644--- a/packages/cli/src/lib/manifest.test.mjs+++ b/packages/cli/src/lib/manifest.test.mjs@@ -10,7 +10,7 @@* JSON-supported command must declare its response types, and every* response-type key must map to a real command.* 2. SHAPE — each command entry carries the required fields, global options- * are described once, and the bare `xds --json` / `xds manifest --json`+ * are described once, and the bare `xds --json` / `astryx manifest --json`* surfaces emit valid, enriched JSON.*/@@ -22,7 +22,7 @@ import {program, JSON_SUPPORTED} from '../index.mjs';import {buildManifest, RESPONSE_TYPES} from './manifest.mjs';const __dirname = path.dirname(fileURLToPath(import.meta.url));-const CLI_BIN = path.resolve(__dirname, '../../bin/xds.mjs');+const CLI_BIN = path.resolve(__dirname, '../../bin/astryx.mjs');const manifest = buildManifest(program, {jsonSupported: JSON_SUPPORTED, version: '0.0.0-test'});@@ -94,7 +94,7 @@ describe('manifest: drift guards', () => {describe('manifest: shape', () => {it('has top-level metadata', () => {- expect(manifest.name).toBe('xds');+ expect(manifest.name).toBe('astryx');expect(manifest.apiVersion).toBe(1);expect(typeof manifest.description).toBe('string');expect(Array.isArray(manifest.commands)).toBe(true);@@ -144,13 +144,13 @@ function runCli(args) {}describe('manifest: e2e', () => {- it('xds manifest --json emits a valid manifest envelope', () => {+ it('astryx manifest --json emits a valid manifest envelope', () => {const {status, stdout} = runCli(['manifest', '--json']);expect(status).toBe(0);const parsed = JSON.parse(stdout);expect(parsed.apiVersion).toBe(1);expect(parsed.type).toBe('manifest');- expect(parsed.data.name).toBe('xds');+ expect(parsed.data.name).toBe('astryx');const names = parsed.data.commands.map((c) => c.name);expect(names).toContain('component');expect(names).toContain('theme');@@ -163,7 +163,7 @@ describe('manifest: e2e', () => {const parsed = JSON.parse(stdout);// Back-compat: still type:'help' with name/version/commands(names)/jsonSupportedexpect(parsed.type).toBe('help');- expect(parsed.data.name).toBe('xds');+ expect(parsed.data.name).toBe('astryx');expect(Array.isArray(parsed.data.commands)).toBe(true);expect(parsed.data.commands.every((c) => typeof c === 'string')).toBe(true);expect(parsed.data.commands).toContain('component');diff --git a/packages/cli/src/lib/node-version.mjs b/packages/cli/src/lib/node-version.mjsindex 2569c0a68c..e0f028834b 100644--- a/packages/cli/src/lib/node-version.mjs+++ b/packages/cli/src/lib/node-version.mjs@@ -63,7 +63,7 @@ export function isNodeVersionSupported(version, minimum = MIN_NODE_VERSION) {export function unsupportedNodeMessage(version, minimum = MIN_NODE_VERSION) {const clean = String(version).trim().replace(/^v/, '');return (- `xds requires Node.js >=${minimum} (you have v${clean}). ` ++ `astryx requires Node.js >=${minimum} (you have v${clean}). ` +`Please upgrade Node and try again.`);}diff --git a/packages/cli/src/types/manifest.d.ts b/packages/cli/src/types/manifest.d.tsindex 89d5f38800..0e3aa6af77 100644--- a/packages/cli/src/types/manifest.d.ts+++ b/packages/cli/src/types/manifest.d.ts@@ -1,7 +1,7 @@// Copyright (c) Meta Platforms, Inc. and affiliates./**- * Types for the CLI capability manifest emitted by `xds manifest --json`+ * Types for the CLI capability manifest emitted by `astryx manifest --json`* (and embedded under `data.manifest` of the bare `xds --json` help envelope).** The manifest is a self-describing view of the entire CLI surface so an agent@@ -54,7 +54,7 @@ export interface ManifestCommand {/** The full manifest payload (the `data` of the `manifest` envelope). */export interface CLIManifest {- name: 'xds';+ name: 'astryx';version: string;apiVersion: number;description: string;@@ -66,7 +66,7 @@ export interface CLIManifest {responseTypes: Record<string, string[]>;}-/** The `xds manifest --json` envelope. */+/** The `astryx manifest --json` envelope. */export interface ManifestResponse {type: 'manifest';data: CLIManifest;diff --git a/packages/cli/src/types/search.d.ts b/packages/cli/src/types/search.d.tsindex 6b9fb8cf77..15790e565d 100644--- a/packages/cli/src/types/search.d.ts+++ b/packages/cli/src/types/search.d.ts@@ -3,7 +3,7 @@/*** Search command JSON responses.*- * `xds search <query>` returns a single ranked, typed result set spanning all+ * `astryx search <query>` returns a single ranked, typed result set spanning all* content domains — components, hooks, docs topics, and templates. Scoring is* keyword + fuzzy ranking (not semantic / embeddings).*@@ -31,7 +31,7 @@ export interface SearchResultEntry {reason: string;/** One-line description, when available. */description: string;- /** Follow-up command to act on this result (e.g. `xds component Button`). */+ /** Follow-up command to act on this result (e.g. `astryx component Button`). */command: string;/** Import path — present for component and hook results. */import?: string;diff --git a/packages/cli/src/utils/interactive.mjs b/packages/cli/src/utils/interactive.mjsindex fd59c78146..2c3d9df9d7 100644--- a/packages/cli/src/utils/interactive.mjs+++ b/packages/cli/src/utils/interactive.mjs@@ -14,7 +14,7 @@* Two entry points, for two situations:** - `requireInteractive()` — for commands whose prompt IS the work- * (e.g. `xds init`, `xds theme`). With no TTY there is nothing to do, so+ * (e.g. `astryx init`, `astryx theme`). With no TTY there is nothing to do, so* fail fast (exit 1) with actionable, non-interactive guidance.** - `isInteractive()` — for commands with an OPTIONAL secondary prompt@@ -52,7 +52,7 @@ export function isInteractive({* @param {object} options* @param {string} options.command - Command name for the message, e.g. 'init'.* @param {string} options.hint - Concrete non-interactive invocation, e.g.- * '`pnpm xds init --all` or `--features agents,theme,template`'.+ * '`pnpm astryx init --all` or `--features agents,theme,template`'.* @param {boolean} [options.json=false] - When true, the command does not* support --json; we still exit 1 but skip the human-formatted guidance.* @param {object} [env] - Forwarded to isInteractive (test hook).diff --git a/packages/cli/src/utils/interactive.test.mjs b/packages/cli/src/utils/interactive.test.mjsindex dc53090a18..5f9120d8dd 100644--- a/packages/cli/src/utils/interactive.test.mjs+++ b/packages/cli/src/utils/interactive.test.mjs@@ -40,7 +40,7 @@ describe('requireInteractive', () => {});expect(() =>requireInteractive(- {command: 'init', hint: '`xds init --all`'},+ {command: 'init', hint: '`astryx init --all`'},{stdinTTY: true, stdoutTTY: true, ci: false},),).not.toThrow();@@ -56,13 +56,13 @@ describe('requireInteractive', () => {const err = vi.spyOn(console, 'error').mockImplementation(() => {});expect(() =>requireInteractive(- {command: 'theme', hint: '`xds theme <preset>`'},+ {command: 'theme', hint: '`astryx theme <preset>`'},{stdinTTY: false, stdoutTTY: false, ci: false},),).toThrow('__exit__');expect(exit).toHaveBeenCalledWith(1);const output = err.mock.calls.map(c => c.join(' ')).join('\n');expect(output).toMatch(/requires a TTY/i);- expect(output).toMatch(/xds theme <preset>/);+ expect(output).toMatch(/astryx theme <preset>/);});});diff --git a/packages/cli/src/utils/path-safety.mjs b/packages/cli/src/utils/path-safety.mjsindex f12842f49e..2cc99ff332 100644--- a/packages/cli/src/utils/path-safety.mjs+++ b/packages/cli/src/utils/path-safety.mjs@@ -145,8 +145,8 @@ const FILE_EXTENSIONS = new Set([/*** Heuristic: does this CLI argument look like a file path (vs a directory)?*- * Used by `xds template <name> <path>` so that- * `xds template blank ./foo.tsx`+ * Used by `astryx template <name> <path>` so that+ * `astryx template blank ./foo.tsx`* writes to `./foo.tsx` as a file, not `./foo.tsx/page.tsx` (the old bug).** Returns true when the basename has a known source/asset extension.diff --git a/packages/cli/src/utils/path-safety.test.mjs b/packages/cli/src/utils/path-safety.test.mjsindex de87903cd5..d611ce8d64 100644--- a/packages/cli/src/utils/path-safety.test.mjs+++ b/packages/cli/src/utils/path-safety.test.mjs@@ -118,7 +118,7 @@ describe('isFilePathArg', () => {it('returns false for plain directory names', () => {expect(isFilePathArg('out')).toBe(false);- expect(isFilePathArg('./components/xds')).toBe(false);+ expect(isFilePathArg('./components/astryx')).toBe(false);expect(isFilePathArg('src/pages')).toBe(false);});diff --git a/packages/cli/src/utils/update-check.mjs b/packages/cli/src/utils/update-check.mjsindex 10112eba85..dff0efbb63 100644--- a/packages/cli/src/utils/update-check.mjs+++ b/packages/cli/src/utils/update-check.mjs@@ -97,7 +97,7 @@ export function checkForUpdate(cwd = process.cwd()) {// Use semver-aware comparison so '0.0.20' is correctly treated as greater// than '0.0.5' (lexicographic compare gets that backwards).if (semverGt(latest, installed)) {- return `FYI: A newer version of @astryxdesign/core (${latest}) is available. You can upgrade with: xds upgrade --apply --to ${latest}`;+ return `FYI: A newer version of @astryxdesign/core (${latest}) is available. You can upgrade with: astryx upgrade --apply --to ${latest}`;}return null;diff --git a/packages/cli/src/utils/update-check.test.mjs b/packages/cli/src/utils/update-check.test.mjsindex 94438b656f..f177eebdf9 100644--- a/packages/cli/src/utils/update-check.test.mjs+++ b/packages/cli/src/utils/update-check.test.mjs@@ -117,7 +117,7 @@ describe('checkForUpdate', () => {const hint = checkForUpdate(tmpDir);expect(hint).toContain('0.0.8');- expect(hint).toContain('xds upgrade --apply --to 0.0.8');+ expect(hint).toContain('astryx upgrade --apply --to 0.0.8');expect(hint).toContain('FYI');});diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.mdindex 87d5d04690..4acf7d9642 100644--- a/packages/core/CHANGELOG.md+++ b/packages/core/CHANGELOG.md@@ -7,21 +7,21 @@ This release makes **bare component names canonical**: `Button`, `Stack`, `useTh#### Breaking Changes- **Un-prefix migration — bare names are canonical** — Every `XDS*` component, hook, and type now has a bare alias (`XDSButton` → `Button`, `useXDSTheme` → `useTheme`, ~634 identifiers across 100 barrels). The prefixed names still work as aliases during the compat window, so this is non-breaking if you do nothing — but bare names are the new default for docs, discovery, and new code. (#2941)- **Codemod:** `npx xds upgrade --codemod drop-xds-prefix-imports`+ **Codemod:** `npx astryx upgrade --codemod drop-xds-prefix-imports`- **`@xds/core` un-prefix** — `XDSMetaAppShell` → `MetaAppShell` and related meta-app exports drop the `XDS` prefix. (#2957)- **Codemod:** `npx xds upgrade --codemod drop-xds-meta-prefix`+ **Codemod:** `npx astryx upgrade --codemod drop-xds-meta-prefix`- **DatePicker components renamed to Input** — `XDSDateTimePicker` → `XDSDateTimeInput` and `XDSDateRangePicker` → `XDSDateRangeInput` (plus their props, size, and hour-format types), for consistency with `DateInput`/`TextInput`/`NumberInput`. (#2276)- **Codemod:** `npx xds upgrade --codemod rename-date-picker-to-input`+ **Codemod:** `npx astryx upgrade --codemod rename-date-picker-to-input`- **Stack `element` → `as`** — `XDSStack`, `XDSHStack`, `XDSVStack`, and `XDSStackItem` use `as` instead of `element`, matching other polymorphic components. (#2441)- **Codemod:** `npx xds upgrade --codemod rename-stack-element-to-as`+ **Codemod:** `npx astryx upgrade --codemod rename-stack-element-to-as`- **Chat `isStreaming` → `isStopShown`** — On `XDSChatComposer` and `XDSChatSendButton`, the prop that controls the stop-button affordance is renamed to describe what it does rather than implying a streaming state. (Unchanged on `XDSMarkdown`/`XDSChatReasoning`.) (#2333)- **Codemod:** `npx xds upgrade --codemod rename-isStreaming-to-isStopShown`+ **Codemod:** `npx astryx upgrade --codemod rename-isStreaming-to-isStopShown`- **Imperative handles move to `handleRef`** — `XDS*` components reserve `ref` for the root DOM element. Components exposing an imperative handle (`XDSCalendar`, `XDSChatComposerInput`, `XDSPowerSearch`, `XDSTokenizer`, `XDSChartStreamGL`) now expose it via `handleRef`; `XDSSideNavCollapseButton`'s `sideNavRef` is also renamed to `handleRef`. (#2363)- **Codemod:** `npx xds upgrade --codemod rename-imperative-ref-to-handleRef`+ **Codemod:** `npx astryx upgrade --codemod rename-imperative-ref-to-handleRef`- **Menu/Selector trailing content: `children` → `endContent`** — `XDSDropdownMenuItem`, `XDSContextMenuItem`, and `XDSSelectorOption` use `endContent` for trailing badges, status icons, shortcuts, and other end-aligned content; the previous trailing-content `children` prop is removed. (#2802)- **Codemod:** `npx xds upgrade --codemod migrate-item-children-to-endcontent`+ **Codemod:** `npx astryx upgrade --codemod migrate-item-children-to-endcontent`- **Selector custom rendering: function-children → `renderOption`** — `XDSSelector` and `XDSMultiSelector` use the `renderOption` prop for custom option rendering; the previous function-as-children renderer is removed. (#2821)- **Codemod:** `npx xds upgrade --codemod migrate-selector-children-to-render-option`+ **Codemod:** `npx astryx upgrade --codemod migrate-selector-children-to-render-option`- **CheckboxList loading is now per-item** — The group-level `isLoading` on `XDSCheckboxList` is removed in favor of `isLoading` on `XDSCheckboxListItem`. In collection mode the toggled item shows its spinner automatically while its `changeAction` is pending. (#2903)- **Chat `messageGap` → `gap`** — `XDSChat` renames `messageGap` to `gap`. (#2325)- **FileInput `onChangeAction` → `changeAction`** — Aligns `XDSFileInput` with the React 19 action-prop convention used across the system. (#2288)@@ -32,13 +32,13 @@ This release makes **bare component names canonical**: `Button`, `Stack`, `useTh#### Upgrade```bash-npx xds upgrade --apply+npx astryx upgrade --apply```This runs the release codemods in sequence. The bare-name migration (`drop-xds-prefix-imports`, `drop-xds-meta-prefix`) and the theme data-attribute migration (`migrate-theme-selectors-to-data-attrs`) are optional — run them explicitly when you're ready, e.g.:```bash-npx xds upgrade --codemod drop-xds-prefix-imports --codemod-only --apply+npx astryx upgrade --codemod drop-xds-prefix-imports --codemod-only --apply```#### New Components@@ -77,7 +77,7 @@ npx xds upgrade --codemod drop-xds-prefix-imports --codemod-only --apply- **List/Item density** — `XDSListItem` passes density (`compact`/`balanced`/`spacious`) through to the shared `XDSItem`, fixing `balanced`/`spacious` collapsing to the same padding.- **Markdown loose lists** — Join blank-line-separated same-style list items into a single loose list (CommonMark §5.3) and forward a non-default `start` onto the rendered `<ol>` for assistive tech and copy-paste.- **AppShell mobile nav** — Fix mobile nav with a heading-only `XDSTopNav`; remove `useXDSSlotPresence`. (#2243)-- **Theme CSS prose regression** — Fix built theme CSS that broke Markdown typography in the docsite (headings lost block margins) after the un-prefix migration. `xds theme build` now uses a single CSS generation path (`@xds/core`'s generator) and a failed `@xds/core/theme` import is a hard build error instead of a silent fallback. (#2964)+- **Theme CSS prose regression** — Fix built theme CSS that broke Markdown typography in the docsite (headings lost block margins) after the un-prefix migration. `astryx theme build` now uses a single CSS generation path (`@xds/core`'s generator) and a failed `@xds/core/theme` import is a hard build error instead of a silent fallback. (#2964)- **Escape-hatch & base-prop hygiene** — Many components had redundant `xstyle`/`className`/`style` re-declarations removed and now consistently extend `XDSBaseProps`, forward escape hatches, and expose `displayName` (require-base-props / require-ref-prop lint rules). (#2300, #2310, #2835, #2858)- **Toast barrel export** — Export `XDSToast` and its props from the `@xds/core` barrel so docsite playground previews resolve Toast examples.- **Typeahead id-less rows** — `XDSBaseTypeahead` uses a shared key fallback for search results without `id` values, so id-less rows no longer all render as selected.@@ -105,11 +105,11 @@ Thanks to everyone who contributed to this release:#### Breaking Changes- **`on*Action` → `*Action` (React 19 convention)** — `onChangeAction` → `changeAction`, `onClickAction` → `clickAction`, `onPressedChangeAction` → `pressedChangeAction`, `onScrollToTopAction` → `scrollToTopAction`. Aligns with React 19 action prop naming. (#1942)- **Codemod:** `npx xds upgrade --codemod rename-action-props`+ **Codemod:** `npx astryx upgrade --codemod rename-action-props`- **Status naming: `positive`/`negative` → `success`/`error`** — Converge status variant naming across all components. (#2175)- **Codemod:** `npx xds upgrade --codemod rename-status-variants`+ **Codemod:** `npx astryx upgrade --codemod rename-status-variants`- **Section `wash` → `muted`** — Rename variant for consistency with XDSCard. (#2063)- **Codemod:** `npx xds upgrade --codemod rename-section-wash-to-muted`+ **Codemod:** `npx astryx upgrade --codemod rename-section-wash-to-muted`- **Stack `direction` defaults to `vertical`** — `XDSStack` no longer requires an explicit `direction` prop; omitting it gives vertical layout. (#1945)- **Table `textOverflow` default changed to `truncate`** — Was `wrap`, now truncates by default with tooltip on hover. (#2096)- **Remove deprecated `*Raw` token aliases** — Migrate any `*Raw` usage to standard tokens. (#2095)@@ -118,7 +118,7 @@ Thanks to everyone who contributed to this release:#### Upgrade```bash-npx xds upgrade --apply+npx astryx upgrade --apply```This runs all three codemods (`rename-action-props`, `rename-status-variants`, `rename-section-wash-to-muted`) in sequence.@@ -300,12 +300,12 @@ Thanks to everyone who contributed to this release:Codemods are available for all breaking changes in this release:```sh-npx xds upgrade --apply --to 0.0.13+npx astryx upgrade --apply --to 0.0.13```-Preview changes first (dry run): `npx xds upgrade --to 0.0.13`-Run a specific codemod: `npx xds upgrade --apply --codemod toolbar-density-to-size`-List all available codemods: `npx xds upgrade --list`+Preview changes first (dry run): `npx astryx upgrade --to 0.0.13`+Run a specific codemod: `npx astryx upgrade --apply --codemod toolbar-density-to-size`+List all available codemods: `npx astryx upgrade --list`---@@ -352,12 +352,12 @@ List all available codemods: `npx xds upgrade --list`Codemods are available for all breaking changes in this release:```sh-npx xds upgrade --apply --to 0.0.12+npx astryx upgrade --apply --to 0.0.12```-Preview changes first (dry run): `npx xds upgrade --to 0.0.12`-Run a specific codemod: `npx xds upgrade --apply --codemod add-is-icon-only`-List all available codemods: `npx xds upgrade --list`+Preview changes first (dry run): `npx astryx upgrade --to 0.0.12`+Run a specific codemod: `npx astryx upgrade --apply --codemod add-is-icon-only`+List all available codemods: `npx astryx upgrade --list`---@@ -399,12 +399,12 @@ List all available codemods: `npx xds upgrade --list`Codemods are available for all breaking changes in this release:```sh-npx xds upgrade --apply --to 0.0.10+npx astryx upgrade --apply --to 0.0.10```-Preview changes first (dry run): `npx xds upgrade --to 0.0.10`-Run a specific codemod: `npx xds upgrade --apply --codemod remove-size-props`-List all available codemods: `npx xds upgrade --list`+Preview changes first (dry run): `npx astryx upgrade --to 0.0.10`+Run a specific codemod: `npx astryx upgrade --apply --codemod remove-size-props`+List all available codemods: `npx astryx upgrade --list`---@@ -440,12 +440,12 @@ List all available codemods: `npx xds upgrade --list`Codemods are available for all breaking changes in this release:```sh-npx xds upgrade --apply --to 0.0.8+npx astryx upgrade --apply --to 0.0.8```-Preview changes first (dry run): `npx xds upgrade --to 0.0.8`-Run a specific codemod: `npx xds upgrade --apply --codemod rename-endslot-to-endcontent`-List all available codemods: `npx xds upgrade --list`+Preview changes first (dry run): `npx astryx upgrade --to 0.0.8`+Run a specific codemod: `npx astryx upgrade --apply --codemod rename-endslot-to-endcontent`+List all available codemods: `npx astryx upgrade --list`---@@ -460,12 +460,12 @@ List all available codemods: `npx xds upgrade --list`Codemods are available for all breaking changes in this release:```sh-npx xds upgrade --apply --to 0.0.7+npx astryx upgrade --apply --to 0.0.7```-Preview changes first (dry run): `npx xds upgrade --to 0.0.7`-Run a specific codemod: `npx xds upgrade --apply --codemod rename-banner-variant-to-container`-List all available codemods: `npx xds upgrade --list`+Preview changes first (dry run): `npx astryx upgrade --to 0.0.7`+Run a specific codemod: `npx astryx upgrade --apply --codemod rename-banner-variant-to-container`+List all available codemods: `npx astryx upgrade --list`---@@ -511,11 +511,11 @@ List all available codemods: `npx xds upgrade --list`Codemods are available for all breaking changes in this release:```sh-npx xds upgrade --apply --to 0.0.6+npx astryx upgrade --apply --to 0.0.6```-Preview changes first (dry run): `npx xds upgrade --to 0.0.6`-List all available codemods: `npx xds upgrade --list`+Preview changes first (dry run): `npx astryx upgrade --to 0.0.6`+List all available codemods: `npx astryx upgrade --list`---@@ -585,11 +585,11 @@ See 0.0.6 above for breaking changes and upgrade instructions.Codemods are available for all breaking changes in this release:```sh-npx xds upgrade --apply --to 0.0.2+npx astryx upgrade --apply --to 0.0.2```-Preview changes first (dry run): `npx xds upgrade --to 0.0.2`-List all available codemods: `npx xds upgrade --list`+Preview changes first (dry run): `npx astryx upgrade --to 0.0.2`+List all available codemods: `npx astryx upgrade --list`12 codemods included:diff --git a/packages/core/README.md b/packages/core/README.mdindex 6ad657167a..6c0afc6c9d 100644--- a/packages/core/README.md+++ b/packages/core/README.md@@ -23,9 +23,9 @@ global navigation.Requires `@astryxdesign/cli` (`npm install -D @astryxdesign/cli`):```bash-npx xds template --list # browse all page and block templates-npx xds template dashboard # emit full page source-npx xds template settings --skeleton # layout skeleton with spatial annotations+npx astryx template --list # browse all page and block templates+npx astryx template dashboard # emit full page source+npx astryx template settings --skeleton # layout skeleton with spatial annotations```## XDS CLI@@ -33,17 +33,17 @@ npx xds template settings --skeleton # layout skeleton with spatial annotationsThe CLI (`@astryxdesign/cli`) provides additional tooling:```bash-npx xds --help # full listing of all commands-npx xds component Button # full docs + related block templates-npx xds docs # reference docs (principles, tokens, theming, styling)-npx xds docs theme # theming guide (Theme, defineTheme, light/dark)-npx xds docs tokens # spacing, color, radius, typography token reference-npx xds init # initialize XDS in your project-npx xds theme build # build theme CSS for production-npx xds swizzle Button # eject component source for customization-npx xds upgrade --apply # run codemods to migrate between versions-npx xds discover # discover external XDS packages-npx xds gap-report # report a missing capability+npx astryx --help # full listing of all commands+npx astryx component Button # full docs + related block templates+npx astryx docs # reference docs (principles, tokens, theming, styling)+npx astryx docs theme # theming guide (Theme, defineTheme, light/dark)+npx astryx docs tokens # spacing, color, radius, typography token reference+npx astryx init # initialize XDS in your project+npx astryx theme build # build theme CSS for production+npx astryx swizzle Button # eject component source for customization+npx astryx upgrade --apply # run codemods to migrate between versions+npx astryx discover # discover external XDS packages+npx astryx gap-report # report a missing capability```## Related Packagesdiff --git a/packages/core/src/Collapsible/Collapsible.doc.mjs b/packages/core/src/Collapsible/Collapsible.doc.mjsindex e8cb2ca50c..fcd9833825 100644--- a/packages/core/src/Collapsible/Collapsible.doc.mjs+++ b/packages/core/src/Collapsible/Collapsible.doc.mjs@@ -67,7 +67,7 @@ export const docs = {{name: 'CollapsibleGroup'},],usage: {- description: 'Collapsible hides and reveals content behind a trigger button. Use it in settings panels, FAQ pages, or detail views to keep the page scannable while letting users drill into sections they care about. Wrap multiple collapsibles in CollapsibleGroup for accordion behavior. For custom collapsible components, use the `useCollapsible` hook directly (`xds hook useCollapsible`).',+ description: 'Collapsible hides and reveals content behind a trigger button. Use it in settings panels, FAQ pages, or detail views to keep the page scannable while letting users drill into sections they care about. Wrap multiple collapsibles in CollapsibleGroup for accordion behavior. For custom collapsible components, use the `useCollapsible` hook directly (`astryx hook useCollapsible`).',bestPractices: [{ guidance: true, description: 'Wrap each Collapsible in an Card for visual separation in accordion layouts.' },{ guidance: true, description: 'Use CollapsibleGroup with type="single" for settings or FAQ pages where only one section should be open at a time.' },diff --git a/packages/core/src/docs-types.ts b/packages/core/src/docs-types.tsindex 9fd83e819d..cf2af305fb 100644--- a/packages/core/src/docs-types.ts+++ b/packages/core/src/docs-types.ts@@ -174,7 +174,7 @@ export interface ComponentVar {* Private vars are set by the derived var expansion pipeline — theme* authors write standard CSS properties instead of setting them directly.* The CLI hides private vars from theming output.- * `xds theme build` errors if a theme sets a private var directly.+ * `astryx theme build` errors if a theme sets a private var directly.*/private?: boolean;}@@ -428,7 +428,7 @@ interface BaseDoc {/** Search keywords for CLI discovery. Terms a developer might type when* looking for this component: synonyms, related UI concepts, and common* names from other design systems (MUI, Chakra, Radix, shadcn).- * Lowercase only. Used by `xds component <term>` for fuzzy matching.+ * Lowercase only. Used by `astryx component <term>` for fuzzy matching.* e.g. `['accordion', 'expand', 'toggle', 'disclosure']` for Collapsible */keywords?: string[];/** Sub-component names to hide from human-facing UI (CLI listings,@@ -708,7 +708,7 @@ export type TokenPreviewType =/*** A section within a reference doc. Sections are the primary* organizational unit — each becomes an h2 in full output,- * and can be individually retrieved via `xds docs <topic> <section>`.+ * and can be individually retrieved via `astryx docs <topic> <section>`.*/export interface ReferenceSection {/** Section title, e.g. "Spacing Tokens", "Light/Dark Mode" */@@ -727,7 +727,7 @@ export interface ReferenceSection {* Reference docs cover topics like design tokens, principles, theming,* patterns, accessibility, and migration guides. Unlike ComponentDoc,* they aren't tied to a specific component — just drop a .doc.mjs file- * in the docs/ directory and it shows up in `xds docs`.+ * in the docs/ directory and it shows up in `astryx docs`.** Every reference .doc.mjs must export a single `docs` constant:*@@ -912,7 +912,7 @@ interface BaseTemplateDoc {/** Boolean opt-out for templates that shouldn't appear on the Templates* overview gallery. The template stays available via the CLI and- * `xds template <name>` — it's only hidden from the browsable gallery.+ * `astryx template <name>` — it's only hidden from the browsable gallery.* Use for duplicate/experimental variants. Scaffold templates are* hidden automatically and don't need this flag. */isHiddenFromOverview?: boolean;@@ -1049,8 +1049,8 @@ export interface HookDoc {/** Usage documentation — description, best practices. */usage: UsageDoc;/** Component names this hook is commonly used with.- * Enables cross-referencing: \`xds component Toast\` can mention useToast,- * and \`xds hook useToast\` can link back to Toast. */+ * Enables cross-referencing: \`astryx component Toast\` can mention useToast,+ * and \`astryx hook useToast\` can link back to Toast. */relatedComponents?: string[];/** Other hook names this hook is commonly used with. */relatedHooks?: string[];diff --git a/packages/core/src/theme/Theme.tsx b/packages/core/src/theme/Theme.tsxindex 48e8dc0694..d77acc8797 100644--- a/packages/core/src/theme/Theme.tsx+++ b/packages/core/src/theme/Theme.tsx@@ -102,7 +102,7 @@ const warnedThemes = new Set<string>();/*** Hook to inject theme CSS into the document.- * Built themes (from `xds theme build`) skip injection — their CSS+ * Built themes (from `astryx theme build`) skip injection — their CSS* is in a separate file imported by the consumer.*/function useThemeStyleInjection(theme: DefinedTheme): void {@@ -127,7 +127,7 @@ function useThemeStyleInjection(theme: DefinedTheme): void {`For better performance, use the pre-built theme:\n\n` +` import {${theme.name}Theme} from '@astryxdesign/theme-${theme.name}/built';\n` +` import '@astryxdesign/theme-${theme.name}/theme.css';\n\n` +- `For custom themes, run \`npx xds theme build <file>\` to generate ` ++ `For custom themes, run \`npx astryx theme build <file>\` to generate ` +`the built artifacts.`,);}diff --git a/packages/core/src/theme/defineTheme.ts b/packages/core/src/theme/defineTheme.tsindex d7508f6863..22e914824b 100644--- a/packages/core/src/theme/defineTheme.ts+++ b/packages/core/src/theme/defineTheme.ts@@ -5,7 +5,7 @@** Two distribution modes:* - Unbuilt: Theme generates CSS and injects a <style> tag at runtime- * - Built: `npx xds theme build` pre-compiles to a CSS file; Theme just+ * - Built: `npx astryx theme build` pre-compiles to a CSS file; Theme just* sets the data-astryx-theme attribute** Token values can be:@@ -264,7 +264,7 @@ export interface DefineThemeInput {* the theme's data-astryx-theme attribute via @scope.** Use `prop:value` keys to target specific visual props. New values- * not in the base type are automatically detected by `xds theme build`+ * not in the base type are automatically detected by `astryx theme build`* and generate TypeScript module augmentations for type-safe extensibility.** @examplediff --git a/packages/core/src/theme/generateThemeRules.ts b/packages/core/src/theme/generateThemeRules.tsindex 6797925264..163b21c5c5 100644--- a/packages/core/src/theme/generateThemeRules.ts+++ b/packages/core/src/theme/generateThemeRules.ts@@ -5,7 +5,7 @@** Shared logic for generating CSS rules from a resolved theme definition.* Used by both the runtime path (Theme injects <style>) and the build- * path (`xds theme build` pre-compiles to CSS files).+ * path (`astryx theme build` pre-compiles to CSS files).** Extracted from defineTheme.ts to reduce cyclomatic complexity and provide* a clear single-responsibility module for CSS generation.@@ -270,7 +270,7 @@ function expandContainerPadding(* Generate the intermediary CSS rules for a theme.** Returns an array of CSS rule strings — the shared format used by both- * the runtime path (useInsertionEffect) and the build path (xds theme build).+ * the runtime path (useInsertionEffect) and the build path (astryx theme build).*/export function generateThemeRules(theme: DefinedTheme): string[] {const parts: string[] = [];diff --git a/packages/core/src/theme/types.ts b/packages/core/src/theme/types.tsindex b0076c5e13..df29c63205 100644--- a/packages/core/src/theme/types.ts+++ b/packages/core/src/theme/types.ts@@ -124,7 +124,7 @@ export type BuiltinTextType =* }* ```*- * `xds theme build` generates these augmentations automatically when it+ * `astryx theme build` generates these augmentations automatically when it* detects new `type:*` values in a theme's component overrides.*/// eslint-disable-next-line @typescript-eslint/no-empty-object-typediff --git a/packages/themes/brutalist/README.md b/packages/themes/brutalist/README.mdindex b1435d8104..1d69dc30fa 100644--- a/packages/themes/brutalist/README.md+++ b/packages/themes/brutalist/README.md@@ -51,4 +51,4 @@ This is required for component-level theme overrides (colors, radii, typography)|---------|-------------|| [`@astryxdesign/core`](https://github.com/facebook/astryx/tree/main/packages/core) | Core components and theme system || [`@astryxdesign/build`](https://github.com/facebook/astryx/tree/main/packages/build) | Build plugins for StyleX source builds |-| [`@astryxdesign/cli`](https://github.com/facebook/astryx/tree/main/packages/cli) | CLI tooling including `xds docs theme` |+| [`@astryxdesign/cli`](https://github.com/facebook/astryx/tree/main/packages/cli) | CLI tooling including `astryx docs theme` |diff --git a/packages/themes/brutalist/package.json b/packages/themes/brutalist/package.jsonindex 5da88a4d39..9cde914b89 100644--- a/packages/themes/brutalist/package.json+++ b/packages/themes/brutalist/package.json@@ -46,7 +46,7 @@"src"],"scripts": {- "build": "xds theme build src/brutalistTheme.ts -o dist/theme.css && tsup && tsc --project tsconfig.build.json"+ "build": "astryx theme build src/brutalistTheme.ts -o dist/theme.css && tsup && tsc --project tsconfig.build.json"},"peerDependencies": {"@astryxdesign/core": "0.0.15"diff --git a/packages/themes/brutalist/tsup.config.ts b/packages/themes/brutalist/tsup.config.tsindex ffd51b8bfc..7b9ec1af1b 100644--- a/packages/themes/brutalist/tsup.config.ts+++ b/packages/themes/brutalist/tsup.config.ts@@ -6,6 +6,6 @@ export default defineConfig({entry: ['src/source.ts'],format: ['cjs', 'esm'],dts: false,- clean: false, // Don't clean — xds theme build already put theme files in dist/+ clean: false, // Don't clean — astryx theme build already put theme files in dist/external: ['@astryxdesign/core', 'react'],});diff --git a/packages/themes/butter/package.json b/packages/themes/butter/package.jsonindex 646594163d..f834a328de 100644--- a/packages/themes/butter/package.json+++ b/packages/themes/butter/package.json@@ -46,7 +46,7 @@"src"],"scripts": {- "build": "xds theme build src/butterTheme.ts -o dist/theme.css && tsup && tsc --project tsconfig.build.json"+ "build": "astryx theme build src/butterTheme.ts -o dist/theme.css && tsup && tsc --project tsconfig.build.json"},"dependencies": {"lucide-react": "^1.18.0"diff --git a/packages/themes/butter/tsup.config.ts b/packages/themes/butter/tsup.config.tsindex 707aa4157b..c08a781f88 100644--- a/packages/themes/butter/tsup.config.ts+++ b/packages/themes/butter/tsup.config.ts@@ -6,6 +6,6 @@ export default defineConfig({entry: ['src/source.ts', 'src/icons.tsx'],format: ['cjs', 'esm'],dts: false,- clean: false, // Don't clean — xds theme build already put theme files in dist/+ clean: false, // Don't clean — astryx theme build already put theme files in dist/external: ['@astryxdesign/core', 'react', 'lucide-react'],});diff --git a/packages/themes/chocolate/package.json b/packages/themes/chocolate/package.jsonindex b9dd1ecb6f..c2ae294707 100644--- a/packages/themes/chocolate/package.json+++ b/packages/themes/chocolate/package.json@@ -46,7 +46,7 @@"src"],"scripts": {- "build": "xds theme build src/chocolateTheme.ts -o dist/theme.css && tsup && tsc --project tsconfig.build.json"+ "build": "astryx theme build src/chocolateTheme.ts -o dist/theme.css && tsup && tsc --project tsconfig.build.json"},"dependencies": {"lucide-react": "^1.18.0"diff --git a/packages/themes/chocolate/tsup.config.ts b/packages/themes/chocolate/tsup.config.tsindex 707aa4157b..c08a781f88 100644--- a/packages/themes/chocolate/tsup.config.ts+++ b/packages/themes/chocolate/tsup.config.ts@@ -6,6 +6,6 @@ export default defineConfig({entry: ['src/source.ts', 'src/icons.tsx'],format: ['cjs', 'esm'],dts: false,- clean: false, // Don't clean — xds theme build already put theme files in dist/+ clean: false, // Don't clean — astryx theme build already put theme files in dist/external: ['@astryxdesign/core', 'react', 'lucide-react'],});diff --git a/packages/themes/daily/README.md b/packages/themes/daily/README.mdindex a2676c92f5..e464933818 100644--- a/packages/themes/daily/README.md+++ b/packages/themes/daily/README.md@@ -71,4 +71,4 @@ Without this, the theme falls back to system fonts.| ------------------------------------------------------------------------------------ | -------------------------------------- || [`@astryxdesign/core`](https://github.com/facebook/astryx/tree/main/packages/core) | Core components and theme system || [`@astryxdesign/build`](https://github.com/facebook/astryx/tree/main/packages/build) | Build plugins for StyleX source builds |-| [`@astryxdesign/cli`](https://github.com/facebook/astryx/tree/main/packages/cli) | CLI tooling including `xds docs theme` |+| [`@astryxdesign/cli`](https://github.com/facebook/astryx/tree/main/packages/cli) | CLI tooling including `astryx docs theme` |diff --git a/packages/themes/daily/package.json b/packages/themes/daily/package.jsonindex c678c70e07..ad078936c7 100644--- a/packages/themes/daily/package.json+++ b/packages/themes/daily/package.json@@ -45,7 +45,7 @@"src"],"scripts": {- "build": "xds theme build src/dailyTheme.ts -o dist/theme.css && tsup && tsc --project tsconfig.build.json"+ "build": "astryx theme build src/dailyTheme.ts -o dist/theme.css && tsup && tsc --project tsconfig.build.json"},"dependencies": {"lucide-react": "^1.18.0"diff --git a/packages/themes/daily/tsup.config.ts b/packages/themes/daily/tsup.config.tsindex 707aa4157b..c08a781f88 100644--- a/packages/themes/daily/tsup.config.ts+++ b/packages/themes/daily/tsup.config.ts@@ -6,6 +6,6 @@ export default defineConfig({entry: ['src/source.ts', 'src/icons.tsx'],format: ['cjs', 'esm'],dts: false,- clean: false, // Don't clean — xds theme build already put theme files in dist/+ clean: false, // Don't clean — astryx theme build already put theme files in dist/external: ['@astryxdesign/core', 'react', 'lucide-react'],});diff --git a/packages/themes/default/README.md b/packages/themes/default/README.mdindex 719ed2d1ca..9ac4bddcdb 100644--- a/packages/themes/default/README.md+++ b/packages/themes/default/README.md@@ -51,4 +51,4 @@ This is required for component-level theme overrides (colors, radii, typography)|---------|-------------|| [`@astryxdesign/core`](https://github.com/facebook/astryx/tree/main/packages/core) | Core components and theme system || [`@astryxdesign/build`](https://github.com/facebook/astryx/tree/main/packages/build) | Build plugins for StyleX source builds |-| [`@astryxdesign/cli`](https://github.com/facebook/astryx/tree/main/packages/cli) | CLI tooling including `xds docs theme` |+| [`@astryxdesign/cli`](https://github.com/facebook/astryx/tree/main/packages/cli) | CLI tooling including `astryx docs theme` |diff --git a/packages/themes/default/package.json b/packages/themes/default/package.jsonindex c1be6a87f7..f741a612de 100644--- a/packages/themes/default/package.json+++ b/packages/themes/default/package.json@@ -46,7 +46,7 @@"src"],"scripts": {- "build": "xds theme build src/defaultTheme.ts -o dist/theme.css && tsup && tsc --project tsconfig.build.json"+ "build": "astryx theme build src/defaultTheme.ts -o dist/theme.css && tsup && tsc --project tsconfig.build.json"},"dependencies": {"@heroicons/react": "^2.2.0"diff --git a/packages/themes/default/tsup.config.ts b/packages/themes/default/tsup.config.tsindex 697a41cc9a..e4fafe2b41 100644--- a/packages/themes/default/tsup.config.ts+++ b/packages/themes/default/tsup.config.ts@@ -6,6 +6,6 @@ export default defineConfig({entry: ['src/source.ts', 'src/icons.tsx'],format: ['cjs', 'esm'],dts: false,- clean: false, // Don't clean — xds theme build already put theme files in dist/+ clean: false, // Don't clean — astryx theme build already put theme files in dist/external: ['@astryxdesign/core', 'react', '@heroicons/react'],});diff --git a/packages/themes/gothic/package.json b/packages/themes/gothic/package.jsonindex 4f1a8463a8..10a2efc273 100644--- a/packages/themes/gothic/package.json+++ b/packages/themes/gothic/package.json@@ -46,7 +46,7 @@"src"],"scripts": {- "build": "xds theme build src/gothicTheme.ts -o dist/theme.css && tsup && tsc --project tsconfig.build.json"+ "build": "astryx theme build src/gothicTheme.ts -o dist/theme.css && tsup && tsc --project tsconfig.build.json"},"dependencies": {"lucide-react": "^1.18.0"diff --git a/packages/themes/gothic/tsup.config.ts b/packages/themes/gothic/tsup.config.tsindex 707aa4157b..c08a781f88 100644--- a/packages/themes/gothic/tsup.config.ts+++ b/packages/themes/gothic/tsup.config.ts@@ -6,6 +6,6 @@ export default defineConfig({entry: ['src/source.ts', 'src/icons.tsx'],format: ['cjs', 'esm'],dts: false,- clean: false, // Don't clean — xds theme build already put theme files in dist/+ clean: false, // Don't clean — astryx theme build already put theme files in dist/external: ['@astryxdesign/core', 'react', 'lucide-react'],});diff --git a/packages/themes/matcha/package.json b/packages/themes/matcha/package.jsonindex 29137bbf02..74f10741e2 100644--- a/packages/themes/matcha/package.json+++ b/packages/themes/matcha/package.json@@ -45,7 +45,7 @@"src"],"scripts": {- "build": "xds theme build src/matchaTheme.ts -o dist/theme.css && tsup && tsc --project tsconfig.build.json"+ "build": "astryx theme build src/matchaTheme.ts -o dist/theme.css && tsup && tsc --project tsconfig.build.json"},"dependencies": {"lucide-react": "^1.18.0"diff --git a/packages/themes/matcha/tsup.config.ts b/packages/themes/matcha/tsup.config.tsindex 707aa4157b..c08a781f88 100644--- a/packages/themes/matcha/tsup.config.ts+++ b/packages/themes/matcha/tsup.config.ts@@ -6,6 +6,6 @@ export default defineConfig({entry: ['src/source.ts', 'src/icons.tsx'],format: ['cjs', 'esm'],dts: false,- clean: false, // Don't clean — xds theme build already put theme files in dist/+ clean: false, // Don't clean — astryx theme build already put theme files in dist/external: ['@astryxdesign/core', 'react', 'lucide-react'],});diff --git a/packages/themes/neutral/README.md b/packages/themes/neutral/README.mdindex ffb3c47aca..a560bc5dd6 100644--- a/packages/themes/neutral/README.md+++ b/packages/themes/neutral/README.md@@ -49,4 +49,4 @@ This theme uses system fonts; no external font loading is required.| ------------------------------------------------------------------------------------ | -------------------------------------- || [`@astryxdesign/core`](https://github.com/facebook/astryx/tree/main/packages/core) | Core components and theme system || [`@astryxdesign/build`](https://github.com/facebook/astryx/tree/main/packages/build) | Build plugins for StyleX source builds |-| [`@astryxdesign/cli`](https://github.com/facebook/astryx/tree/main/packages/cli) | CLI tooling including `xds docs theme` |+| [`@astryxdesign/cli`](https://github.com/facebook/astryx/tree/main/packages/cli) | CLI tooling including `astryx docs theme` |diff --git a/packages/themes/neutral/package.json b/packages/themes/neutral/package.jsonindex 566c16cb19..b382ed5541 100644--- a/packages/themes/neutral/package.json+++ b/packages/themes/neutral/package.json@@ -46,7 +46,7 @@"src"],"scripts": {- "build": "xds theme build src/neutralTheme.ts -o dist/theme.css && tsup && tsc --project tsconfig.build.json"+ "build": "astryx theme build src/neutralTheme.ts -o dist/theme.css && tsup && tsc --project tsconfig.build.json"},"dependencies": {"lucide-react": "^1.18.0"diff --git a/packages/themes/neutral/tsup.config.ts b/packages/themes/neutral/tsup.config.tsindex 707aa4157b..c08a781f88 100644--- a/packages/themes/neutral/tsup.config.ts+++ b/packages/themes/neutral/tsup.config.ts@@ -6,6 +6,6 @@ export default defineConfig({entry: ['src/source.ts', 'src/icons.tsx'],format: ['cjs', 'esm'],dts: false,- clean: false, // Don't clean — xds theme build already put theme files in dist/+ clean: false, // Don't clean — astryx theme build already put theme files in dist/external: ['@astryxdesign/core', 'react', 'lucide-react'],});diff --git a/packages/themes/stone/package.json b/packages/themes/stone/package.jsonindex ebc679591d..592f72bcb9 100644--- a/packages/themes/stone/package.json+++ b/packages/themes/stone/package.json@@ -46,7 +46,7 @@"src"],"scripts": {- "build": "xds theme build src/stoneTheme.ts -o dist/theme.css && tsup && tsc --project tsconfig.build.json"+ "build": "astryx theme build src/stoneTheme.ts -o dist/theme.css && tsup && tsc --project tsconfig.build.json"},"dependencies": {"lucide-react": "^1.18.0"diff --git a/packages/themes/stone/tsup.config.ts b/packages/themes/stone/tsup.config.tsindex 707aa4157b..c08a781f88 100644--- a/packages/themes/stone/tsup.config.ts+++ b/packages/themes/stone/tsup.config.ts@@ -6,6 +6,6 @@ export default defineConfig({entry: ['src/source.ts', 'src/icons.tsx'],format: ['cjs', 'esm'],dts: false,- clean: false, // Don't clean — xds theme build already put theme files in dist/+ clean: false, // Don't clean — astryx theme build already put theme files in dist/external: ['@astryxdesign/core', 'react', 'lucide-react'],});diff --git a/packages/themes/y2k/package.json b/packages/themes/y2k/package.jsonindex 0473326ea2..221729cdd6 100644--- a/packages/themes/y2k/package.json+++ b/packages/themes/y2k/package.json@@ -46,7 +46,7 @@"src"],"scripts": {- "build": "xds theme build src/y2kTheme.ts -o dist/theme.css && tsup && tsc --project tsconfig.build.json"+ "build": "astryx theme build src/y2kTheme.ts -o dist/theme.css && tsup && tsc --project tsconfig.build.json"},"dependencies": {"lucide-react": "^1.18.0"diff --git a/scripts/package-source.js b/scripts/package-source.jsindex ca2ced330b..297fa31406 100644--- a/scripts/package-source.js+++ b/scripts/package-source.js@@ -323,7 +323,7 @@ async function main() {}// Run agents-md script- const agentsMdPath = path.join(__dirname, 'cli', 'bin', 'xds.mjs');+ const agentsMdPath = path.join(__dirname, 'cli', 'bin', 'astryx.mjs');if (fs.existsSync(agentsMdPath)) {const { execSync } = await import('node:child_process');try {