@astryxdesign/cli 0.7.16-canary.gfef050d → 0.7.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"name":"astryx","version":"0.7.16-canary.gfef050d","apiVersion":1,"description":"Design system CLI — components, themes, and tooling\n\nMaking or changing a theme? Use the experimental theme editor: astryx experimental theme editor new <name> --like neutral, then editor set / editor how \"<what you want>\"; after each change look at it with astryx experimental theme editor show <name> --png (writes PNGs, changes nothing in the app): a theme change is not done until you have looked. No app yet: astryx experimental theme preview app <dir>.","globalOptions":[{"flag":"-V, --version","description":"output the version number","type":"boolean"},{"flag":"--zh","description":"Simplified Chinese for component reads and for docs topics that have a translation (English otherwise)","type":"boolean"},{"flag":"--dense","description":"Token-efficient dense text for component <Name> and docs <topic> reads","type":"boolean"},{"flag":"--lang <locale>","description":"Language or format for component and docs reads: en (default), zh (as --zh), or dense (as --dense)","type":"enum","choices":["en","zh","dense"]},{"flag":"--detail <level>","description":"Detail level for component, hook, and docs tree reads (e.g. docs cli/commands/build), and for theme build reports. Lists default to brief; theme build prints one line per built theme unless full, which adds the install example and font recipe","type":"enum","choices":["full","compact","brief"],"default":"full"},{"flag":"--json","description":"Output as typed JSON. Success envelope: { apiVersion, type, package?, data, meta? }. Error envelope: { apiVersion, error, code, suggestions? }.","type":"boolean"}],"commands":[{"name":"blog","description":"Read the Astryx blog from the published feed","arguments":[{"name":"slug","required":false,"variadic":false,"description":""}],"options":[],"json":true,"responseTypes":["blog.list","blog.detail"],"examples":["astryx blog","astryx blog introducing-astryx --json"],"exitCodes":[{"code":0,"when":"success"},{"code":1,"when":"unknown slug, or the feed or a post cannot be fetched"}],"outsideProject":"same"},{"name":"build","description":"Build a page: the template to start from, or the workflow playbook (no query)","arguments":[{"name":"query","required":false,"variadic":false,"description":""}],"options":[{"flag":"--type <domain>","description":"Filter the kit to one domain (component|hook|doc|template|theme); doc and theme give an empty kit","type":"string"},{"flag":"--limit <n>","description":"Max candidates to draw from (default 60)","type":"string"},{"flag":"--verbose","description":"Verbose output (every block and component, full descriptions, import paths and match reason)","type":"boolean"}],"json":true,"responseTypes":["build.help","build.kit"],"examples":["astryx build","astryx build \"analytics dashboard\" --json"],"exitCodes":[{"code":0,"when":"success (including zero matches)"},{"code":1,"when":"invalid --type, a --limit that is not a positive integer, or a query when @astryxdesign/core cannot be found (the playbook needs no core)"}],"outsideProject":"same"},{"name":"component","description":"List components or print component docs","arguments":[{"name":"names","required":false,"variadic":true,"description":"One or more exact selectors. Use Name, package/Name, @scope/package/Name, or @scope/package@version/Name. Two or more return one ordered batch. At most 100 selectors are accepted."}],"options":[{"flag":"--list","description":"List every component (the same as giving no name)","type":"boolean"},{"flag":"--category <category>","description":"List one component group, e.g. --category Layout or --category Avatar (an unknown group lists the valid ones)","type":"string"},{"flag":"--props","description":"Print only the props table","type":"boolean"},{"flag":"--source","description":"Print component source code","type":"boolean"},{"flag":"--showcase","description":"Print showcase source code","type":"boolean"},{"flag":"--blocks","description":"List example blocks: showcase, examples, and related","type":"boolean"},{"flag":"--package <name>","description":"Scope lookup to an external package (e.g. @acme/xds-widgets). Use @astryxdesign/core to select an original replaced by an integration component.","type":"string"}],"json":true,"responseTypes":["component.list","component.batch","component.detail","component.detail.props","component.detail.source","component.detail.showcase","component.detail.blocks"],"examples":["astryx component --list","astryx component Button Badge Text","astryx component Button --props --json","astryx component SideNav --package @astryxdesign/core"],"exitCodes":[{"code":0,"when":"success"},{"code":1,"when":"unknown component, category, or package; more than 100 selectors; any batch row is unresolved; or @astryxdesign/core cannot be resolved"}],"outsideProject":"same"},{"name":"discover","description":"Browse and search integrations: the ones you have and the ones you could add","arguments":[{"name":"query","required":false,"variadic":false,"description":""}],"options":[{"flag":"--components","description":"In the package list, print every component, and every other item, of each package instead of the first 10 and a \"+N more\" count. No effect on --json output or on a package, component, or search query.","type":"boolean"},{"flag":"--type <kind>","description":"Only one kind: component, template, doc, theme, codemod, or agent-doc. In the list, only packages that add it; in a search, only items of that kind.","type":"string"},{"flag":"--installed","description":"Only what this project has. Cannot be set with --available.","type":"boolean"},{"flag":"--available","description":"Only what this project could add. Cannot be set with --installed.","type":"boolean"},{"flag":"--limit <n>","description":"Max number of search results, a positive integer (default 20).","type":"string"}],"json":true,"responseTypes":["discover.list","discover.detail","discover.detail.doc","discover.item","discover.search"],"examples":["astryx discover","astryx discover --components","astryx discover --type theme","astryx discover @acme/ui","astryx discover @acme/ui@2.1.0","astryx discover dashboard --type template --available"],"exitCodes":[{"code":0,"when":"success"},{"code":1,"when":"unknown package, version, component, or item; a malformed doc; an invalid --type or --limit; --installed with --available; or a blank query when packages are discovered"}],"outsideProject":"same"},{"name":"docs","description":"Print reference docs","arguments":[{"name":"topic","required":false,"variadic":false,"description":""},{"name":"section","required":false,"variadic":false,"description":""}],"options":[{"flag":"--index","description":"List the topic's sections and their keys, even for a topic with one section","type":"boolean"},{"flag":"--full","description":"Print the whole topic instead of its sections (text; `--json` returns the whole topic unless --index). Cannot be set with --index","type":"boolean"},{"flag":"--depth <levels>","description":"How many levels of the docs tree to read below a namespace: 0 for the namespace alone, 1 for its children (what a read without --depth shows), all for everything below it. On the topic list, where a namespace otherwise lists alone, it names the docs below each one by the route that opens them, one line each. With it on a namespace read, --detail sets how much of each doc below shows: brief (one line each, the default), compact (with its sections), or full; the topic list is one line per doc whatever the detail","type":"string"}],"json":true,"responseTypes":["docs.list","docs.detail","docs.index","docs.detail.section","docs.node"],"examples":["astryx docs","astryx docs theme","astryx docs spacing --json","astryx docs theme quick-start","astryx docs cli","astryx docs cli --depth all","astryx docs --depth all","astryx docs authoring --depth all --detail full","astryx docs cli/api/functions/search","astryx docs authoring/quick-start --full"],"exitCodes":[{"code":0,"when":"success"},{"code":1,"when":"unknown topic or route, a section that matches no section or more than one, or a --depth that is not a number of levels or all"}],"outsideProject":"same"},{"name":"doctor","description":"Diagnose Astryx projects and integration packages","arguments":[],"options":[{"flag":"--built <path>","description":"Also check a finished build before you deliver it: a project folder, a build output folder, or one built HTML file. Fails when it does not use Astryx at all, and warns with each raw element, icon or custom style in its source.","type":"string"}],"json":true,"responseTypes":["doctor"],"examples":["astryx doctor","astryx doctor --json","astryx doctor --built dist","astryx doctor integration validate @acme/widgets","astryx doctor integration templates @acme/widgets","astryx doctor integration components @acme/widgets","astryx doctor integration docs @acme/widgets"],"exitCodes":[{"code":0,"when":"no checks failed (warnings are allowed)"},{"code":1,"when":"one or more checks failed"}],"outsideProject":"own","subcommands":[{"name":"doctor integration","description":"Check an integration package while authoring it","arguments":[],"options":[],"json":false,"examples":["astryx doctor integration validate","astryx doctor integration templates","astryx doctor integration components","astryx doctor integration docs"],"exitCodes":[{"code":0,"when":"help is shown or the selected check has no errors"},{"code":1,"when":"the selected check reports an error"}],"subcommands":[{"name":"doctor integration components","description":"Check integration component names, replacements, and documented props","arguments":[{"name":"package","required":false,"variadic":false,"description":"Installed integration package name; omit to check the package in the current directory."}],"options":[],"json":true,"responseTypes":["integration.component-conflicts"],"examples":["astryx doctor integration components","astryx doctor integration components @acme/widgets --json"],"exitCodes":[{"code":0,"when":"the check completed; component name conflicts, replaces findings for a package without the CLI range, props that differ from the code, and links that name no doc are warnings"},{"code":1,"when":"the integration is invalid, Core cannot be resolved, or a package that declares the CLI range has an invalid replaces"}],"outsideProject":"same"},{"name":"doctor integration docs","description":"Check an integration's docs: the docs tree they add, every link, and overlaps with Core topics","arguments":[{"name":"package","required":false,"variadic":false,"description":"Installed integration package name; omit to check the package in the current directory."}],"options":[],"json":true,"responseTypes":["integration.doc-conflicts"],"examples":["astryx doctor integration docs","astryx doctor integration docs @acme/widgets --json"],"exitCodes":[{"code":0,"when":"all Core overlaps are explicitly declared or no overlap exists"},{"code":1,"when":"an overlap is accidental, a doc is invalid, a namespace or placement fails, or a reference block cannot include what it names. A link that names no doc is a warning, and does not change the exit code"}],"outsideProject":"same"},{"name":"doctor integration templates","description":"Validate integration template replacements and Core id overlaps","arguments":[{"name":"package","required":false,"variadic":false,"description":"Installed integration package name; omit to check the package in the current directory."}],"options":[],"json":true,"responseTypes":["integration.template-conflicts"],"examples":["astryx doctor integration templates","astryx doctor integration templates @acme/widgets --json"],"exitCodes":[{"code":0,"when":"replacement declarations are valid; undeclared id conflicts are warnings"},{"code":1,"when":"the integration, a template, or a replacement declaration is invalid"}],"outsideProject":"same"},{"name":"doctor integration validate","description":"Validate an integration manifest and its contributions","arguments":[{"name":"package","required":false,"variadic":false,"description":"Installed integration package name; omit to validate the package in the current directory."}],"options":[],"json":true,"responseTypes":["integration.validate"],"examples":["astryx doctor integration validate","astryx doctor integration validate @acme/widgets --json"],"exitCodes":[{"code":0,"when":"no error-severity issues (warnings, including doc type findings, are allowed)"},{"code":1,"when":"one or more error-severity issues"}],"outsideProject":"own"}]}]},{"name":"experimental","description":"[experimental] Try features that may change in a patch release: icon sets, page rendering, checked theme editing","arguments":[],"options":[],"json":false,"examples":["astryx experimental","astryx experimental icon delete","astryx experimental render page.tsx","astryx experimental theme editor set brand corners pill"],"exitCodes":[{"code":0,"when":"help is shown or a subcommand succeeds"},{"code":1,"when":"an unknown subcommand or a subcommand failure"}],"subcommands":[{"name":"experimental icon","description":"[experimental] Find an icon by meaning, or build an icon set from a library (guide: astryx docs cli/experimental/icon-sets)","arguments":[{"name":"query","required":false,"variadic":true,"description":""}],"options":[{"flag":"--list","description":"List the installed icon sets and do nothing else; a query is refused","type":"boolean"},{"flag":"--set <name>","description":"Search one set, by name or <package>/<set>; with --definitions, the set to check them against","type":"string"},{"flag":"--limit <n>","description":"Max number of matches, a positive integer (default 10)","type":"string"},{"flag":"--definitions","description":"Every Astryx icon definition, one line each: name, built in or not, how many bundled templates use it, whether the set maps it (--set, else the project's main set, else the package's only set), description, words","type":"boolean"},{"flag":"--all-icons","description":"With --set and no words: every icon of that set, one line each (id, words, definitions)","type":"boolean"}],"json":true,"responseTypes":["icon.search","icon.detail","icon.definitions","icon.setIcons","icon.list"],"examples":["astryx experimental icon delete","astryx experimental icon outline/trash","astryx experimental icon --list --json","astryx experimental icon --set outline --all-icons","astryx experimental icon arrow --set outline --limit 3"],"exitCodes":[{"code":0,"when":"success (including zero matches)"},{"code":1,"when":"no query and no --list, a query with --list, a --limit that is not a positive integer, or a set or icon that is not installed"}],"outsideProject":"same","subcommands":[{"name":"experimental icon add","description":"[experimental] Register one icon you chose from a library in your icon set","arguments":[{"name":"export","required":false,"variadic":false,"description":""}],"options":[{"flag":"--from <module>","description":"The module the icon is exported from: a package, a subpath, or a ./ path to a file inside this package","type":"string"},{"flag":"--definition <name>","description":"Map the icon to this icon definition","type":"string"},{"flag":"--new-definition <name>","description":"Add your set's own definition, named in camelCase (aiHelper) or kebab-case (ai-helper), then map the icon to it; needs --description and --words","type":"string"},{"flag":"--description <text>","description":"With --new-definition: what the icon is for","type":"string"},{"flag":"--words <list>","description":"With --new-definition: comma-separated words people search for","type":"string"},{"flag":"--default","description":"The module's default export is the icon; your set's module must re-export it under <export>","type":"boolean"},{"flag":"--variant <name>","description":"Add the export as this variant of an existing icon: one of the set's declared variants, such as solid","type":"string"},{"flag":"--all","description":"With --variant and --from, and no export: add that variant for every icon whose id the module exports, in one run","type":"boolean"},{"flag":"--id <id>","description":"The icon's id, instead of the one its name gives","type":"string"},{"flag":"--set <name>","description":"The set to edit, when the package ships several","type":"string"}],"json":true,"responseTypes":["icon.add","icon.addVariants","icon.definitionMatches"],"examples":["astryx experimental icon add Bin --from @acme/glyph-library","astryx experimental icon add Bin --from @acme/glyph-library --definition delete","astryx experimental icon add --variant solid --from @heroicons/react/24/solid --all","astryx experimental icon add Dice5 --from @acme/glyph-library --new-definition random --description 'Pick something at random.' --words dice,shuffle,chance","astryx experimental icon add Bin --from @acme/glyph-library/solid --id bin --variant solid"],"exitCodes":[{"code":0,"when":"the icon is added, already present, or the matching definitions are listed"},{"code":1,"when":"the export is missing or is data, the definition is unknown, the id is taken, or the variant is not one the set declares"}],"outsideProject":"refuse"},{"name":"experimental icon map","description":"[experimental] Register which icon of your set draws an icon definition","arguments":[{"name":"definition","required":false,"variadic":false,"description":""},{"name":"icon","required":false,"variadic":false,"description":""}],"options":[{"flag":"--set <name>","description":"The set to edit, when the package ships several","type":"string"},{"flag":"--remove","description":"Remove the definition's entry; takes no icon","type":"boolean"},{"flag":"--pairs <list>","description":"Many entries in one write: <definition>=<icon> pairs, comma-separated; checked together, all or none; an existing entry is replaced","type":"string"}],"json":true,"responseTypes":["icon.mapMany","icon.map"],"examples":["astryx experimental icon map delete trash","astryx experimental icon map --pairs close=x-mark,error=x-circle,search=magnifying-glass","astryx experimental icon map delete --remove"],"exitCodes":[{"code":0,"when":"the entry is written, removed, or already as asked"},{"code":1,"when":"the definition is unknown, the set has no such icon, or no set is found"}],"outsideProject":"refuse"},{"name":"experimental icon new-definition","description":"[experimental] Add your icon set's own icon definition","arguments":[{"name":"name","required":true,"variadic":false,"description":"The definition name, in camelCase (rocketLaunch) or kebab-case (rocket-launch)"}],"options":[{"flag":"--dry-run","description":"Validate and show planned writes without changing files","type":"boolean"},{"flag":"--set <name>","description":"The icon set to add it to, when the package ships several","type":"string"},{"flag":"--description <text>","description":"One sentence on what an icon with this definition is for","type":"string"},{"flag":"--words <list>","description":"Comma-separated words people search for","type":"string"},{"flag":"--icon <id>","description":"Also map it to this icon of the set (its `map` entry)","type":"string"}],"json":true,"responseTypes":["icon.newDefinition"],"examples":["astryx experimental icon new-definition random --description 'Pick something at random.' --words dice,shuffle,chance --icon dice-5"],"exitCodes":[{"code":0,"when":"the definition is written or the dry run succeeds"},{"code":1,"when":"the name is invalid or taken, the description or words are missing, or the set or icon is not found"}],"outsideProject":"refuse"},{"name":"experimental icon new-set","description":"[experimental] Start an icon set in your integration package","arguments":[{"name":"name","required":true,"variadic":false,"description":"The set name, in lowercase kebab-case (outline)"}],"options":[{"flag":"--dry-run","description":"Validate and show planned writes without changing files","type":"boolean"},{"flag":"--from <module>","description":"A module whose every icon component the set wraps (a package, a subpath, or a ./ path); run again to refresh","type":"string"},{"flag":"--exclude <names>","description":"With --from: comma-separated export names of the library that are not icons","type":"string"},{"flag":"--adapter <module>#<export>","description":"A function in your package that turns one icon export that is not a component (an icon data object, an SVG string) into one, as ./<path>#<export>; it is declared in the set's data file, and with --from every data export of the library becomes an icon through it","type":"string"},{"flag":"--variants <list>","description":"Comma-separated variants the set supplies, such as outline,solid","type":"string"},{"flag":"--default-variant <variant>","description":"With --variants: the variant each icon's own export draws. When omitted: in a library whose export names encode looks, the look the icons draw (the library's usual default for a new set), which --variants must list; otherwise the set's current default, which --variants must list when the set has icons, else, on a set without icons, the first variant. A set with icons changes it only with --from, and only in a library whose export names encode looks","type":"string"},{"flag":"--display-name <text>","description":"The set's display name (the name in title case when omitted)","type":"string"},{"flag":"--description <text>","description":"The set's one-line description","type":"string"}],"json":true,"responseTypes":["icon.newSet"],"examples":["astryx experimental icon new-set outline","astryx experimental icon new-set outline --from @acme/glyph-library","astryx experimental icon new-set heroicons --from @heroicons/react/24/outline --variants outline,solid --default-variant outline","astryx experimental icon new-set outline --dry-run --json"],"exitCodes":[{"code":0,"when":"the set is written or the dry run succeeds"},{"code":1,"when":"the name, options, package, or target files are invalid or conflict"}],"outsideProject":"refuse"},{"name":"experimental icon use","description":"[experimental] Choose the project's main icon set, backups, and look","arguments":[{"name":"set","required":true,"variadic":false,"description":""}],"options":[{"flag":"--backup <set...>","description":"Backup sets, by name or `<package>/<set>`, in the order a copied template tries them after the main set.","type":"string"},{"flag":"--variant <variant>","description":"The look every icon draws, such as `outline` or `filled`: one of the main set's variants. Leave it out to remove `experimental.iconVariant`, so each set draws its default look.","type":"string"}],"json":true,"responseTypes":["icon.use"],"examples":["astryx experimental icon use outline","astryx experimental icon use outline --backup @acme/brand-icons/brand","astryx experimental icon use brand --variant filled","astryx experimental icon use @acme/icons/outline"],"exitCodes":[{"code":0,"when":"experimental.iconSet (and experimental.iconVariant) is written, or already names the sets and the look"},{"code":1,"when":"a set is not installed, two packages ship it, a set is named twice, the main set declares no variant `--variant` names, the config cannot be updated (not a static object literal, or it spreads another object, which you then edit by hand), or the config is protected (a symbolic link, or marked generated, vendored, or ignored: `ERR_CODEMOD_PROTECTED`, naming the declaration)"}],"outsideProject":"refuse"}]},{"name":"experimental render","description":"[experimental] Render a page to one self-contained HTML file, or turn one back into a page","arguments":[{"name":"file","required":false,"variadic":false,"description":""}],"options":[{"flag":"--out <file>","description":"Where to write: an .html file, or with --reverse a page module (default: page.tsx gives page.html beside it; with --reverse, page.html comes back into a new folder page-restored/)","type":"string"},{"flag":"--reverse","description":"Turn a rendered HTML file back into a page module","type":"boolean"},{"flag":"--title <text>","description":"The page's title (default: its first top-level heading, else the file name)","type":"string"},{"flag":"--overwrite","description":"With --reverse, replace the page module if it already exists (never a protected file; the files it imports always go into a new folder)","type":"boolean"}],"json":true,"responseTypes":["render.page","render.reverse"],"examples":["astryx experimental render src/app/page.tsx --out page.html","astryx experimental render --reverse page.html --out page.tsx","astryx --json experimental render page.tsx"],"exitCodes":[{"code":0,"when":"the file was written (warnings included)"},{"code":1,"when":"no file, a wrong extension, a missing file, a page that does not compile, has no default export, imports a package that is not installed, reads a browser API while rendering, throws, crashes Node, or takes over 60 seconds; a file to write outside the current folder; with --reverse, an existing output without --overwrite, a damaged embedded source, or HTML that is not an Astryx page"}],"outsideProject":"same"},{"name":"experimental theme","description":"[experimental] Themes, experimental. `editor` makes and changes a theme one checked change at a time: every change is checked against what the installed Core's components really read, and a change that cannot take effect is refused. `preview` writes a page into the app that shows the theme on real pages. The group also carries experimental copies of the `astryx theme` commands (compile, the copy of theme build; list, add, remove, use, eject, template, targets), with the same functions and output. Colors come from `editor set` (accent, neutral, success, warning, danger, info, vibrancy), which generates them, so the group has no command of its own for that. Experimental: it may change or be removed in a patch release.","arguments":[],"options":[],"json":true,"responseTypes":["help"],"examples":["astryx experimental theme editor new brand --like neutral","astryx experimental theme editor set brand corners pill","astryx experimental theme editor show brand"],"exitCodes":[{"code":0,"when":"help is shown or a subcommand succeeds"},{"code":1,"when":"an unknown subcommand, a refused change, or a subcommand failure"}],"subcommands":[{"name":"experimental theme add","description":"[experimental] Add a built theme to the app. To copy a theme's source as an editable fork, run `experimental theme eject <slug> [path] [--overwrite]`.","arguments":[{"name":"slug","required":false,"variadic":false,"description":""}],"options":[{"flag":"--list","description":"List available themes","type":"boolean"},{"flag":"--import","description":"Compatibility no-op; the built theme is added with or without this flag","type":"boolean"},{"flag":"--package <package>","description":"Select the package that owns the theme","type":"string"}],"json":true,"responseTypes":["theme.app"],"examples":["astryx experimental theme add ocean","astryx experimental theme add ocean --package @acme/themes"],"exitCodes":[{"code":0,"when":"the theme is listed or added"},{"code":1,"when":"the theme, its built imports, its record, or the option combination is invalid"}],"outsideProject":"own"},{"name":"experimental theme compile","description":"[experimental] Compile standalone themes or one keyed theme family","arguments":[{"name":"files","required":true,"variadic":true,"description":""}],"options":[{"flag":"--family","description":"Build the selected extension family into one keyed CSS, JS, and declaration set, written beside the family root theme file, which must be inside the working directory to build (ERR_PATH_TRAVERSAL); --check only reads, so it compares outputs anywhere. Requires --family-key; refused with --out or --watch (ERR_THEME_INVALID)","type":"boolean"},{"flag":"--family-key <key>","description":"Lower-kebab filename stem required with --family and refused without it; must differ from every member name (ERR_THEME_INVALID)","type":"string"},{"flag":"-o, --out <path>","description":"Output CSS file path, relative or absolute; the .js and .d.ts are written beside it (default: <theme name>.css next to the source). A folder, or a path ending in /, writes <theme name>.css into it. The path should end in .css; another name still builds, with a warning. A build never replaces the theme source (ERR_THEME_INVALID). At a path --out names, it replaces its own earlier outputs, and the output of another theme source with a warning that names both sources; any other existing file fails with ERR_FILE_EXISTS and nothing is written. Into a folder the theme editor made (folder <slug>/ holds <slug>.settings.json), a source outside that folder builds there too, with a warning; to keep the editor folder to its own theme, build beside the source, or pass an --out outside it. A build writes only inside the working directory, the defaults beside the source too (ERR_PATH_TRAVERSAL); --check writes nothing, so it compares outputs anywhere and refuses only a relative path that escapes the working directory. Single theme only: refused with more than one file or with --family (ERR_THEME_INVALID)","type":"string"},{"flag":"--icons-specifier <specifier>","description":"Override the icon-registry import in the generated JS module, for example ./icons.mjs (default: the specifier in the theme source's own import). With --family it applies to every member's icon import","type":"string"},{"flag":"-w, --watch","description":"Rebuild automatically when the theme source, or a local file it imports, changes (Ctrl-C to stop). Refused with --check, --family, or --json (ERR_THEME_INVALID)","type":"boolean"},{"flag":"-c, --check","description":"Verify the committed outputs match the source without writing; exit non-zero if stale. Composes with --family and several files; refused with --watch (ERR_THEME_INVALID)","type":"boolean"}],"json":true,"responseTypes":["theme.build","theme.build.check"],"examples":["astryx experimental theme compile ./src/themes/ocean.ts --out ./dist/ocean.css","astryx experimental theme compile --family ./themes/ocean.mjs ./themes/ocean-calm.mjs --family-key ocean-family","astryx experimental theme compile ./src/themes/*.ts","astryx experimental theme compile ./src/themes/ocean.ts --check","astryx experimental theme compile ./src/themes/ocean.ts --icons-specifier ./icons.mjs"],"exitCodes":[{"code":0,"when":"the theme builds, or --check finds the outputs up to date"},{"code":1,"when":"a build or validation error (an error envelope), or --check finds stale or missing outputs (the check result, with upToDate false, the stale files and code ERR_THEME_STALE, is still printed: it is a result, not an error). One exception: an editor theme whose settings changed after its build is refused (ERR_THEME_INVALID, an error envelope) before any file is checked, with `editor show <theme>` to build it again. An editor theme run from a folder other than its app root is refused (ERR_INVALID_ARGUMENT) with the `cd` to the root and the same command; `--family` does not take an editor theme (ERR_INVALID_ARGUMENT); its damaged or unbuildable settings are refused (ERR_THEME_INVALID)"}],"outsideProject":"same"},{"name":"experimental theme editor","description":"[experimental] A type-safe compiler for themes. A theme lives in themes/<theme>/: <theme>.settings.json holds the checked settings and is owned by this command; <theme>.settings.ts is generated from it on every change; <theme>.theme.ts extends it, is written once and is yours to edit; <theme>.css and <theme>.js are built from it; build them again with `astryx experimental theme compile themes/<theme>/<theme>.theme.ts`, which checks the editor's settings first. Every build also writes the theme's app copy, src/themes/<theme>/: a standard local theme (descriptor, source, built module and stylesheets), never edited by hand, so `astryx theme add <theme>` puts the theme into the app and `theme use`, `remove` and `list` take it as they take any local theme. A folder there that is not the editor's copy is left alone, and `new` and `show` then print the import lines by hand instead (`wiring`). Every change is CHECKED against what the installed Core's components really read (derived from Core itself, version for version, and cached under node_modules/.cache/) and against the token's type; a change that cannot take effect is refused, nothing is written, and the error leads with the command that works. The thing you set is a dial (a big move with named rungs: corners, spacing, font, headings, text-size, base, mode; or a color: accent, neutral, success, warning, danger, info, each generating its light and dark shades from one color for the color tokens, and vibrancy, how saturated they are), a design token by name, or a CSS property on a part. Where it applies: --on <part|group>, --when <prop>:<value>, --state <state>, --mode light|dark, --only. Every accepted change rebuilds and writes preview.html (the sample app page); `show` adds the theme-building page with every component. PNG pictures only with --png. Commands on one theme run one after the other, through a lock in node_modules/.cache/astryx-theme/ of the project; when node_modules cannot be written (a read-only install), changes are refused and `show` still reads the last build. `how` answers everything else: what a part, group, setting or aspect does, how the colors are made, plain-words questions (with exact commands), a picture's colors, and lists of what you can set. Experimental: it may change or be removed in a patch release.","arguments":[],"options":[],"json":true,"responseTypes":["help"],"examples":["astryx experimental theme editor new brand --like neutral","astryx experimental theme editor set brand corners pill","astryx experimental theme editor how \"white text in the banner\"","astryx experimental theme editor show brand"],"exitCodes":[{"code":0,"when":"help is shown or a subcommand succeeds"},{"code":1,"when":"an unknown subcommand, a refused change, or a subcommand failure"}],"subcommands":[{"name":"experimental theme editor how","description":"[experimental] One command for every question. With nothing named, it prints its usage and examples. A part (button, card; --list parts): what it reads for each aspect (text, background, border, corners, shadow, spacing, font, size), each condition written as the --when and --state flags `set` takes or marked not settable with the reason, its variants, every state `set` accepts, the parts inside it (a token set --on the part reaches them), and its group; a part the part data does not have says so, with commands that still apply. A group (inputs, containers, checks, menus): its members and whether styling one styles all. A setting: a dial's rungs and examples, a token's type, default and the parts that read it (and, when none does, whether Core's stylesheet still uses it), or a CSS property and the parts that set it. An aspect (text, background, border, corners, shadow, spacing, font, size): the dial and the whole-theme tokens most parts read for it. `colors` (or `palette`): how the theme's colors are made: one seed per color, light and dark shades generated with the same generator as `theme palette generate`, the shade each token starts from, vibrancy, the Colors preview page and the exact-token escape hatch. A lookup takes any case, a plural, and a token name without its dashes. A question in plain words (\"bold white text in the header\", \"remove shadows from cards\", \"cards: 8px radius; buttons: 4px\"): it reads each clause for the parts (and their variant, size, state or mode), what to change, the values typed (hex, rgb(), lengths, dashed), and whether it asks for more, less or none (\"shouldn't\", \"turn off\", \"never\", \"too sharp\", \"everything except X\" included), and answers with exact commands; a typed value always wins over a color word, and a hex color with the wrong number of digits is refused by name, never replaced with a sample. \"In dark mode\" carries --mode dark to every color command; a change that cannot differ by mode, or a dark-mode ask on a light-only theme, says so instead. A question about what something is (\"what does --color-accent do\") gets the lookup. Several changes in one question come first as one sequence (`sequence: true`: run every command in order, at most 12), with repeated and overwritten steps left out; two asks that contradict each other are offered as choices. Changes come before lookups. Every suggested command names the theme (`theme`: the one named with `theme`, the only one, or the one an editor command changed last, said in `themeNote`; `themeChosenBy` says which: named, only, last-changed or none; with none, my-theme, made first), holds a real value, never a placeholder or a comment, and is checked as `set` checks it: a command `set` would refuse, or that changes nothing, is left out and listed in `refused` with the reason. A question with no answer says why in `hint`, with the next commands in `run`. A PNG picture (by any file name; other formats are refused by their bytes): its main colors from every pixel (on an even grid past 4 million), biggest share first, with where each sits, see-through pixels skipped, tRNS included (a number after the file sets how many, default 14), or with --at the exact color and alpha at pixel points; a picture over 40 million pixels (20 million at 16 bits), or with pixel data that is damaged or shorter than its header says, is refused before it is decoded. --list <what> lists what a change can name (dials, tokens, parts, groups or properties, in any case, singular or plural; kinds or no word lists those kinds), and the other words filter the list. Experimental: it may change or be removed in a patch release.","arguments":[{"name":"subject","required":false,"variadic":true,"description":""}],"options":[{"flag":"--list","description":"List what a change can name; the word that names a kind says what, wherever it is (any case, singular or plural): dials, tokens (with type, default and how many parts read each), parts (one item per name, with its components, group, variants and states), groups, or properties (the common CSS properties; a filter searches every standard one). The other words filter the list, and may start with --. --list=tokens works too. With no word, or kinds, the kinds it lists","type":"boolean"},{"flag":"--theme <name>","description":"The theme the suggested commands are for, checked against its settings (default: the only theme the editor made in the app; with several, the one an editor command changed last; with none, a theme named my-theme that the answer makes first). An empty name or --theme given twice is refused, for every subject","type":"string"},{"flag":"--at <points...>","description":"With a PNG picture: the exact color and alpha at pixel points x,y (whole numbers inside the picture), given as \"40,20;300,180\", \"40,20 300,180\", a repeated --at, or a flat \"40,20,300,180\"","type":"string"}],"json":true,"responseTypes":["themeEdit.how"],"examples":["astryx experimental theme editor how banner","astryx experimental theme editor how \"bold white text in the header\"","astryx experimental theme editor how \"remove shadows from cards\" --theme brand","astryx experimental theme editor how --color-accent","astryx experimental theme editor how target.png --at \"40,20;300,180\"","astryx experimental theme editor how colors","astryx experimental theme editor how \"make it more colorful\"","astryx experimental theme editor how --list dials","astryx experimental theme editor how accent --list tokens"],"exitCodes":[{"code":0,"when":"the usage (nothing named) or the answer (an empty answer or list included)"},{"code":1,"when":"an unknown option, an unknown or empty theme, --theme given twice, an unknown --list kind, --list given twice, --at without a picture, a picture that is not a PNG or is damaged or too big, an --at point that is not whole pixel numbers or falls outside the picture, a count beside --at, or a count that is not a positive whole number, or a missing picture; or a folder outside a project with Core installed (ERR_PROJECT_REQUIRED)"}],"outsideProject":"refuse"},{"name":"experimental theme editor new","description":"[experimental] Makes themes/<theme>/ with <theme>.settings.json (the settings this command owns), the generated <theme>.settings.ts, <theme>.theme.ts (which extends it and is yours), and the built <theme>.css and <theme>.js (build them again with `astryx experimental theme compile themes/<theme>/<theme>.theme.ts`, which checks the editor settings first), then writes preview.html, the sample app page with the theme. --like builds on a built-in theme (neutral, stone, matcha, y2k, gothic, chocolate, butter; its package must be installed); without it, or with --like none, the theme starts from Astryx defaults. Any `set` dial can be a flag too (--accent \"#7c3aed\" --font inter --corners round --vibrancy 60 ...): the same names, values and checks as `set`, all applied in the one build, with one result that lists them. Change the base later with `astryx experimental theme editor set <theme> base <theme|none>`. Afterwards, <theme>.theme.ts is yours: it extends the generated <theme>.settings.ts, and every later change rewrites only the settings files, so your own edits in <theme>.theme.ts survive. A theme name is lowercase letters, digits and dashes, starts with a letter, has 64 characters at most, and is not the name of a built-in theme or a name Windows reserves for a device (con, prn, aux, nul, com1-com9, lpt1-lpt9). Experimental: it may change or be removed in a patch release. The result ends with `wiring`: `astryx theme add <theme>` for the app copy of the theme (src/themes/<theme>/, a standard local theme every build writes), the `mode` of a one-mode theme for the `<Theme>`, and what builds it; only when a folder of yours holds src/themes/<theme>/ does it give the imports in the root file and the `<Theme>` by hand.","arguments":[{"name":"theme","required":true,"variadic":false,"description":""}],"options":[{"flag":"--like <theme>","description":"A built-in theme to build on: neutral, stone, matcha, y2k, gothic, chocolate, or butter; or none, for Astryx defaults (the same as leaving it out)","type":"string"},{"flag":"--png","description":"Also take PNG pictures of the previews (light and dark), with no dev server running: it needs a Playwright installed in the project or a Chrome or Chromium found on the machine, and adds a few seconds while the browser starts; without one, the result says how to get it. Each picture carries the editor stamp and is recorded, by name and content, in themes/<theme>/<theme>.pictures.json; a file of yours named like a picture (preview.png, sheet.png) is never written over: no picture is taken, and the result names the file","type":"boolean"},{"flag":"--corners <rung>","description":"How round corners are: square, small, medium, large, round, pill, or a size like 6px. The same value and check as `set <theme> corners`","type":"string"},{"flag":"--spacing <rung>","description":"How much room: tight, compact, medium, roomy or spacious. The same value and check as `set <theme> spacing`","type":"string"},{"flag":"--accent <color>","description":"The brand color; its light and dark shades are generated from it. The same value and check as `set <theme> accent`","type":"string"},{"flag":"--neutral <color>","description":"The gray of surfaces, text and borders; its shades are generated from it. The same value and check as `set <theme> neutral`","type":"string"},{"flag":"--success <color>","description":"The success color. The same value and check as `set <theme> success`","type":"string"},{"flag":"--warning <color>","description":"The warning color. The same value and check as `set <theme> warning`","type":"string"},{"flag":"--danger <color>","description":"The danger (error) color. The same value and check as `set <theme> danger`","type":"string"},{"flag":"--info <color>","description":"The info color. The same value and check as `set <theme> info`","type":"string"},{"flag":"--vibrancy <0-100>","description":"How saturated the generated colors are (50 is the default); needs a color. The same value and check as `set <theme> vibrancy`","type":"string"},{"flag":"--font <font>","description":"The typeface: a preset, an open font, a family name or a stack. The same value and check as `set <theme> font`","type":"string"},{"flag":"--headings <style>","description":"Heading weight (light to heavy) or tracking (tight, tighter, normal, wide). The same value and check as `set <theme> headings`","type":"string"},{"flag":"--surfaces <style>","description":"flat, outlined, raised or glass. The same value and check as `set <theme> surfaces`","type":"string"},{"flag":"--buttons <style>","description":"solid, outline, soft or caps. The same value and check as `set <theme> buttons`","type":"string"},{"flag":"--type <style>","description":"compact, standard, editorial or display. The same value and check as `set <theme> type`","type":"string"},{"flag":"--text-size <size>","description":"small, medium, large, larger, or a number. The same value and check as `set <theme> text-size`","type":"string"},{"flag":"--mode <modes>","description":"both, light-only or dark-only. The same value and check as `set <theme> mode`","type":"string"}],"json":true,"responseTypes":["themeEdit.new"],"examples":["astryx experimental theme editor new brand --like neutral","astryx experimental theme editor new brand","astryx experimental theme editor new brand --like neutral --accent \"#7c3aed\" --font inter --corners round --vibrancy 60"],"exitCodes":[{"code":0,"when":"the theme is made and built, and its preview is written; or made but not checked, when the components could not be rendered: the output starts with [warn] saved, not checked (ERR_THEME_NOT_CHECKED) and the cause"},{"code":1,"when":"a name that is not lowercase letters, digits and dashes starting with a letter (64 at most) or is the name of a built-in theme, a theme that already exists, a --like that is not a built-in theme or is not installed, a setting flag that `set` would refuse, no Core installed in the folder, or a build failure (nothing is left behind)"}],"outsideProject":"refuse"},{"name":"experimental theme editor set","description":"[experimental] Changes one thing. The thing is a dial (corners, spacing, accent, neutral, success, warning, danger, info, vibrancy, font, headings, surfaces, buttons, type, text-size, base, mode: big moves with named rungs; `more`/`less` step a rung), a design token by name (--color-background-body; `how --list tokens`), or a CSS property on a part (background --on card; needs --on). Every change is CHECKED first against the installed Core: the part, the --when variant and value, the --state, the token's type (color, size, number, font, shadow; only colors may differ by mode; a shadow is one value for both), and whether the part, or a part inside it, actually reads the token for what you mean. A change that cannot take effect is REFUSED: exit 1, an error code, nothing written, and the suggestions lead with the command that works (the token the part really reads, or the property that sets it directly). Groups: --on <group> (inputs, checks, containers, menus) styles every member; styling one member of an always-alike group (inputs, checks) styles the whole group unless --only. A setting on a part beats a whole-theme dial, and a dial never overwrites one. After building, a plain part setting that a more specific base-theme rule would beat (such as a heading level) is repeated on those variant keys, and the result says so. The result lists resolved token changes, part styles written, contrast problems this theme caused versus its base (text below 4.5:1), notes (the shade a color's main token uses, any shade moved so text reads, and the generated color files; font loading: the exact install line when the font package is missing), and writes themes/<theme>/preview.html. Values with spaces go in quotes: gradients, several shadows, font stacks. Dials: corners square|small|medium|large|round|pill|more|less|<size>; spacing tight|compact|medium|roomy|spacious|more|less; accent, neutral, success, warning, danger, info <color> (a color: the editor generates its light and dark shades from the one color, with the same generator as `theme palette generate`, and points the color tokens at them; a token moves to a nearby shade when it must read: text at 4.5:1, the focus ring at 3:1; the whole theme only, no --on or --mode; `how colors` explains it and the Colors preview page shows every shade); vibrancy 0-100|more|less (how saturated the generated colors are; 50 is the default; needs a color); font <preset, open font, family or stack>; headings light|regular|medium|semibold|bold|heavy or tight|tighter|normal|wide; surfaces flat|outlined|raised|glass; buttons solid|outline|soft|caps; type compact|standard|editorial|display; text-size small|medium|large|larger|more|less|<number of pixels, 10 to 32>; base <built-in theme>|none; mode both|light-only|dark-only. `astryx experimental theme editor how --list dials` explains each. An exact token always wins over the generated colors: `set <theme> --color-accent <color>` (with --on or --mode if you need them) is the escape hatch, whatever order the settings were made in. Experimental: it may change or be removed in a patch release.","arguments":[{"name":"theme","required":true,"variadic":false,"description":""},{"name":"thing","required":true,"variadic":false,"description":""},{"name":"value","required":false,"variadic":true,"description":""}],"options":[{"flag":"--on <where>","description":"Where it applies (default: the whole theme): a part (button, card, app-shell-header; how --list parts), a group (inputs, containers, checks, menus; how --list groups), or for font a role (body, heading, code)","type":"string"},{"flag":"--when <prop:value>","description":"Only that variant of the part, such as variant:primary or status:error (how <part> lists them); needs --on","type":"string"},{"flag":"--state <state>","description":"Only that state of the part: hover, active, focus-visible, disabled, or a state the part lists (selected...); needs --on","type":"string"},{"flag":"--mode <mode>","description":"light or dark: only that color mode. Colors only; sizes, numbers, fonts and shadows are the same in both modes, and a light-only or dark-only theme takes no --mode","type":"string"},{"flag":"--only","description":"With one member of an always-alike group (inputs, checks), style just that part instead of the whole group","type":"boolean"},{"flag":"--png","description":"Also take PNG pictures of the previews (light and dark), with no dev server running: it needs a Playwright installed in the project or a Chrome or Chromium found on the machine, and adds a few seconds while the browser starts; without one, the result says how to get it. Each picture carries the editor stamp and is recorded, by name and content, in themes/<theme>/<theme>.pictures.json; a file of yours named like a picture (preview.png, sheet.png) is never written over: no picture is taken, and the result names the file","type":"boolean"}],"json":true,"responseTypes":["themeEdit.set"],"examples":["astryx experimental theme editor set brand corners pill","astryx experimental theme editor set brand spacing more","astryx experimental theme editor set brand accent \"#7c3aed\"","astryx experimental theme editor set brand neutral \"#64748b\"","astryx experimental theme editor set brand vibrancy 70","astryx experimental theme editor set brand --color-accent \"#7c3aed\"","astryx experimental theme editor set brand --color-text-primary \"#e5e7eb\" --mode dark","astryx experimental theme editor set brand background \"linear-gradient(#f6d365, #fda085)\" --on app-shell-header","astryx experimental theme editor set brand background-color \"#f3e8ff\" --on button --when variant:ghost --state hover","astryx experimental theme editor set brand border \"1px solid #9ca3af\" --on inputs"],"exitCodes":[{"code":0,"when":"the change is written, built and previewed (notes and contrast problems included); or written but not checked, when the components could not be rendered: the output starts with [warn] saved, not checked (ERR_THEME_NOT_CHECKED) and the cause, such as two copies of React"},{"code":1,"when":"an unknown option, a refused change (an unknown part, variant, state, token or thing; a value of the wrong type; --mode on something that has no mode; a token the part never reads for that; corners on a part that shows no edge), a theme that does not exist, or a build failure, or a folder outside a project with Core installed (ERR_PROJECT_REQUIRED); nothing is written"}],"outsideProject":"refuse"},{"name":"experimental theme editor show","description":"[experimental] Lists every setting with where it applies and its source (dial, token or property), the resolved value of key tokens in each mode, the colors (the vibrancy; each color with its seed and the shade each token uses in light and dark, marked when an exact token setting wins; any shade moved so text reads), contrast problems this theme caused versus its base, font notes, and last the generated color files. Writes two self-contained HTML files: preview.html (the sample app page) and sheet.html (the theme-building page: every component grouped, each variant side by side, overlays open, and real template pages, with an auto/light/dark switch). A theme with no build is built first, and an in-app preview (`preview add`) of the theme has its route and Colors page rewritten. --section limits the sheet to one section. An own change to <theme>.theme.ts since the last build is built first, and the colors mark where it wins over a generated shade; a theme source that no longer builds, or a token in it that is not text, is refused (ERR_THEME_INVALID, exit 1) and the folder stays as it was. Experimental: it may change or be removed in a patch release. The result ends with `wiring`: `astryx theme add <theme>` for the app copy of the theme (src/themes/<theme>/, a standard local theme every build writes), the `mode` of a one-mode theme for the `<Theme>`, and what builds it; only when a folder of yours holds src/themes/<theme>/ does it give the imports in the root file and the `<Theme>` by hand.","arguments":[{"name":"theme","required":true,"variadic":false,"description":""}],"options":[{"flag":"--section <name>","description":"Only one section of the sheet: actions, inputs, selection, navigation, feedback, data, containers, overlays, or pages","type":"string"},{"flag":"--png","description":"Also take PNG pictures of the previews (light and dark), with no dev server running: it needs a Playwright installed in the project or a Chrome or Chromium found on the machine, and adds a few seconds while the browser starts; without one, the result says how to get it. Each picture carries the editor stamp and is recorded, by name and content, in themes/<theme>/<theme>.pictures.json; a file of yours named like a picture (preview.png, sheet.png) is never written over: no picture is taken, and the result names the file","type":"boolean"}],"json":true,"responseTypes":["themeEdit.show"],"examples":["astryx experimental theme editor show brand","astryx experimental theme editor show brand --png"],"exitCodes":[{"code":0,"when":"the settings are listed and both pages are written"},{"code":1,"when":"the theme does not exist or its base theme package is not installed (ERR_UNKNOWN_THEME), an unknown --section (ERR_INVALID_ARGUMENT), a theme source that does not build or parse or a token in it that is not text (ERR_THEME_INVALID), a folder where a built file goes (ERR_FILE_EXISTS), a built file that cannot be read or written (ERR_WRITE_FAILED), another command changing the theme (ERR_THEME_BUSY), a page that does not render (ERR_RENDER_FAILED), or a folder outside a project with Core installed (ERR_PROJECT_REQUIRED)"}],"outsideProject":"refuse"},{"name":"experimental theme editor undo","description":"[experimental] With only the theme, it steps back one change: the settings, the generated settings module and the build go back to how they were before the last change (your <theme>.theme.ts is not touched), and the preview is rewritten; the result names what was undone and how many earlier steps are left. When the settings file is damaged (not valid JSON), the step back restores the settings from before the last change without reading it. With a thing, it removes that one setting wherever it is in the settings, and the result says what applies now (`now`): the whole-theme setting for a part setting removed, or the base theme's value; the theme is rebuilt and previewed. Name the setting the way it was set: the same thing and the same --on, --when, --state, --mode and --only (`show` lists every setting that way). For the headings dial, name which half: weight or tracking; with no half named it removes the weight half, or the tracking half when that is the only one set. Removing a color (accent, neutral, success, warning, danger, info) stops generating it, and the tokens it fed go back to the base theme; with no color left, the generated color files the editor wrote are deleted; a palette.config.json you made, or one that holds a color of your own, stays. Removing vibrancy makes the colors again at the default, 50; removing the last color removes vibrancy too, as it needs a color. A setting the theme does not have is refused and the error lists the settings it has for that thing. `undo <theme> base` and `undo <theme> mode` go back to the base and mode the theme was made with; when they never changed, that is refused. The history keeps the last 80 steps (in <theme>.history.json); older steps are dropped. Experimental: it may change or be removed in a patch release.","arguments":[{"name":"theme","required":true,"variadic":false,"description":""},{"name":"thing","required":false,"variadic":false,"description":""},{"name":"which","required":false,"variadic":false,"description":""}],"options":[{"flag":"--on <where>","description":"Where it applies (default: the whole theme): a part (button, card, app-shell-header; how --list parts), a group (inputs, containers, checks, menus; how --list groups), or for font a role (body, heading, code)","type":"string"},{"flag":"--when <prop:value>","description":"Only that variant of the part, such as variant:primary or status:error (how <part> lists them); needs --on","type":"string"},{"flag":"--state <state>","description":"Only that state of the part: hover, active, focus-visible, disabled, or a state the part lists (selected...); needs --on","type":"string"},{"flag":"--mode <mode>","description":"light or dark: only that color mode. Colors only; sizes, numbers, fonts and shadows are the same in both modes, and a light-only or dark-only theme takes no --mode","type":"string"},{"flag":"--only","description":"With one member of an always-alike group (inputs, checks), style just that part instead of the whole group","type":"boolean"},{"flag":"--png","description":"Also take PNG pictures of the previews (light and dark), with no dev server running: it needs a Playwright installed in the project or a Chrome or Chromium found on the machine, and adds a few seconds while the browser starts; without one, the result says how to get it. Each picture carries the editor stamp and is recorded, by name and content, in themes/<theme>/<theme>.pictures.json; a file of yours named like a picture (preview.png, sheet.png) is never written over: no picture is taken, and the result names the file","type":"boolean"}],"json":true,"responseTypes":["themeEdit.undo"],"examples":["astryx experimental theme editor undo brand","astryx experimental theme editor undo brand corners","astryx experimental theme editor undo brand background --on app-shell-header"],"exitCodes":[{"code":0,"when":"the last change is undone, or the setting is removed"},{"code":1,"when":"an unknown option, there is no earlier change, the theme does not set the thing, or the theme does not exist; or a folder outside a project with Core installed (ERR_PROJECT_REQUIRED)"}],"outsideProject":"refuse"}]},{"name":"experimental theme eject","description":"[experimental] Fork a theme as editable local source","arguments":[{"name":"slug","required":true,"variadic":false,"description":""},{"name":"path","required":false,"variadic":false,"description":""}],"options":[{"flag":"-f, --overwrite","description":"Replace the existing files of an earlier fork of the same theme. Without it, an existing file fails with ERR_FILE_EXISTS and nothing is written","type":"boolean"},{"flag":"--package <package>","description":"Select the package that owns the theme","type":"string"}],"json":true,"responseTypes":["theme.eject"],"examples":["astryx experimental theme eject ocean","astryx experimental theme eject ocean src/themes/my-ocean --package @acme/themes"],"exitCodes":[{"code":0,"when":"all source and descriptor files are written"},{"code":1,"when":"the theme is unknown or ambiguous, a path escapes, a source file is missing, a destination exists, or the folder holds another theme"}],"outsideProject":"same"},{"name":"experimental theme list","description":"[experimental] List themes available to add","arguments":[],"options":[{"flag":"--package <package>","description":"Show only themes owned by this package","type":"string"}],"json":true,"responseTypes":["theme.list"],"examples":["astryx experimental theme list --json","astryx experimental theme list --package @acme/themes"],"exitCodes":[{"code":0,"when":"success"},{"code":1,"when":"a bundled or installed theme descriptor cannot be read"}],"outsideProject":"same"},{"name":"experimental theme preview","description":"[experimental] One route in the app, a normal page that keeps the app's layout, global CSS and providers: an app shell with a side nav item per preview page and a top bar with the theme name and, when it wears a theme made by `editor`, a light, dark and system switch. `add` adds pages (the default pages, the best template pages for a description, or one template) and writes the route the first time; `list` lists them; `remove` removes one, or the whole preview. With no app, `app <dir>` makes a starter app with the preview in it. Pictures of a theme are on `experimental theme editor show`. Experimental: it may change or be removed in a patch release.","arguments":[],"options":[],"json":true,"responseTypes":["help"],"examples":["astryx experimental theme preview add","astryx experimental theme preview list"],"exitCodes":[{"code":0,"when":"help is shown or a subcommand succeeds"},{"code":1,"when":"an unknown subcommand or a subcommand failure"}],"subcommands":[{"name":"experimental theme preview add","description":"[experimental] Writes the theme preview into the app: one route, a normal page of the app that keeps its layout, global CSS and providers, in an app shell with a side nav item per preview page and a top bar with the theme name and, when it wears a theme made by `editor`, a light, dark and system switch. A description (\"a sales dashboard\") asks the same page ranking `build` uses for the template pages that fit it best (--top of them, default 1), and adds each as a page, saying in `matched` what it picked and why (the words of the description it covers). App frames (the Shell templates) are left out, since the preview is an app shell already. When no page is exactly the one described, the closest is added and `matched` says the rest of the description is not on it; only a description no page relates to is refused, writing nothing and naming the closest pages to add with --template, with the other options repeated. A page the app cannot show (a missing package, or StyleX without a compiler) is skipped and the next match is taken (from the ranking, then the template search), and the result says so. A page's nav label is its template's display name, however it was added; --template names one page template instead; with neither, it adds the default pages: Overview (the theme at a glance, built to show what themes most often break: long and short text, every text level on every surface, every button variant and size with disabled and loading, inputs in their states, selected navigation, status colors, a table, open layers), Components (every component grouped, each with the command that changes it most) and, when the theme sets a color, Colors (each color's shades in light and dark, with the shade number, the hex and the tokens that use each; it reads the theme's generated colors, so it changes with every `editor set`). The route goes in theme-preview/ in the app's routes folder (app/ or src/app/), or in --path; the first add records the pages and the files it wrote in theme-preview.json beside the route, so later calls find it. With no routes folder and no --path, it refuses and names both ways on: --path, or `experimental theme preview app <dir>`, which makes a new starter app with the preview in it. The route fills the whole window with the theme, shell and edges included. Every check (the theme, the template, the ranking and every file it writes) runs before the first write, so a refusal changes nothing. A template page that imports a package the app lacks, or that uses StyleX in an app with no StyleX compiler, is not added: the result names it and the command that installs what it needs. A file the preview did not write is never replaced. The pages wear --theme (default: the only theme under themes/; with none or several, the app's own theme). The pages go in _pages/ beside the route, a folder Next never serves as a route; a preview an older release wrote into pages/ is moved there. theme-preview.json records a hash of each file the preview writes: a file changed by hand since is never replaced (the refusal names it), and a page file that already holds exactly the planned text is taken over. The files are staged and renamed into place together; when a write fails, every file is put back as it was. A damaged theme-preview.json is refused with `ERR_THEME_INVALID`, naming the file. The folder is refused when it is a file, in themes/, node_modules/ or Next's build folder (.next/, out/ or the distDir next.config names), in a Pages Router folder (pages/ or src/pages/), in a folder Next does not route (_private, @slot, [param]), or written with Windows separators, a leading ~ or white space at either end. With no --path and no preview in the default place, a preview recorded for a theme is used; with several, the refusal names each. A theme the preview wore that is gone is replaced by the app's own theme, with a note; a changed theme writes the default pages again. A template page whose package the app's package.json names but nobody installed is skipped like a missing one. Only the first 40 different words of a long description go to the ranking, with a note. The description may be several words without quotes. The project root, src/ and the routes folder itself are refused too: they hold the app. An older preview found there is named, with the remove that clears it. A recorded page whose file is gone is written again (a default page, or the template its id names), or else left out of the nav, with a note. A formatter run (white space, quotes, semicolons, commas) does not count as a change by hand. Refusals never suggest deleting files: they say what to move or rename. Preview commands in one project run one after another. The folder is also refused when it holds a package.json, when another page or route handler of the app already serves its URL (in the folder itself, a route group or the Pages Router), when next.config sets pageExtensions without tsx, when it is in src/app/ while app/ is what Next serves, and when no root layout is above it (an app with its root layout in [locale]/ gets its preview there, opened at /<locale>/theme-preview; an app with a root layout in each route group takes the preview under any of them). A template's needs come from its real import statements, never words in comments or strings; a package the app does not name gets the command that adds it. A theme with no build is built only after every check passed, holding that theme's lock, with a note. An edit inside a string counts as a change by hand; a formatter run does not. Experimental: it may change or be removed in a patch release.","arguments":[{"name":"description","required":false,"variadic":true,"description":""}],"options":[{"flag":"--theme <name>","description":"The theme the pages wear: a theme made by experimental theme editor (default: the only one under themes/; with none or several, the app's own theme)","type":"string"},{"flag":"--template <id>","description":"Add this page template (astryx template --list --type page) instead of ranking one from a description. A default page (overview, components, colors) adds just that page back when it is missing","type":"string"},{"flag":"--top <n>","description":"With a description: how many of the best-fitting page templates to add, 1 to 3 (default 1)","type":"string"},{"flag":"--path <dir>","description":"The folder of the preview route, inside the project. Default: theme-preview/ in the app's routes folder (app/ or src/app/); later commands find it there, or take the same --path","type":"string"}],"json":true,"responseTypes":["themeEdit.previewAdd"],"examples":["astryx experimental theme preview add","astryx experimental theme preview add \"a sales dashboard\" --top 2","astryx experimental theme preview add --template dashboard"],"exitCodes":[{"code":0,"when":"the pages are added"},{"code":1,"when":"outside a project, no routes folder and no --path, a --path that is no place for the preview, a file there that the preview did not write or that was changed by hand, a path outside the project, a damaged theme-preview.json, an unknown theme or template, an empty --template, no template page whose packages the app has, a bad --top, a failed write, or another preview command that did not finish within 30 seconds (ERR_THEME_BUSY)"}],"outsideProject":"refuse"},{"name":"experimental theme preview app","description":"[experimental] Writes a new starter app into <dir> (Next.js app router, Core and the neutral theme, with the Astryx packages pinned to this CLI's release; with --theme, Core and the base theme are pinned to the versions this project has, the ones the copied build was made on, with a note), with the theme preview route and its default pages (the sample app page and every component grouped) in src/app/theme-preview/. With --theme, the theme folder is copied into the app's themes/ and the pages wear it; a base theme or font package it needs is added to package.json. No install runs: it prints the install and dev commands and the page to open. <dir> must be new or empty, inside the current folder; a folder that is not empty is refused, with a free folder name to use instead. Every check runs before the first write, so a refusal changes nothing. Later pages go in with `experimental theme preview add`, run in the new app. Every open font the theme names is added to package.json, at the version this project has or a pinned range, and the route imports it; a theme with generated colors gets the Colors page too, and a one-mode theme starts the route in its mode. The app is written into a temp folder beside the folder and moved into place, so a failure leaves nothing behind. A folder holding only .git, .DS_Store or Thumbs.db counts as empty. The folder is refused when it is a file, a dangling link, inside this app's routes folder, themes/, node_modules/ or Next's build folder (.next/, out/ or the distDir next.config names), or written with Windows separators, white space at either end or a name too long. A theme whose build is missing or older than its settings is built first, with a note. The app's home page links to the preview, and its .gitignore leaves out node_modules, next-env.d.ts and *.tsbuildinfo. Inside a project with a tsconfig.json, a note says to exclude the new folder. It takes one folder; more arguments are refused. With a theme, it holds that theme's lock while it builds and copies it, so an `editor set` on the same theme waits for it. A folder given from a subfolder of the project is taken from where it was given. An app is refused in public/ (served as files at the site root) and under a name Windows does not allow; a base theme passed to --theme is named as a package theme, installed or not, with the command that adds it. Experimental: it may change or be removed in a patch release.","arguments":[{"name":"dir","required":true,"variadic":false,"description":""}],"options":[{"flag":"--theme <name>","description":"A theme made by experimental theme editor here: copied into the app, and the pages wear it (default: the app's own neutral theme)","type":"string"}],"json":true,"responseTypes":["themeEdit.previewApp"],"examples":["astryx experimental theme preview app theme-app","astryx experimental theme preview app theme-app --theme brand"],"exitCodes":[{"code":0,"when":"the app is written"},{"code":1,"when":"no <dir>, a folder that is not empty or is no place for an app, a folder outside the current one, an unknown theme, more than one folder, a failed write, or another command changing the theme that did not finish within 30 seconds (ERR_THEME_BUSY)"}],"outsideProject":"own"},{"name":"experimental theme preview list","description":"[experimental] Lists the pages of the theme preview, in nav order, with the theme they wear and the route folder. With no preview, and with no routes folder for one, it says so and how to add one (the JSON list is empty). A damaged theme-preview.json is refused with `ERR_THEME_INVALID`, naming the file. With no folder given and no preview in the default place, a preview recorded for a theme is listed; with several, the refusal names each. The tip repeats --path. `notes` says when the theme the preview wears is gone. Experimental: it may change or be removed in a patch release.","arguments":[],"options":[{"flag":"--path <dir>","description":"The folder of the preview route, when it is not in the default place","type":"string"}],"json":true,"responseTypes":["themeEdit.previewList"],"examples":["astryx experimental theme preview list"],"exitCodes":[{"code":0,"when":"the pages are listed (none included)"},{"code":1,"when":"outside a project, a damaged theme-preview.json, several recorded previews and no --path, or an argument"}],"outsideProject":"refuse"},{"name":"experimental theme preview remove","description":"[experimental] Removes one page and its nav item, and rewrites the route. With no page, or for the last page, it removes the whole preview: only the files the preview wrote (theme-preview.json lists them) are deleted, and the folder only when nothing else is in it. A path in theme-preview.json that leads outside the route folder is refused before anything is deleted. Only files the preview wrote are deleted: a page file it did not write, or one changed by hand since it wrote it (by the hash theme-preview.json records), is kept and named in `kept`, with a note; files already gone are named in `missing`, and the route and Colors page written again in `rewritten`. Every check runs before the first delete: the theme the route wears is loaded first, so a theme that does not load is refused with nothing deleted, and the refusal names the whole-preview remove, which needs no theme. A theme that is gone is replaced by the theme of the app itself, with a note. A page id matches in any case. A damaged theme-preview.json (not JSON, the wrong shape, a duplicate page, a folder or an absolute path in its files) is refused with `ERR_THEME_INVALID`, naming the file. With no folder given and no preview in the default place, a preview recorded for a theme is used. It takes one page; more arguments are refused. A whole remove stops, deleting nothing, when page.tsx was changed by hand: it imports the pages. A page whose file is gone leaves the nav, with a note. Refusals never suggest deleting files. Preview commands in one project run one after another. A remove deletes only the route file, the record and the page files of recorded pages (in _pages/, or pages/ for an older release), and only when a recorded hash shows they are as the preview wrote them: any other file the record names, and any file with no recorded hash, is kept and named, so a copied or edited record never deletes a project file. A route that stays keeps the pages it imports. Experimental: it may change or be removed in a patch release.","arguments":[{"name":"page","required":false,"variadic":false,"description":""}],"options":[{"flag":"--path <dir>","description":"The folder of the preview route, when it is not in the default place","type":"string"}],"json":true,"responseTypes":["themeEdit.previewRemove"],"examples":["astryx experimental theme preview remove components","astryx experimental theme preview remove"],"exitCodes":[{"code":0,"when":"the page or the preview is removed"},{"code":1,"when":"there is no preview, it has no such page, theme-preview.json is damaged or names a file outside the route folder, the theme the route wears does not load (ERR_THEME_INVALID, ERR_UNKNOWN_THEME, ERR_THEME_LOAD), another preview command did not finish within 30 seconds (ERR_THEME_BUSY), the route file was changed by hand, a write failed, more than one page, or outside a project"}],"outsideProject":"refuse"}]},{"name":"experimental theme remove","description":"[experimental] Remove a non-default theme from the app","arguments":[{"name":"slug","required":true,"variadic":false,"description":""}],"options":[],"json":true,"responseTypes":["theme.app"],"examples":["astryx experimental theme remove ocean"],"exitCodes":[{"code":0,"when":"the module is regenerated without the theme"},{"code":1,"when":"the theme is not added, is the default, or state is invalid"}],"outsideProject":"refuse"},{"name":"experimental theme targets","description":"[experimental] List the component theming targets a theme can override","arguments":[{"name":"filter","required":false,"variadic":false,"description":""}],"options":[],"json":true,"responseTypes":["theme.targets"],"examples":["astryx experimental theme targets","astryx experimental theme targets Switch","astryx experimental theme targets thumb","astryx --json experimental theme targets"],"exitCodes":[{"code":0,"when":"success"},{"code":1,"when":"a filter matches no target, or core cannot be resolved"}],"outsideProject":"same"},{"name":"experimental theme template","description":"[experimental] Write the annotated theme template into your project","arguments":[{"name":"path","required":false,"variadic":false,"description":""}],"options":[{"flag":"-f, --overwrite","description":"Replace an existing copy of the template or theme source file. Any other .ts file, such as util.ts, or a file the theme editor owns (named after its folder, beside its settings, such as themes/t/t.theme.ts), fails with ERR_FILE_EXISTS and is left as it was; an earlier template in that folder is replaced. A path that is not .ts, such as package.json, fails with ERR_INVALID_ARGUMENT, with or without --overwrite","type":"boolean"}],"json":true,"responseTypes":["theme.template"],"examples":["astryx experimental theme template","astryx experimental theme template src/themes/starter.ts"],"exitCodes":[{"code":0,"when":"success, including when an existing file was left untouched"},{"code":1,"when":"the target path escapes the project, is blank, a folder or not a .ts file, --overwrite names a file that is not a theme template or source, or the file cannot be written"}],"outsideProject":"same"},{"name":"experimental theme use","description":"[experimental] Choose the app default from its added themes","arguments":[{"name":"slug","required":true,"variadic":false,"description":""}],"options":[],"json":true,"responseTypes":["theme.app"],"examples":["astryx experimental theme use ocean"],"exitCodes":[{"code":0,"when":"the module is regenerated with the selected default"},{"code":1,"when":"the theme is not added or state is invalid"}],"outsideProject":"refuse"}]}]},{"name":"gap-report","description":"Report a missing component or feature to the package that owns it","arguments":[{"name":"component","required":false,"variadic":false,"description":"Component or design-system area the gap is about, up to 120 characters. Required unless --list-categories is set."}],"options":[{"flag":"--category <category>","description":"Gap category (run --list-categories for values). Required unless --list-categories is set.","type":"string"},{"flag":"--reason <reason>","description":"What capability was missing or difficult, up to 2000 characters. Required unless --list-categories is set.","type":"string"},{"flag":"--additional-context <text>","description":"Optional additional context, up to 8000 characters","type":"string"},{"flag":"--package <pkg>","description":"Package that owns the gap: @astryxdesign/core or a loaded integration. Overrides automatic routing, which picks the integration whose component replaces the named Core component, else the one package that provides it, else Core; needed when more than one package provides the component","type":"string"},{"flag":"--confirm-public","description":"Allow public delivery: public handlers run, and a GitHub issues URL gets an issue filed with your gh login","type":"boolean"},{"flag":"--to <package>","description":"Send the report only to this loaded integration's issues URL, as the person chose; the destinations the output lists are the choices","type":"string"},{"flag":"--list-categories","description":"List valid report categories, and the destinations when there is more than one, without filing; the component and the other gap-report options are refused with ERR_INVALID_ARGUMENT","type":"boolean"}],"json":true,"responseTypes":["gap-report.categories","gap-report.file"],"examples":["astryx gap-report --list-categories","astryx gap-report Button --category missing_variant --reason 'Need a compact size'","astryx gap-report Button --category missing_variant --reason 'Need a compact size' --to @acme/widgets"],"exitCodes":[{"code":0,"when":"filed, routed-only, confirmation required, skipped, or categories listed"},{"code":1,"when":"failed or partial delivery, invalid input, or ambiguous routing"}],"outsideProject":"same"},{"name":"hook","description":"List hooks or print hook docs","arguments":[{"name":"name","required":false,"variadic":false,"description":""}],"options":[{"flag":"--list","description":"List all hooks grouped by category","type":"boolean"},{"flag":"--category <category>","description":"List hooks in a specific category","type":"string"},{"flag":"--params","description":"Print only the parameters table","type":"boolean"}],"json":true,"responseTypes":["hook.list","hook.detail","hook.detail.params"],"examples":["astryx hook --list","astryx hook useFocusTrap --json"],"exitCodes":[{"code":0,"when":"success"},{"code":1,"when":"unknown hook or category, or @astryxdesign/core cannot be resolved"}],"outsideProject":"same"},{"name":"init","description":"Initialize the design system in your project","arguments":[],"options":[{"flag":"--features <list>","description":"Comma-separated features: agents (agent docs), theme (writes theme.template.ts), template (prints the page-building commands; writes no file). An unknown feature exits 1 with ERR_UNKNOWN_FEATURE. Refused with --all or --remove-agents","type":"string"},{"flag":"--all","description":"Install all features (agents, theme, template); refused with --features. Prints their guidance instead of the getting-started steps","type":"boolean"},{"flag":"--remove-agents","description":"Remove the managed block from AGENTS.md, CLAUDE.md, .claude/CLAUDE.md, GEMINI.md, .cursorrules, .hermes.md and HERMES.md, at the project root (where init writes them) and in this folder (deleting AGENTS.md or .claude/CLAUDE.md when only init's heading is left, and GEMINI.md when nothing is left) and do nothing else. Below the project root, a project-root agent file whose block resolves outside the project is left as it is, with a note. --features, --all, --agent and --agent-docs-path are refused; a file written with --agent-docs-path keeps its block","type":"boolean"},{"flag":"--user","description":"Write or refresh the computer-level agent text instead of setting up the folder: one skill file, ~/.agents/skills/astryx/SKILL.md, which most coding agents read, linked into the skill folders of agents that read only their own (~/.claude/skills always; Kiro, Windsurf, Letta, Xcode's coding assistant, and ~/.config/agents/skills when that folder exists): a folder symlink with a relative target, a junction on Windows, or a copy where neither can be made. Continue, whose scanner skips links, gets a managed copy, refreshed with the file. It tells agents anywhere on the computer that Astryx is there, when it is relevant, and to start with `astryx search`. Records the links it made in astryx/settings.json in the per-user configuration folder, so removal removes exactly those; the CLI installed for the computer refreshes the file in the background after each upgrade. Works in any folder. A file without the Astryx markers, one edited since Astryx wrote it, or a symlink, is kept as it is, and so is anything at a link target that Astryx did not create. Warns, and still writes, when no `astryx` command on the computer runs the Astryx CLI. With --remove-agents it removes the file, the links, and the copy instead and records that the text is turned off. --features, --all, --agent and --agent-docs-path are refused","type":"boolean"},{"flag":"--agent <tool>","description":"Target AI tool for agent docs: claude (CLAUDE.md or .claude/CLAUDE.md, else creates .claude/CLAUDE.md), cursor (.cursorrules if present, else AGENTS.md), codex and muse (AGENTS.md), hermes (.hermes.md or HERMES.md if present, else AGENTS.md), all (every existing agent doc except GEMINI.md, which keeps its one-line import of AGENTS.md, else AGENTS.md and .claude/CLAUDE.md). With claude and all, when CLAUDE.md gets the block, .claude/CLAUDE.md gets none and a block already there is removed, unless the project ignores CLAUDE.md: then a .claude/CLAUDE.md the project commits gets a copy too, with claude and all alike. An unknown tool exits 1 with ERR_UNKNOWN_AGENT. Used only when agent docs are installed (the default, --all, or --features agents); --agent-docs-path takes precedence.","type":"string"},{"flag":"--agent-docs-path <path...>","description":"Explicit file path(s) for agent docs, inside the project; takes precedence over --agent. If any path is outside the project, no agent docs are written and the command exits 1. A path in the home folder itself, or in a settings folder in it outside a project (such as ~/.claude or ~/.claude/hooks), is refused with a note (exit 0), and nothing is written. Used only when agent docs are installed","type":"string"}],"json":true,"responseTypes":["init.run","init.remove","init.user"],"examples":["astryx init","astryx init --all","astryx init --json","astryx init --user","astryx init --user --remove-agents"],"exitCodes":[{"code":0,"when":"success, including agent docs left unwritten in five soft cases, each reported as docsError with one note: running in the home folder, or in a settings folder in it outside a project; a GEMINI.md that resolves outside the project; when init runs below the project root, a project-root agent file that resolves outside the project; the project's Claude Code file (root CLAUDE.md, or .claude/CLAUDE.md when there is no root one) when it resolves outside the project and is a block-less import of an existing AGENTS.md, which 0.7.1 left alone; and a .claude/CLAUDE.md that resolves outside the project and that 0.7.1 did not write: beside a CLAUDE.md the project ignores, the one --agent claude adds or a block-less import of an existing AGENTS.md; with --agent claude beside a CLAUDE.md, one whose block it would remove"},{"code":1,"when":"an unknown --agent (ERR_UNKNOWN_AGENT) or feature, an --agent-docs-path outside the project, --remove-agents combined with install options, --user combined with --features, --all, --agent or --agent-docs-path, or --all with --features (ERR_INVALID_ARGUMENT); or, when init runs at the project root, an agent file 0.7.1 also wrote there that resolves outside the project (ERR_PATH_TRAVERSAL, docsError path-safety, nothing written)"}],"outsideProject":"own"},{"name":"integration","description":"Author and verify an Astryx integration package","arguments":[],"options":[],"json":false,"examples":["astryx integration add component AcmeWidget","astryx integration check --strict","astryx integration verify"],"exitCodes":[{"code":0,"when":"help is shown or a subcommand succeeds"},{"code":1,"when":"an unknown subcommand is provided"}],"subcommands":[{"name":"integration add","description":"Add one working contribution to an integration package","arguments":[{"name":"kind","required":true,"variadic":false,"description":"component, doc, template, codemod, agent-doc, or theme"},{"name":"name","required":true,"variadic":false,"description":"Contribution name: PascalCase for component (AcmeWidget); lowercase kebab-case for template, codemod, and theme (account-card); letters, digits, _ and - for doc; the literal guidance line for agent-doc"}],"options":[{"flag":"--dry-run","description":"Validate and show planned writes without changing files","type":"boolean"},{"flag":"--type <type>","description":"Template type: page (default) or block; only valid for template","type":"string"},{"flag":"--replaces <topic>","description":"Existing doc topic this one replaces (letters, digits, _ and -); only valid for doc and not with --extends","type":"string"},{"flag":"--extends <topic>","description":"Existing doc topic this one extends (letters, digits, _ and -); only valid for doc and not with --replaces","type":"string"},{"flag":"--parent <namespace>","description":"Namespace of this package to place the doc in, as a guide in its `guides` slot; writes the namespace doc when it is missing, and declares the CLI that reads it as an optional `@astryxdesign/cli` peer. Only valid for doc, and not with --replaces or --extends","type":"string"},{"flag":"--from <theme>","description":"Existing theme slug to fork as a starting point instead of a blank scaffold; the new theme copies the base and has no link back, and package.json `dependencies` gains the npm packages the copied files import (other than Core and React). Only valid for theme","type":"string"},{"flag":"--to <version>","description":"Exact semver of the @astryxdesign/core version whose upgrade runs the codemod (e.g. 0.7.0); required for codemod and only valid there","type":"string"}],"json":true,"responseTypes":["integration.add"],"examples":["astryx integration add component AcmeWidget --dry-run --json","astryx integration add component AcmeWidget","astryx integration add doc deploying","astryx integration add template acme-dashboard","astryx integration add template account-card --type block","astryx integration add doc acme-getting-started --replaces getting-started","astryx integration add doc acme-theming --extends theme","astryx integration add doc releasing --parent acme","astryx integration add codemod rename-widget --to 1.2.0","astryx integration add agent-doc 'Run acme verify before finishing.'","astryx integration add theme ocean","astryx integration add theme ocean --from neutral"],"exitCodes":[{"code":0,"when":"the contribution is written or the dry run succeeds"},{"code":1,"when":"the kind, name, options, package, or target files are invalid or conflict"}],"outsideProject":"refuse"},{"name":"integration check","description":"The CI check for an integration package's own build: every source check, run in continuous integration or a typecheck script, against the package in the current folder","arguments":[],"options":[{"flag":"--strict","description":"Also exit 1 on any warning and on any check that did not run. A new check or failure code joins only in a minor release, named in the release notes; until then, a malformed `cliCommand` is reported as a note (`invalid_cli_command`) that fails nothing.","type":"boolean"},{"flag":"--next","description":"Also count the findings the next minor release turns into warnings (the notes marked `next`) as warnings now, so `--strict --next` fails on them. Run it to fix them ahead of the release; every run says how many there are.","type":"boolean"}],"json":true,"responseTypes":["integration.check"],"examples":["integration check --strict","integration check","integration check --strict --next","integration check --strict --json","integration verify"],"exitCodes":[{"code":0,"when":"no check fails on its own; with --strict, also no warning, and every check ran"},{"code":1,"when":"a check fails on its own (an error); with --strict, also any warning, or a check that did not run"}],"outsideProject":"own"},{"name":"integration pack","description":"Deprecated: the old name of `integration verify`","arguments":[],"options":[{"flag":"--check","description":"Run the check. Required, as before.","type":"boolean"}],"json":true,"responseTypes":["integration.pack-check"],"examples":["astryx integration pack --check"],"exitCodes":[{"code":0,"when":"the packed package exposes the same valid contributions"},{"code":1,"when":"--check is omitted or the tarball is incomplete or invalid"}],"outsideProject":"own"},{"name":"integration verify","description":"Check the package the way npm will publish it, before you publish","arguments":[],"options":[],"json":true,"responseTypes":["integration.pack-check"],"examples":["astryx integration verify","astryx integration verify --json"],"exitCodes":[{"code":0,"when":"the packed package exposes the same valid contributions"},{"code":1,"when":"the tarball is incomplete or invalid"}],"outsideProject":"own"}]},{"name":"manifest","description":"Print the full CLI capability manifest (use with --json)","arguments":[],"options":[],"json":true,"responseTypes":["manifest"],"examples":["astryx manifest --json","astryx --json"],"exitCodes":[{"code":0,"when":"success"},{"code":1,"when":"the manifest cannot be generated"}],"outsideProject":"same"},{"name":"search","description":"Search components, hooks, docs, templates, and themes in one ranked list","arguments":[{"name":"query","required":true,"variadic":true,"description":""}],"options":[{"flag":"--type <domain>","description":"Filter to one domain (component|hook|doc|template|theme)","type":"string"},{"flag":"--limit <n>","description":"Max number of results, a positive integer (default 20)","type":"string"},{"flag":"--verbose","description":"Also print each result's score and match reason","type":"boolean"}],"json":true,"responseTypes":["search"],"examples":["astryx search button","astryx search dark mode --type doc","astryx search \"data table\" --type template --json","astryx search warm --type theme"],"exitCodes":[{"code":0,"when":"success (including zero matches)"},{"code":1,"when":"invalid --type, a --limit that is not a positive integer, or --type component, hook, or template where @astryxdesign/core cannot be found"}],"outsideProject":"same"},{"name":"swizzle","description":"Copy component source for customization","arguments":[{"name":"component","required":false,"variadic":false,"description":""}],"options":[{"flag":"--output <dir>","description":"Output directory","type":"string","default":"./components/astryx"},{"flag":"--package <pkg>","description":"Scope to a specific owning package. Use @astryxdesign/core to copy an original replaced by an integration component","type":"string"},{"flag":"--list","description":"List the swizzlable Core components, including any that an integration component replaces","type":"boolean"},{"flag":"-f, --overwrite","description":"Replace the component's existing files. Without it, existing files fail the command with ERR_FILE_EXISTS and nothing is written. A helper an earlier swizzle wrote is reused when it is the same and is never replaced by a copy that carries it: a different one stays, and this copy writes its own under a version-suffixed name. Swizzling the component whose folder holds that helper counts it as one of that component's own files. A changed private attribute owner module, or a style module it imports, fails the command without --overwrite and is replaced with it","type":"boolean"}],"json":true,"responseTypes":["swizzle.list","swizzle.copy"],"examples":["astryx swizzle --list","astryx swizzle Button","astryx swizzle SideNav --package @astryxdesign/core"],"exitCodes":[{"code":0,"when":"success"},{"code":1,"when":"unknown or ambiguous component, no source on disk, a path escape, or existing files without --overwrite"}],"outsideProject":"refuse"},{"name":"template","description":"List, show, or scaffold page and block templates","arguments":[{"name":"name","required":false,"variadic":false,"description":"Template id (see --list). Omit it to list the templates."},{"name":"path","required":false,"variadic":false,"description":"Where to scaffold the template, relative to the project root. A path that ends in .tsx, .ts, .jsx, .js, .mjs, .cjs, .css, .scss, .json, .md or .html is the file to write; any other path is a directory, which receives page.tsx for a page template or the block's own file name for a block. Omit it to print the source."}],"options":[{"flag":"--list","description":"List available templates (narrow with --type and --package) and do nothing else: <name>, <path>, --skeleton and --overwrite are refused","type":"boolean"},{"flag":"--type <type>","description":"Filter by template type: page or block","type":"string"},{"flag":"--package <pkg>","description":"Narrow to templates from a specific package. Use @astryxdesign/core to select an original hidden by an integration replacement.","type":"string"},{"flag":"--skeleton","description":"Show layout skeleton with spatial annotations (padding, gap, nesting) instead of the source. Needs <name>. It writes nothing, so <path> and --overwrite are refused with ERR_INVALID_ARGUMENT","type":"boolean"},{"flag":"--cdn [path]","description":"Write the no-build-step CDN starter page and do nothing else: <name>, --list, --skeleton, --type and --package are refused. The page goes to the --cdn value, else to <path>, else cdn.template.html, and that path is always the file itself. A value right after --cdn (anything not starting with -) is taken as that path","type":"string"},{"flag":"-f, --overwrite","description":"Replace an existing target file. Without it an existing file is refused (ERR_FILE_EXISTS) and an existing CDN page is left as is","type":"boolean"}],"json":true,"responseTypes":["template.list","template.show","template.skeleton","template.copy","template.cdn"],"examples":["astryx template --json","astryx --json template --list --package @astryxdesign/core","astryx template dashboard ./src/app","astryx template shell-side-nav ./src/app --package @astryxdesign/core","astryx template --cdn","astryx template --cdn public/demo.html"],"exitCodes":[{"code":0,"when":"success, including a CDN page left untouched because it already exists"},{"code":1,"when":"unknown or ambiguous template, no source, a path escape, an existing target without --overwrite, or --list with a type outside page or block or a package that provides no templates"}],"outsideProject":"same"},{"name":"theme","description":"Add, switch, build, and author themes (to make or change one, use experimental theme editor)","arguments":[],"options":[],"json":false,"examples":["astryx experimental theme editor new brand --like neutral","astryx theme list","astryx theme add ocean","astryx theme use ocean","astryx theme eject ocean","astryx theme palette generate palette.config.json","astryx theme targets"],"exitCodes":[{"code":0,"when":"help is shown or a subcommand succeeds"},{"code":1,"when":"an unknown subcommand or a subcommand failure"}],"subcommands":[{"name":"theme add","description":"Add a built theme to the app. To copy a theme's source as an editable fork, run `theme eject <slug> [path] [--overwrite]`.","arguments":[{"name":"slug","required":false,"variadic":false,"description":""}],"options":[{"flag":"--list","description":"List available themes","type":"boolean"},{"flag":"--import","description":"Compatibility no-op; the built theme is added with or without this flag","type":"boolean"},{"flag":"--package <package>","description":"Select the package that owns the theme","type":"string"}],"json":true,"responseTypes":["theme.app","theme.list"],"examples":["astryx theme add ocean","astryx theme add ocean --package @acme/themes"],"exitCodes":[{"code":0,"when":"the theme is listed or added"},{"code":1,"when":"the theme, its built imports, its record, or the option combination is invalid"}],"outsideProject":"own"},{"name":"theme build","description":"Compile standalone themes or one keyed theme family","arguments":[{"name":"files","required":true,"variadic":true,"description":""}],"options":[{"flag":"--family","description":"Build the selected extension family into one keyed CSS, JS, and declaration set, written beside the family root theme file, which must be inside the working directory to build (ERR_PATH_TRAVERSAL); --check only reads, so it compares outputs anywhere. Requires --family-key; refused with --out or --watch (ERR_THEME_INVALID)","type":"boolean"},{"flag":"--family-key <key>","description":"Lower-kebab filename stem required with --family and refused without it; must differ from every member name (ERR_THEME_INVALID)","type":"string"},{"flag":"-o, --out <path>","description":"Output CSS file path, relative or absolute; the .js and .d.ts are written beside it (default: <theme name>.css next to the source). A folder, or a path ending in /, writes <theme name>.css into it. The path should end in .css; another name still builds, with a warning. A build never replaces the theme source (ERR_THEME_INVALID). At a path --out names, it replaces its own earlier outputs, and the output of another theme source with a warning that names both sources; any other existing file fails with ERR_FILE_EXISTS and nothing is written. Into a folder the theme editor made (folder <slug>/ holds <slug>.settings.json), a source outside that folder builds there too, with a warning; to keep the editor folder to its own theme, build beside the source, or pass an --out outside it. A build writes only inside the working directory, the defaults beside the source too (ERR_PATH_TRAVERSAL); --check writes nothing, so it compares outputs anywhere and refuses only a relative path that escapes the working directory. Single theme only: refused with more than one file or with --family (ERR_THEME_INVALID)","type":"string"},{"flag":"--icons-specifier <specifier>","description":"Override the icon-registry import in the generated JS module, for example ./icons.mjs (default: the specifier in the theme source's own import). With --family it applies to every member's icon import","type":"string"},{"flag":"-w, --watch","description":"Rebuild automatically when the theme source, or a local file it imports, changes (Ctrl-C to stop). Refused with --check, --family, or --json (ERR_THEME_INVALID)","type":"boolean"},{"flag":"-c, --check","description":"Verify the committed outputs match the source without writing; exit non-zero if stale. Composes with --family and several files; refused with --watch (ERR_THEME_INVALID)","type":"boolean"}],"json":true,"responseTypes":["theme.build","theme.build.check","theme.build.batch"],"examples":["astryx theme build ./src/themes/ocean.ts --out ./dist/ocean.css","astryx theme build --family ./themes/ocean.mjs ./themes/ocean-calm.mjs --family-key ocean-family","astryx theme build ./src/themes/*.ts","astryx theme build ./src/themes/ocean.ts --check","astryx theme build ./src/themes/ocean.ts --icons-specifier ./icons.mjs"],"exitCodes":[{"code":0,"when":"the theme builds, or --check finds the outputs up to date"},{"code":1,"when":"a build or validation error (an error envelope), or --check finds stale or missing outputs (the check result, with upToDate false, the stale files and code ERR_THEME_STALE)"}],"outsideProject":"same"},{"name":"theme eject","description":"Fork a theme as editable local source","arguments":[{"name":"slug","required":true,"variadic":false,"description":""},{"name":"path","required":false,"variadic":false,"description":""}],"options":[{"flag":"-f, --overwrite","description":"Replace the existing files of an earlier fork of the same theme. Without it, an existing file fails with ERR_FILE_EXISTS and nothing is written","type":"boolean"},{"flag":"--package <package>","description":"Select the package that owns the theme","type":"string"}],"json":true,"responseTypes":["theme.eject"],"examples":["astryx theme eject ocean","astryx theme eject ocean src/themes/my-ocean --package @acme/themes"],"exitCodes":[{"code":0,"when":"all source and descriptor files are written"},{"code":1,"when":"the theme is unknown or ambiguous, a path escapes, a source file is missing, a destination exists, or the folder holds another theme"}],"outsideProject":"same"},{"name":"theme list","description":"List themes available to add","arguments":[],"options":[{"flag":"--package <package>","description":"Show only themes owned by this package","type":"string"}],"json":true,"responseTypes":["theme.list"],"examples":["astryx theme list --json","astryx theme list --package @acme/themes"],"exitCodes":[{"code":0,"when":"success"},{"code":1,"when":"a bundled or installed theme descriptor cannot be read, or the generated theme module exists and its record cannot be read"}],"outsideProject":"same"},{"name":"theme palette","description":"Create and work with theme-owned color palettes","arguments":[],"options":[],"json":false,"examples":["astryx theme palette generate palette.config.json"],"exitCodes":[{"code":0,"when":"help is shown or a subcommand succeeds"},{"code":1,"when":"an unknown subcommand is provided"}],"subcommands":[{"name":"theme palette generate","description":"Generate an OKLCH palette candidate for human review","arguments":[{"name":"config","required":true,"variadic":false,"description":""}],"options":[{"flag":"-o, --out <path>","description":"Write a candidate TypeScript or JSON file and a sibling receipt","type":"string"},{"flag":"--preview <path>","description":"Write a self-contained HTML preview page; the path must end in .html","type":"string"},{"flag":"-f, --overwrite","description":"Replace existing candidate, receipt, and preview files. Without it, if any of them exists, nothing is written","type":"boolean"}],"json":true,"responseTypes":["theme.palette.generate"],"examples":["astryx theme palette generate themes/ocean/palette.config.json","astryx theme palette generate themes/ocean/palette.config.json --out themes/ocean/tokens/ocean.palette.ts","astryx theme palette generate themes/ocean/palette.config.json --out themes/ocean/tokens/ocean.palette.ts --preview themes/ocean/tokens/ocean.palette.html"],"exitCodes":[{"code":0,"when":"a candidate is produced or existing output is left untouched"},{"code":1,"when":"the request is invalid or output cannot be written safely"}],"outsideProject":"same"}]},{"name":"theme remove","description":"Remove a non-default theme from the app","arguments":[{"name":"slug","required":true,"variadic":false,"description":""}],"options":[],"json":true,"responseTypes":["theme.app"],"examples":["astryx theme remove ocean"],"exitCodes":[{"code":0,"when":"the module is regenerated without the theme"},{"code":1,"when":"the theme is not added, is the default, or state is invalid"}],"outsideProject":"refuse"},{"name":"theme targets","description":"List the component theming targets a theme can override","arguments":[{"name":"filter","required":false,"variadic":false,"description":""}],"options":[],"json":true,"responseTypes":["theme.targets"],"examples":["astryx theme targets","astryx theme targets Switch","astryx theme targets thumb","astryx --json theme targets"],"exitCodes":[{"code":0,"when":"success"},{"code":1,"when":"a filter matches no target, or core cannot be resolved"}],"outsideProject":"same"},{"name":"theme template","description":"Write the annotated theme template into your project","arguments":[{"name":"path","required":false,"variadic":false,"description":""}],"options":[{"flag":"-f, --overwrite","description":"Replace an existing copy of the template or theme source file. Any other .ts file, such as util.ts, or a file in a folder the theme editor made, fails with ERR_FILE_EXISTS and is left as it was. A path that is not .ts, such as package.json, fails with ERR_INVALID_ARGUMENT, with or without --overwrite","type":"boolean"}],"json":true,"responseTypes":["theme.template"],"examples":["astryx theme template","astryx theme template src/themes/starter.ts"],"exitCodes":[{"code":0,"when":"success, including when an existing file was left untouched"},{"code":1,"when":"the target path escapes the project, is blank, a folder or not a .ts file, --overwrite names a file that is not a theme template or source, or the file cannot be written"}],"outsideProject":"same"},{"name":"theme use","description":"Choose the app default from its added themes","arguments":[{"name":"slug","required":true,"variadic":false,"description":""}],"options":[],"json":true,"responseTypes":["theme.app"],"examples":["astryx theme use ocean"],"exitCodes":[{"code":0,"when":"the module is regenerated with the selected default"},{"code":1,"when":"the theme is not added or state is invalid"}],"outsideProject":"refuse"}]},{"name":"upgrade","description":"Update your code after upgrading Astryx, and refresh ShadCN-copied components","arguments":[],"options":[{"flag":"--from <version>","description":"Previous version before the dependency upgrade; required unless --list or --registry is set. The target is the installed @astryxdesign/core version, or legacy @xds/core when @astryxdesign/core is not installed","type":"string"},{"flag":"--apply","description":"Write changes to disk; without it, the run is a dry run","type":"boolean","default":false},{"flag":"--force","description":"Run codemods even if --from is newer than the installed version","type":"boolean","default":false},{"flag":"--codemod <name>","description":"Run only the named codemod. Optional codemods run only when named here; a normal run skips them. Also skips the check of ShadCN-copied compositions. An unknown name exits 1 with ERR_UNKNOWN_CODEMOD when the version range has codemods","type":"string"},{"flag":"--skip-codemod <name...>","description":"Exclude named codemods (repeatable). Re-run past a failed codemod by skipping it.","type":"string"},{"flag":"--integration <package>","description":"Explicit integration specifier (repeatable). Resolved beneath node_modules; absolute paths and `.` or `..` segments are rejected.","type":"string","default":[]},{"flag":"--path <dir>","description":"Source directory to scan, relative to where you run the command, however you spell it. Without --path, the project's src folder, from any folder in the project","type":"string","default":"./src at the project root"},{"flag":"--install-deps","description":"Install jscodeshift when it is missing. Without it, a missing jscodeshift fails the command with ERR_DEP_MISSING","type":"boolean","default":false},{"flag":"--registry","description":"Only update ShadCN-copied compositions from their install receipts: unchanged files are updated, edits that do not overlap are merged, and conflicts are left untouched; --from is not required. Combining it with --list, --from, --force, --codemod, --skip-codemod, --integration or --install-deps exits 1 with ERR_INVALID_ARGUMENT","type":"boolean","default":false},{"flag":"--list","description":"List available codemods and do nothing else. Every other flag is refused, as is --registry (exit 1)","type":"boolean","default":false}],"json":true,"responseTypes":["upgrade.list","upgrade.registry","upgrade.status","upgrade.run"],"examples":["astryx upgrade --list --json","astryx upgrade --registry --apply","astryx upgrade --from 0.1.0 --apply"],"exitCodes":[{"code":0,"when":"success, including complete dry-run previews and runs whose only findings are manual migrations"},{"code":1,"when":"missing or invalid --from, --registry with --list or a migration flag, a --path escape, no installed @astryxdesign/core (or legacy @xds/core), jscodeshift missing and not installed by --install-deps, an astryx.config that fails validation and that no pending config codemod repairs, an unreadable or invalid protection declaration, a protected file that still requires a codemod change, a generated file that must be regenerated, an unknown codemod, a codemod or post-codemod hook failure, or unresolved registry items"}],"outsideProject":"own"}],"jsonSupported":["blog","build","component","discover","docs","doctor","doctor integration components","doctor integration docs","doctor integration templates","doctor integration validate","experimental icon","experimental icon add","experimental icon map","experimental icon new-definition","experimental icon new-set","experimental icon use","experimental render","experimental theme","experimental theme add","experimental theme compile","experimental theme editor","experimental theme editor how","experimental theme editor new","experimental theme editor set","experimental theme editor show","experimental theme editor undo","experimental theme eject","experimental theme list","experimental theme preview","experimental theme preview add","experimental theme preview app","experimental theme preview list","experimental theme preview remove","experimental theme remove","experimental theme targets","experimental theme template","experimental theme use","gap-report","hook","init","integration add","integration check","integration pack","integration verify","manifest","search","swizzle","template","theme add","theme build","theme eject","theme list","theme palette generate","theme remove","theme targets","theme template","theme use","upgrade"],"globalMode":{"docs":"astryx docs global","summary":"In a folder that belongs to a project, the project's own CLI answers: this copy hands the run to it. In a project with no CLI of its own, and outside any project, this copy answers. A copy installed for the computer checks the registry for a newer release once a day in the background, and keeps one agent skill file in the home folder."},"responseTypes":{"blog":["blog.list","blog.detail"],"build":["build.help","build.kit"],"component":["component.list","component.batch","component.detail","component.detail.props","component.detail.source","component.detail.showcase","component.detail.blocks"],"discover":["discover.list","discover.detail","discover.detail.doc","discover.item","discover.search"],"docs":["docs.list","docs.detail","docs.index","docs.detail.section","docs.node"],"doctor":["doctor"],"doctor integration components":["integration.component-conflicts"],"doctor integration docs":["integration.doc-conflicts"],"doctor integration templates":["integration.template-conflicts"],"doctor integration validate":["integration.validate"],"experimental icon":["icon.search","icon.detail","icon.definitions","icon.setIcons","icon.list"],"experimental icon add":["icon.add","icon.addVariants","icon.definitionMatches"],"experimental icon map":["icon.mapMany","icon.map"],"experimental icon new-definition":["icon.newDefinition"],"experimental icon new-set":["icon.newSet"],"experimental icon use":["icon.use"],"experimental render":["render.page","render.reverse"],"experimental theme":["help"],"experimental theme add":["theme.app"],"experimental theme compile":["theme.build","theme.build.check"],"experimental theme editor":["help"],"experimental theme editor how":["themeEdit.how"],"experimental theme editor new":["themeEdit.new"],"experimental theme editor set":["themeEdit.set"],"experimental theme editor show":["themeEdit.show"],"experimental theme editor undo":["themeEdit.undo"],"experimental theme eject":["theme.eject"],"experimental theme list":["theme.list"],"experimental theme preview":["help"],"experimental theme preview add":["themeEdit.previewAdd"],"experimental theme preview app":["themeEdit.previewApp"],"experimental theme preview list":["themeEdit.previewList"],"experimental theme preview remove":["themeEdit.previewRemove"],"experimental theme remove":["theme.app"],"experimental theme targets":["theme.targets"],"experimental theme template":["theme.template"],"experimental theme use":["theme.app"],"gap-report":["gap-report.categories","gap-report.file"],"hook":["hook.list","hook.detail","hook.detail.params"],"init":["init.run","init.remove","init.user"],"integration add":["integration.add"],"integration check":["integration.check"],"integration pack":["integration.pack-check"],"integration verify":["integration.pack-check"],"manifest":["manifest"],"search":["search"],"swizzle":["swizzle.list","swizzle.copy"],"template":["template.list","template.show","template.skeleton","template.copy","template.cdn"],"theme add":["theme.app","theme.list"],"theme build":["theme.build","theme.build.check","theme.build.batch"],"theme eject":["theme.eject"],"theme list":["theme.list"],"theme palette generate":["theme.palette.generate"],"theme remove":["theme.app"],"theme targets":["theme.targets"],"theme template":["theme.template"],"theme use":["theme.app"],"upgrade":["upgrade.list","upgrade.registry","upgrade.status","upgrade.run"]}}
1
+ {"name":"astryx","version":"0.7.16","apiVersion":1,"description":"Design system CLI — components, themes, and tooling\n\nMaking or changing a theme? Use the experimental theme editor: astryx experimental theme editor new <name> --like neutral, then editor set / editor how \"<what you want>\"; after each change look at it with astryx experimental theme editor show <name> --png (writes PNGs, changes nothing in the app): a theme change is not done until you have looked. No app yet: astryx experimental theme preview app <dir>.","globalOptions":[{"flag":"-V, --version","description":"output the version number","type":"boolean"},{"flag":"--zh","description":"Simplified Chinese for component reads and for docs topics that have a translation (English otherwise)","type":"boolean"},{"flag":"--dense","description":"Token-efficient dense text for component <Name> and docs <topic> reads","type":"boolean"},{"flag":"--lang <locale>","description":"Language or format for component and docs reads: en (default), zh (as --zh), or dense (as --dense)","type":"enum","choices":["en","zh","dense"]},{"flag":"--detail <level>","description":"Detail level for component, hook, and docs tree reads (e.g. docs cli/commands/build), and for theme build reports. Lists default to brief; theme build prints one line per built theme unless full, which adds the install example and font recipe","type":"enum","choices":["full","compact","brief"],"default":"full"},{"flag":"--json","description":"Output as typed JSON. Success envelope: { apiVersion, type, package?, data, meta? }. Error envelope: { apiVersion, error, code, suggestions? }.","type":"boolean"}],"commands":[{"name":"blog","description":"Read the Astryx blog from the published feed","arguments":[{"name":"slug","required":false,"variadic":false,"description":""}],"options":[],"json":true,"responseTypes":["blog.list","blog.detail"],"examples":["astryx blog","astryx blog introducing-astryx --json"],"exitCodes":[{"code":0,"when":"success"},{"code":1,"when":"unknown slug, or the feed or a post cannot be fetched"}],"outsideProject":"same"},{"name":"build","description":"Build a page: the template to start from, or the workflow playbook (no query)","arguments":[{"name":"query","required":false,"variadic":false,"description":""}],"options":[{"flag":"--type <domain>","description":"Filter the kit to one domain (component|hook|doc|template|theme); doc and theme give an empty kit","type":"string"},{"flag":"--limit <n>","description":"Max candidates to draw from (default 60)","type":"string"},{"flag":"--verbose","description":"Verbose output (every block and component, full descriptions, import paths and match reason)","type":"boolean"}],"json":true,"responseTypes":["build.help","build.kit"],"examples":["astryx build","astryx build \"analytics dashboard\" --json"],"exitCodes":[{"code":0,"when":"success (including zero matches)"},{"code":1,"when":"invalid --type, a --limit that is not a positive integer, or a query when @astryxdesign/core cannot be found (the playbook needs no core)"}],"outsideProject":"same"},{"name":"component","description":"List components or print component docs","arguments":[{"name":"names","required":false,"variadic":true,"description":"One or more exact selectors. Use Name, package/Name, @scope/package/Name, or @scope/package@version/Name. Two or more return one ordered batch. At most 100 selectors are accepted."}],"options":[{"flag":"--list","description":"List every component (the same as giving no name)","type":"boolean"},{"flag":"--category <category>","description":"List one component group, e.g. --category Layout or --category Avatar (an unknown group lists the valid ones)","type":"string"},{"flag":"--props","description":"Print only the props table","type":"boolean"},{"flag":"--source","description":"Print component source code","type":"boolean"},{"flag":"--showcase","description":"Print showcase source code","type":"boolean"},{"flag":"--blocks","description":"List example blocks: showcase, examples, and related","type":"boolean"},{"flag":"--package <name>","description":"Scope lookup to an external package (e.g. @acme/xds-widgets). Use @astryxdesign/core to select an original replaced by an integration component.","type":"string"}],"json":true,"responseTypes":["component.list","component.batch","component.detail","component.detail.props","component.detail.source","component.detail.showcase","component.detail.blocks"],"examples":["astryx component --list","astryx component Button Badge Text","astryx component Button --props --json","astryx component SideNav --package @astryxdesign/core"],"exitCodes":[{"code":0,"when":"success"},{"code":1,"when":"unknown component, category, or package; more than 100 selectors; any batch row is unresolved; or @astryxdesign/core cannot be resolved"}],"outsideProject":"same"},{"name":"discover","description":"Browse and search integrations: the ones you have and the ones you could add","arguments":[{"name":"query","required":false,"variadic":false,"description":""}],"options":[{"flag":"--components","description":"In the package list, print every component, and every other item, of each package instead of the first 10 and a \"+N more\" count. No effect on --json output or on a package, component, or search query.","type":"boolean"},{"flag":"--type <kind>","description":"Only one kind: component, template, doc, theme, codemod, or agent-doc. In the list, only packages that add it; in a search, only items of that kind.","type":"string"},{"flag":"--installed","description":"Only what this project has. Cannot be set with --available.","type":"boolean"},{"flag":"--available","description":"Only what this project could add. Cannot be set with --installed.","type":"boolean"},{"flag":"--limit <n>","description":"Max number of search results, a positive integer (default 20).","type":"string"}],"json":true,"responseTypes":["discover.list","discover.detail","discover.detail.doc","discover.item","discover.search"],"examples":["astryx discover","astryx discover --components","astryx discover --type theme","astryx discover @acme/ui","astryx discover @acme/ui@2.1.0","astryx discover dashboard --type template --available"],"exitCodes":[{"code":0,"when":"success"},{"code":1,"when":"unknown package, version, component, or item; a malformed doc; an invalid --type or --limit; --installed with --available; or a blank query when packages are discovered"}],"outsideProject":"same"},{"name":"docs","description":"Print reference docs","arguments":[{"name":"topic","required":false,"variadic":false,"description":""},{"name":"section","required":false,"variadic":false,"description":""}],"options":[{"flag":"--index","description":"List the topic's sections and their keys, even for a topic with one section","type":"boolean"},{"flag":"--full","description":"Print the whole topic instead of its sections (text; `--json` returns the whole topic unless --index). Cannot be set with --index","type":"boolean"},{"flag":"--depth <levels>","description":"How many levels of the docs tree to read below a namespace: 0 for the namespace alone, 1 for its children (what a read without --depth shows), all for everything below it. On the topic list, where a namespace otherwise lists alone, it names the docs below each one by the route that opens them, one line each. With it on a namespace read, --detail sets how much of each doc below shows: brief (one line each, the default), compact (with its sections), or full; the topic list is one line per doc whatever the detail","type":"string"}],"json":true,"responseTypes":["docs.list","docs.detail","docs.index","docs.detail.section","docs.node"],"examples":["astryx docs","astryx docs theme","astryx docs spacing --json","astryx docs theme quick-start","astryx docs cli","astryx docs cli --depth all","astryx docs --depth all","astryx docs authoring --depth all --detail full","astryx docs cli/api/functions/search","astryx docs authoring/quick-start --full"],"exitCodes":[{"code":0,"when":"success"},{"code":1,"when":"unknown topic or route, a section that matches no section or more than one, or a --depth that is not a number of levels or all"}],"outsideProject":"same"},{"name":"doctor","description":"Diagnose Astryx projects and integration packages","arguments":[],"options":[{"flag":"--built <path>","description":"Also check a finished build before you deliver it: a project folder, a build output folder, or one built HTML file. Fails when it does not use Astryx at all, and warns with each raw element, icon or custom style in its source.","type":"string"}],"json":true,"responseTypes":["doctor"],"examples":["astryx doctor","astryx doctor --json","astryx doctor --built dist","astryx doctor integration validate @acme/widgets","astryx doctor integration templates @acme/widgets","astryx doctor integration components @acme/widgets","astryx doctor integration docs @acme/widgets"],"exitCodes":[{"code":0,"when":"no checks failed (warnings are allowed)"},{"code":1,"when":"one or more checks failed"}],"outsideProject":"own","subcommands":[{"name":"doctor integration","description":"Check an integration package while authoring it","arguments":[],"options":[],"json":false,"examples":["astryx doctor integration validate","astryx doctor integration templates","astryx doctor integration components","astryx doctor integration docs"],"exitCodes":[{"code":0,"when":"help is shown or the selected check has no errors"},{"code":1,"when":"the selected check reports an error"}],"subcommands":[{"name":"doctor integration components","description":"Check integration component names, replacements, and documented props","arguments":[{"name":"package","required":false,"variadic":false,"description":"Installed integration package name; omit to check the package in the current directory."}],"options":[],"json":true,"responseTypes":["integration.component-conflicts"],"examples":["astryx doctor integration components","astryx doctor integration components @acme/widgets --json"],"exitCodes":[{"code":0,"when":"the check completed; component name conflicts, replaces findings for a package without the CLI range, props that differ from the code, and links that name no doc are warnings"},{"code":1,"when":"the integration is invalid, Core cannot be resolved, or a package that declares the CLI range has an invalid replaces"}],"outsideProject":"same"},{"name":"doctor integration docs","description":"Check an integration's docs: the docs tree they add, every link, and overlaps with Core topics","arguments":[{"name":"package","required":false,"variadic":false,"description":"Installed integration package name; omit to check the package in the current directory."}],"options":[],"json":true,"responseTypes":["integration.doc-conflicts"],"examples":["astryx doctor integration docs","astryx doctor integration docs @acme/widgets --json"],"exitCodes":[{"code":0,"when":"all Core overlaps are explicitly declared or no overlap exists"},{"code":1,"when":"an overlap is accidental, a doc is invalid, a namespace or placement fails, or a reference block cannot include what it names. A link that names no doc is a warning, and does not change the exit code"}],"outsideProject":"same"},{"name":"doctor integration templates","description":"Validate integration template replacements and Core id overlaps","arguments":[{"name":"package","required":false,"variadic":false,"description":"Installed integration package name; omit to check the package in the current directory."}],"options":[],"json":true,"responseTypes":["integration.template-conflicts"],"examples":["astryx doctor integration templates","astryx doctor integration templates @acme/widgets --json"],"exitCodes":[{"code":0,"when":"replacement declarations are valid; undeclared id conflicts are warnings"},{"code":1,"when":"the integration, a template, or a replacement declaration is invalid"}],"outsideProject":"same"},{"name":"doctor integration validate","description":"Validate an integration manifest and its contributions","arguments":[{"name":"package","required":false,"variadic":false,"description":"Installed integration package name; omit to validate the package in the current directory."}],"options":[],"json":true,"responseTypes":["integration.validate"],"examples":["astryx doctor integration validate","astryx doctor integration validate @acme/widgets --json"],"exitCodes":[{"code":0,"when":"no error-severity issues (warnings, including doc type findings, are allowed)"},{"code":1,"when":"one or more error-severity issues"}],"outsideProject":"own"}]}]},{"name":"experimental","description":"[experimental] Try features that may change in a patch release: icon sets, page rendering, checked theme editing","arguments":[],"options":[],"json":false,"examples":["astryx experimental","astryx experimental icon delete","astryx experimental render page.tsx","astryx experimental theme editor set brand corners pill"],"exitCodes":[{"code":0,"when":"help is shown or a subcommand succeeds"},{"code":1,"when":"an unknown subcommand or a subcommand failure"}],"subcommands":[{"name":"experimental icon","description":"[experimental] Find an icon by meaning, or build an icon set from a library (guide: astryx docs cli/experimental/icon-sets)","arguments":[{"name":"query","required":false,"variadic":true,"description":""}],"options":[{"flag":"--list","description":"List the installed icon sets and do nothing else; a query is refused","type":"boolean"},{"flag":"--set <name>","description":"Search one set, by name or <package>/<set>; with --definitions, the set to check them against","type":"string"},{"flag":"--limit <n>","description":"Max number of matches, a positive integer (default 10)","type":"string"},{"flag":"--definitions","description":"Every Astryx icon definition, one line each: name, built in or not, how many bundled templates use it, whether the set maps it (--set, else the project's main set, else the package's only set), description, words","type":"boolean"},{"flag":"--all-icons","description":"With --set and no words: every icon of that set, one line each (id, words, definitions)","type":"boolean"}],"json":true,"responseTypes":["icon.search","icon.detail","icon.definitions","icon.setIcons","icon.list"],"examples":["astryx experimental icon delete","astryx experimental icon outline/trash","astryx experimental icon --list --json","astryx experimental icon --set outline --all-icons","astryx experimental icon arrow --set outline --limit 3"],"exitCodes":[{"code":0,"when":"success (including zero matches)"},{"code":1,"when":"no query and no --list, a query with --list, a --limit that is not a positive integer, or a set or icon that is not installed"}],"outsideProject":"same","subcommands":[{"name":"experimental icon add","description":"[experimental] Register one icon you chose from a library in your icon set","arguments":[{"name":"export","required":false,"variadic":false,"description":""}],"options":[{"flag":"--from <module>","description":"The module the icon is exported from: a package, a subpath, or a ./ path to a file inside this package","type":"string"},{"flag":"--definition <name>","description":"Map the icon to this icon definition","type":"string"},{"flag":"--new-definition <name>","description":"Add your set's own definition, named in camelCase (aiHelper) or kebab-case (ai-helper), then map the icon to it; needs --description and --words","type":"string"},{"flag":"--description <text>","description":"With --new-definition: what the icon is for","type":"string"},{"flag":"--words <list>","description":"With --new-definition: comma-separated words people search for","type":"string"},{"flag":"--default","description":"The module's default export is the icon; your set's module must re-export it under <export>","type":"boolean"},{"flag":"--variant <name>","description":"Add the export as this variant of an existing icon: one of the set's declared variants, such as solid","type":"string"},{"flag":"--all","description":"With --variant and --from, and no export: add that variant for every icon whose id the module exports, in one run","type":"boolean"},{"flag":"--id <id>","description":"The icon's id, instead of the one its name gives","type":"string"},{"flag":"--set <name>","description":"The set to edit, when the package ships several","type":"string"}],"json":true,"responseTypes":["icon.add","icon.addVariants","icon.definitionMatches"],"examples":["astryx experimental icon add Bin --from @acme/glyph-library","astryx experimental icon add Bin --from @acme/glyph-library --definition delete","astryx experimental icon add --variant solid --from @heroicons/react/24/solid --all","astryx experimental icon add Dice5 --from @acme/glyph-library --new-definition random --description 'Pick something at random.' --words dice,shuffle,chance","astryx experimental icon add Bin --from @acme/glyph-library/solid --id bin --variant solid"],"exitCodes":[{"code":0,"when":"the icon is added, already present, or the matching definitions are listed"},{"code":1,"when":"the export is missing or is data, the definition is unknown, the id is taken, or the variant is not one the set declares"}],"outsideProject":"refuse"},{"name":"experimental icon map","description":"[experimental] Register which icon of your set draws an icon definition","arguments":[{"name":"definition","required":false,"variadic":false,"description":""},{"name":"icon","required":false,"variadic":false,"description":""}],"options":[{"flag":"--set <name>","description":"The set to edit, when the package ships several","type":"string"},{"flag":"--remove","description":"Remove the definition's entry; takes no icon","type":"boolean"},{"flag":"--pairs <list>","description":"Many entries in one write: <definition>=<icon> pairs, comma-separated; checked together, all or none; an existing entry is replaced","type":"string"}],"json":true,"responseTypes":["icon.mapMany","icon.map"],"examples":["astryx experimental icon map delete trash","astryx experimental icon map --pairs close=x-mark,error=x-circle,search=magnifying-glass","astryx experimental icon map delete --remove"],"exitCodes":[{"code":0,"when":"the entry is written, removed, or already as asked"},{"code":1,"when":"the definition is unknown, the set has no such icon, or no set is found"}],"outsideProject":"refuse"},{"name":"experimental icon new-definition","description":"[experimental] Add your icon set's own icon definition","arguments":[{"name":"name","required":true,"variadic":false,"description":"The definition name, in camelCase (rocketLaunch) or kebab-case (rocket-launch)"}],"options":[{"flag":"--dry-run","description":"Validate and show planned writes without changing files","type":"boolean"},{"flag":"--set <name>","description":"The icon set to add it to, when the package ships several","type":"string"},{"flag":"--description <text>","description":"One sentence on what an icon with this definition is for","type":"string"},{"flag":"--words <list>","description":"Comma-separated words people search for","type":"string"},{"flag":"--icon <id>","description":"Also map it to this icon of the set (its `map` entry)","type":"string"}],"json":true,"responseTypes":["icon.newDefinition"],"examples":["astryx experimental icon new-definition random --description 'Pick something at random.' --words dice,shuffle,chance --icon dice-5"],"exitCodes":[{"code":0,"when":"the definition is written or the dry run succeeds"},{"code":1,"when":"the name is invalid or taken, the description or words are missing, or the set or icon is not found"}],"outsideProject":"refuse"},{"name":"experimental icon new-set","description":"[experimental] Start an icon set in your integration package","arguments":[{"name":"name","required":true,"variadic":false,"description":"The set name, in lowercase kebab-case (outline)"}],"options":[{"flag":"--dry-run","description":"Validate and show planned writes without changing files","type":"boolean"},{"flag":"--from <module>","description":"A module whose every icon component the set wraps (a package, a subpath, or a ./ path); run again to refresh","type":"string"},{"flag":"--exclude <names>","description":"With --from: comma-separated export names of the library that are not icons","type":"string"},{"flag":"--adapter <module>#<export>","description":"A function in your package that turns one icon export that is not a component (an icon data object, an SVG string) into one, as ./<path>#<export>; it is declared in the set's data file, and with --from every data export of the library becomes an icon through it","type":"string"},{"flag":"--variants <list>","description":"Comma-separated variants the set supplies, such as outline,solid","type":"string"},{"flag":"--default-variant <variant>","description":"With --variants: the variant each icon's own export draws. When omitted: in a library whose export names encode looks, the look the icons draw (the library's usual default for a new set), which --variants must list; otherwise the set's current default, which --variants must list when the set has icons, else, on a set without icons, the first variant. A set with icons changes it only with --from, and only in a library whose export names encode looks","type":"string"},{"flag":"--display-name <text>","description":"The set's display name (the name in title case when omitted)","type":"string"},{"flag":"--description <text>","description":"The set's one-line description","type":"string"}],"json":true,"responseTypes":["icon.newSet"],"examples":["astryx experimental icon new-set outline","astryx experimental icon new-set outline --from @acme/glyph-library","astryx experimental icon new-set heroicons --from @heroicons/react/24/outline --variants outline,solid --default-variant outline","astryx experimental icon new-set outline --dry-run --json"],"exitCodes":[{"code":0,"when":"the set is written or the dry run succeeds"},{"code":1,"when":"the name, options, package, or target files are invalid or conflict"}],"outsideProject":"refuse"},{"name":"experimental icon use","description":"[experimental] Choose the project's main icon set, backups, and look","arguments":[{"name":"set","required":true,"variadic":false,"description":""}],"options":[{"flag":"--backup <set...>","description":"Backup sets, by name or `<package>/<set>`, in the order a copied template tries them after the main set.","type":"string"},{"flag":"--variant <variant>","description":"The look every icon draws, such as `outline` or `filled`: one of the main set's variants. Leave it out to remove `experimental.iconVariant`, so each set draws its default look.","type":"string"}],"json":true,"responseTypes":["icon.use"],"examples":["astryx experimental icon use outline","astryx experimental icon use outline --backup @acme/brand-icons/brand","astryx experimental icon use brand --variant filled","astryx experimental icon use @acme/icons/outline"],"exitCodes":[{"code":0,"when":"experimental.iconSet (and experimental.iconVariant) is written, or already names the sets and the look"},{"code":1,"when":"a set is not installed, two packages ship it, a set is named twice, the main set declares no variant `--variant` names, the config cannot be updated (not a static object literal, or it spreads another object, which you then edit by hand), or the config is protected (a symbolic link, or marked generated, vendored, or ignored: `ERR_CODEMOD_PROTECTED`, naming the declaration)"}],"outsideProject":"refuse"}]},{"name":"experimental render","description":"[experimental] Render a page to one self-contained HTML file, or turn one back into a page","arguments":[{"name":"file","required":false,"variadic":false,"description":""}],"options":[{"flag":"--out <file>","description":"Where to write: an .html file, or with --reverse a page module (default: page.tsx gives page.html beside it; with --reverse, page.html comes back into a new folder page-restored/)","type":"string"},{"flag":"--reverse","description":"Turn a rendered HTML file back into a page module","type":"boolean"},{"flag":"--title <text>","description":"The page's title (default: its first top-level heading, else the file name)","type":"string"},{"flag":"--overwrite","description":"With --reverse, replace the page module if it already exists (never a protected file; the files it imports always go into a new folder)","type":"boolean"}],"json":true,"responseTypes":["render.page","render.reverse"],"examples":["astryx experimental render src/app/page.tsx --out page.html","astryx experimental render --reverse page.html --out page.tsx","astryx --json experimental render page.tsx"],"exitCodes":[{"code":0,"when":"the file was written (warnings included)"},{"code":1,"when":"no file, a wrong extension, a missing file, a page that does not compile, has no default export, imports a package that is not installed, reads a browser API while rendering, throws, crashes Node, or takes over 60 seconds; a file to write outside the current folder; with --reverse, an existing output without --overwrite, a damaged embedded source, or HTML that is not an Astryx page"}],"outsideProject":"same"},{"name":"experimental theme","description":"[experimental] Themes, experimental. `editor` makes and changes a theme one checked change at a time: every change is checked against what the installed Core's components really read, and a change that cannot take effect is refused. `preview` writes a page into the app that shows the theme on real pages. The group also carries experimental copies of the `astryx theme` commands (compile, the copy of theme build; list, add, remove, use, eject, template, targets), with the same functions and output. Colors come from `editor set` (accent, neutral, success, warning, danger, info, vibrancy), which generates them, so the group has no command of its own for that. Experimental: it may change or be removed in a patch release.","arguments":[],"options":[],"json":true,"responseTypes":["help"],"examples":["astryx experimental theme editor new brand --like neutral","astryx experimental theme editor set brand corners pill","astryx experimental theme editor show brand"],"exitCodes":[{"code":0,"when":"help is shown or a subcommand succeeds"},{"code":1,"when":"an unknown subcommand, a refused change, or a subcommand failure"}],"subcommands":[{"name":"experimental theme add","description":"[experimental] Add a built theme to the app. To copy a theme's source as an editable fork, run `experimental theme eject <slug> [path] [--overwrite]`.","arguments":[{"name":"slug","required":false,"variadic":false,"description":""}],"options":[{"flag":"--list","description":"List available themes","type":"boolean"},{"flag":"--import","description":"Compatibility no-op; the built theme is added with or without this flag","type":"boolean"},{"flag":"--package <package>","description":"Select the package that owns the theme","type":"string"}],"json":true,"responseTypes":["theme.app"],"examples":["astryx experimental theme add ocean","astryx experimental theme add ocean --package @acme/themes"],"exitCodes":[{"code":0,"when":"the theme is listed or added"},{"code":1,"when":"the theme, its built imports, its record, or the option combination is invalid"}],"outsideProject":"own"},{"name":"experimental theme compile","description":"[experimental] Compile standalone themes or one keyed theme family","arguments":[{"name":"files","required":true,"variadic":true,"description":""}],"options":[{"flag":"--family","description":"Build the selected extension family into one keyed CSS, JS, and declaration set, written beside the family root theme file, which must be inside the working directory to build (ERR_PATH_TRAVERSAL); --check only reads, so it compares outputs anywhere. Requires --family-key; refused with --out or --watch (ERR_THEME_INVALID)","type":"boolean"},{"flag":"--family-key <key>","description":"Lower-kebab filename stem required with --family and refused without it; must differ from every member name (ERR_THEME_INVALID)","type":"string"},{"flag":"-o, --out <path>","description":"Output CSS file path, relative or absolute; the .js and .d.ts are written beside it (default: <theme name>.css next to the source). A folder, or a path ending in /, writes <theme name>.css into it. The path should end in .css; another name still builds, with a warning. A build never replaces the theme source (ERR_THEME_INVALID). At a path --out names, it replaces its own earlier outputs, and the output of another theme source with a warning that names both sources; any other existing file fails with ERR_FILE_EXISTS and nothing is written. Into a folder the theme editor made (folder <slug>/ holds <slug>.settings.json), a source outside that folder builds there too, with a warning; to keep the editor folder to its own theme, build beside the source, or pass an --out outside it. A build writes only inside the working directory, the defaults beside the source too (ERR_PATH_TRAVERSAL); --check writes nothing, so it compares outputs anywhere and refuses only a relative path that escapes the working directory. Single theme only: refused with more than one file or with --family (ERR_THEME_INVALID)","type":"string"},{"flag":"--icons-specifier <specifier>","description":"Override the icon-registry import in the generated JS module, for example ./icons.mjs (default: the specifier in the theme source's own import). With --family it applies to every member's icon import","type":"string"},{"flag":"-w, --watch","description":"Rebuild automatically when the theme source, or a local file it imports, changes (Ctrl-C to stop). Refused with --check, --family, or --json (ERR_THEME_INVALID)","type":"boolean"},{"flag":"-c, --check","description":"Verify the committed outputs match the source without writing; exit non-zero if stale. Composes with --family and several files; refused with --watch (ERR_THEME_INVALID)","type":"boolean"}],"json":true,"responseTypes":["theme.build","theme.build.check"],"examples":["astryx experimental theme compile ./src/themes/ocean.ts --out ./dist/ocean.css","astryx experimental theme compile --family ./themes/ocean.mjs ./themes/ocean-calm.mjs --family-key ocean-family","astryx experimental theme compile ./src/themes/*.ts","astryx experimental theme compile ./src/themes/ocean.ts --check","astryx experimental theme compile ./src/themes/ocean.ts --icons-specifier ./icons.mjs"],"exitCodes":[{"code":0,"when":"the theme builds, or --check finds the outputs up to date"},{"code":1,"when":"a build or validation error (an error envelope), or --check finds stale or missing outputs (the check result, with upToDate false, the stale files and code ERR_THEME_STALE, is still printed: it is a result, not an error). One exception: an editor theme whose settings changed after its build is refused (ERR_THEME_INVALID, an error envelope) before any file is checked, with `editor show <theme>` to build it again. An editor theme run from a folder other than its app root is refused (ERR_INVALID_ARGUMENT) with the `cd` to the root and the same command; `--family` does not take an editor theme (ERR_INVALID_ARGUMENT); its damaged or unbuildable settings are refused (ERR_THEME_INVALID)"}],"outsideProject":"same"},{"name":"experimental theme editor","description":"[experimental] A type-safe compiler for themes. A theme lives in themes/<theme>/: <theme>.settings.json holds the checked settings and is owned by this command; <theme>.settings.ts is generated from it on every change; <theme>.theme.ts extends it, is written once and is yours to edit; <theme>.css and <theme>.js are built from it; build them again with `astryx experimental theme compile themes/<theme>/<theme>.theme.ts`, which checks the editor's settings first. Every build also writes the theme's app copy, src/themes/<theme>/: a standard local theme (descriptor, source, built module and stylesheets), never edited by hand, so `astryx theme add <theme>` puts the theme into the app and `theme use`, `remove` and `list` take it as they take any local theme. A folder there that is not the editor's copy is left alone, and `new` and `show` then print the import lines by hand instead (`wiring`). Every change is CHECKED against what the installed Core's components really read (derived from Core itself, version for version, and cached under node_modules/.cache/) and against the token's type; a change that cannot take effect is refused, nothing is written, and the error leads with the command that works. The thing you set is a dial (a big move with named rungs: corners, spacing, font, headings, text-size, base, mode; or a color: accent, neutral, success, warning, danger, info, each generating its light and dark shades from one color for the color tokens, and vibrancy, how saturated they are), a design token by name, or a CSS property on a part. Where it applies: --on <part|group>, --when <prop>:<value>, --state <state>, --mode light|dark, --only. Every accepted change rebuilds and writes preview.html (the sample app page); `show` adds the theme-building page with every component. PNG pictures only with --png. Commands on one theme run one after the other, through a lock in node_modules/.cache/astryx-theme/ of the project; when node_modules cannot be written (a read-only install), changes are refused and `show` still reads the last build. `how` answers everything else: what a part, group, setting or aspect does, how the colors are made, plain-words questions (with exact commands), a picture's colors, and lists of what you can set. Experimental: it may change or be removed in a patch release.","arguments":[],"options":[],"json":true,"responseTypes":["help"],"examples":["astryx experimental theme editor new brand --like neutral","astryx experimental theme editor set brand corners pill","astryx experimental theme editor how \"white text in the banner\"","astryx experimental theme editor show brand"],"exitCodes":[{"code":0,"when":"help is shown or a subcommand succeeds"},{"code":1,"when":"an unknown subcommand, a refused change, or a subcommand failure"}],"subcommands":[{"name":"experimental theme editor how","description":"[experimental] One command for every question. With nothing named, it prints its usage and examples. A part (button, card; --list parts): what it reads for each aspect (text, background, border, corners, shadow, spacing, font, size), each condition written as the --when and --state flags `set` takes or marked not settable with the reason, its variants, every state `set` accepts, the parts inside it (a token set --on the part reaches them), and its group; a part the part data does not have says so, with commands that still apply. A group (inputs, containers, checks, menus): its members and whether styling one styles all. A setting: a dial's rungs and examples, a token's type, default and the parts that read it (and, when none does, whether Core's stylesheet still uses it), or a CSS property and the parts that set it. An aspect (text, background, border, corners, shadow, spacing, font, size): the dial and the whole-theme tokens most parts read for it. `colors` (or `palette`): how the theme's colors are made: one seed per color, light and dark shades generated with the same generator as `theme palette generate`, the shade each token starts from, vibrancy, the Colors preview page and the exact-token escape hatch. A lookup takes any case, a plural, and a token name without its dashes. A question in plain words (\"bold white text in the header\", \"remove shadows from cards\", \"cards: 8px radius; buttons: 4px\"): it reads each clause for the parts (and their variant, size, state or mode), what to change, the values typed (hex, rgb(), lengths, dashed), and whether it asks for more, less or none (\"shouldn't\", \"turn off\", \"never\", \"too sharp\", \"everything except X\" included), and answers with exact commands; a typed value always wins over a color word, and a hex color with the wrong number of digits is refused by name, never replaced with a sample. \"In dark mode\" carries --mode dark to every color command; a change that cannot differ by mode, or a dark-mode ask on a light-only theme, says so instead. A question about what something is (\"what does --color-accent do\") gets the lookup. Several changes in one question come first as one sequence (`sequence: true`: run every command in order, at most 12), with repeated and overwritten steps left out; two asks that contradict each other are offered as choices. Changes come before lookups. Every suggested command names the theme (`theme`: the one named with `theme`, the only one, or the one an editor command changed last, said in `themeNote`; `themeChosenBy` says which: named, only, last-changed or none; with none, my-theme, made first), holds a real value, never a placeholder or a comment, and is checked as `set` checks it: a command `set` would refuse, or that changes nothing, is left out and listed in `refused` with the reason. A question with no answer says why in `hint`, with the next commands in `run`. A PNG picture (by any file name; other formats are refused by their bytes): its main colors from every pixel (on an even grid past 4 million), biggest share first, with where each sits, see-through pixels skipped, tRNS included (a number after the file sets how many, default 14), or with --at the exact color and alpha at pixel points; a picture over 40 million pixels (20 million at 16 bits), or with pixel data that is damaged or shorter than its header says, is refused before it is decoded. --list <what> lists what a change can name (dials, tokens, parts, groups or properties, in any case, singular or plural; kinds or no word lists those kinds), and the other words filter the list. Experimental: it may change or be removed in a patch release.","arguments":[{"name":"subject","required":false,"variadic":true,"description":""}],"options":[{"flag":"--list","description":"List what a change can name; the word that names a kind says what, wherever it is (any case, singular or plural): dials, tokens (with type, default and how many parts read each), parts (one item per name, with its components, group, variants and states), groups, or properties (the common CSS properties; a filter searches every standard one). The other words filter the list, and may start with --. --list=tokens works too. With no word, or kinds, the kinds it lists","type":"boolean"},{"flag":"--theme <name>","description":"The theme the suggested commands are for, checked against its settings (default: the only theme the editor made in the app; with several, the one an editor command changed last; with none, a theme named my-theme that the answer makes first). An empty name or --theme given twice is refused, for every subject","type":"string"},{"flag":"--at <points...>","description":"With a PNG picture: the exact color and alpha at pixel points x,y (whole numbers inside the picture), given as \"40,20;300,180\", \"40,20 300,180\", a repeated --at, or a flat \"40,20,300,180\"","type":"string"}],"json":true,"responseTypes":["themeEdit.how"],"examples":["astryx experimental theme editor how banner","astryx experimental theme editor how \"bold white text in the header\"","astryx experimental theme editor how \"remove shadows from cards\" --theme brand","astryx experimental theme editor how --color-accent","astryx experimental theme editor how target.png --at \"40,20;300,180\"","astryx experimental theme editor how colors","astryx experimental theme editor how \"make it more colorful\"","astryx experimental theme editor how --list dials","astryx experimental theme editor how accent --list tokens"],"exitCodes":[{"code":0,"when":"the usage (nothing named) or the answer (an empty answer or list included)"},{"code":1,"when":"an unknown option, an unknown or empty theme, --theme given twice, an unknown --list kind, --list given twice, --at without a picture, a picture that is not a PNG or is damaged or too big, an --at point that is not whole pixel numbers or falls outside the picture, a count beside --at, or a count that is not a positive whole number, or a missing picture; or a folder outside a project with Core installed (ERR_PROJECT_REQUIRED)"}],"outsideProject":"refuse"},{"name":"experimental theme editor new","description":"[experimental] Makes themes/<theme>/ with <theme>.settings.json (the settings this command owns), the generated <theme>.settings.ts, <theme>.theme.ts (which extends it and is yours), and the built <theme>.css and <theme>.js (build them again with `astryx experimental theme compile themes/<theme>/<theme>.theme.ts`, which checks the editor settings first), then writes preview.html, the sample app page with the theme. --like builds on a built-in theme (neutral, stone, matcha, y2k, gothic, chocolate, butter; its package must be installed); without it, or with --like none, the theme starts from Astryx defaults. Any `set` dial can be a flag too (--accent \"#7c3aed\" --font inter --corners round --vibrancy 60 ...): the same names, values and checks as `set`, all applied in the one build, with one result that lists them. Change the base later with `astryx experimental theme editor set <theme> base <theme|none>`. Afterwards, <theme>.theme.ts is yours: it extends the generated <theme>.settings.ts, and every later change rewrites only the settings files, so your own edits in <theme>.theme.ts survive. A theme name is lowercase letters, digits and dashes, starts with a letter, has 64 characters at most, and is not the name of a built-in theme or a name Windows reserves for a device (con, prn, aux, nul, com1-com9, lpt1-lpt9). Experimental: it may change or be removed in a patch release. The result ends with `wiring`: `astryx theme add <theme>` for the app copy of the theme (src/themes/<theme>/, a standard local theme every build writes), the `mode` of a one-mode theme for the `<Theme>`, and what builds it; only when a folder of yours holds src/themes/<theme>/ does it give the imports in the root file and the `<Theme>` by hand.","arguments":[{"name":"theme","required":true,"variadic":false,"description":""}],"options":[{"flag":"--like <theme>","description":"A built-in theme to build on: neutral, stone, matcha, y2k, gothic, chocolate, or butter; or none, for Astryx defaults (the same as leaving it out)","type":"string"},{"flag":"--png","description":"Also take PNG pictures of the previews (light and dark), with no dev server running: it needs a Playwright installed in the project or a Chrome or Chromium found on the machine, and adds a few seconds while the browser starts; without one, the result says how to get it. Each picture carries the editor stamp and is recorded, by name and content, in themes/<theme>/<theme>.pictures.json; a file of yours named like a picture (preview.png, sheet.png) is never written over: no picture is taken, and the result names the file","type":"boolean"},{"flag":"--corners <rung>","description":"How round corners are: square, small, medium, large, round, pill, or a size like 6px. The same value and check as `set <theme> corners`","type":"string"},{"flag":"--spacing <rung>","description":"How much room: tight, compact, medium, roomy or spacious. The same value and check as `set <theme> spacing`","type":"string"},{"flag":"--accent <color>","description":"The brand color; its light and dark shades are generated from it. The same value and check as `set <theme> accent`","type":"string"},{"flag":"--neutral <color>","description":"The gray of surfaces, text and borders; its shades are generated from it. The same value and check as `set <theme> neutral`","type":"string"},{"flag":"--success <color>","description":"The success color. The same value and check as `set <theme> success`","type":"string"},{"flag":"--warning <color>","description":"The warning color. The same value and check as `set <theme> warning`","type":"string"},{"flag":"--danger <color>","description":"The danger (error) color. The same value and check as `set <theme> danger`","type":"string"},{"flag":"--info <color>","description":"The info color. The same value and check as `set <theme> info`","type":"string"},{"flag":"--vibrancy <0-100>","description":"How saturated the generated colors are (50 is the default); needs a color. The same value and check as `set <theme> vibrancy`","type":"string"},{"flag":"--font <font>","description":"The typeface: a preset, an open font, a family name or a stack. The same value and check as `set <theme> font`","type":"string"},{"flag":"--headings <style>","description":"Heading weight (light to heavy) or tracking (tight, tighter, normal, wide). The same value and check as `set <theme> headings`","type":"string"},{"flag":"--surfaces <style>","description":"flat, outlined, raised or glass. The same value and check as `set <theme> surfaces`","type":"string"},{"flag":"--buttons <style>","description":"solid, outline, soft or caps. The same value and check as `set <theme> buttons`","type":"string"},{"flag":"--type <style>","description":"compact, standard, editorial or display. The same value and check as `set <theme> type`","type":"string"},{"flag":"--text-size <size>","description":"small, medium, large, larger, or a number. The same value and check as `set <theme> text-size`","type":"string"},{"flag":"--mode <modes>","description":"both, light-only or dark-only. The same value and check as `set <theme> mode`","type":"string"}],"json":true,"responseTypes":["themeEdit.new"],"examples":["astryx experimental theme editor new brand --like neutral","astryx experimental theme editor new brand","astryx experimental theme editor new brand --like neutral --accent \"#7c3aed\" --font inter --corners round --vibrancy 60"],"exitCodes":[{"code":0,"when":"the theme is made and built, and its preview is written; or made but not checked, when the components could not be rendered: the output starts with [warn] saved, not checked (ERR_THEME_NOT_CHECKED) and the cause"},{"code":1,"when":"a name that is not lowercase letters, digits and dashes starting with a letter (64 at most) or is the name of a built-in theme, a theme that already exists, a --like that is not a built-in theme or is not installed, a setting flag that `set` would refuse, no Core installed in the folder, or a build failure (nothing is left behind)"}],"outsideProject":"refuse"},{"name":"experimental theme editor set","description":"[experimental] Changes one thing. The thing is a dial (corners, spacing, accent, neutral, success, warning, danger, info, vibrancy, font, headings, surfaces, buttons, type, text-size, base, mode: big moves with named rungs; `more`/`less` step a rung), a design token by name (--color-background-body; `how --list tokens`), or a CSS property on a part (background --on card; needs --on). Every change is CHECKED first against the installed Core: the part, the --when variant and value, the --state, the token's type (color, size, number, font, shadow; only colors may differ by mode; a shadow is one value for both), and whether the part, or a part inside it, actually reads the token for what you mean. A change that cannot take effect is REFUSED: exit 1, an error code, nothing written, and the suggestions lead with the command that works (the token the part really reads, or the property that sets it directly). Groups: --on <group> (inputs, checks, containers, menus) styles every member; styling one member of an always-alike group (inputs, checks) styles the whole group unless --only. A setting on a part beats a whole-theme dial, and a dial never overwrites one. After building, a plain part setting that a more specific base-theme rule would beat (such as a heading level) is repeated on those variant keys, and the result says so. The result lists resolved token changes, part styles written, contrast problems this theme caused versus its base (text below 4.5:1), notes (the shade a color's main token uses, any shade moved so text reads, and the generated color files; font loading: the exact install line when the font package is missing), and writes themes/<theme>/preview.html. Values with spaces go in quotes: gradients, several shadows, font stacks. Dials: corners square|small|medium|large|round|pill|more|less|<size>; spacing tight|compact|medium|roomy|spacious|more|less; accent, neutral, success, warning, danger, info <color> (a color: the editor generates its light and dark shades from the one color, with the same generator as `theme palette generate`, and points the color tokens at them; a token moves to a nearby shade when it must read: text at 4.5:1, the focus ring at 3:1; the whole theme only, no --on or --mode; `how colors` explains it and the Colors preview page shows every shade); vibrancy 0-100|more|less (how saturated the generated colors are; 50 is the default; needs a color); font <preset, open font, family or stack>; headings light|regular|medium|semibold|bold|heavy or tight|tighter|normal|wide; surfaces flat|outlined|raised|glass; buttons solid|outline|soft|caps; type compact|standard|editorial|display; text-size small|medium|large|larger|more|less|<number of pixels, 10 to 32>; base <built-in theme>|none; mode both|light-only|dark-only. `astryx experimental theme editor how --list dials` explains each. An exact token always wins over the generated colors: `set <theme> --color-accent <color>` (with --on or --mode if you need them) is the escape hatch, whatever order the settings were made in. Experimental: it may change or be removed in a patch release.","arguments":[{"name":"theme","required":true,"variadic":false,"description":""},{"name":"thing","required":true,"variadic":false,"description":""},{"name":"value","required":false,"variadic":true,"description":""}],"options":[{"flag":"--on <where>","description":"Where it applies (default: the whole theme): a part (button, card, app-shell-header; how --list parts), a group (inputs, containers, checks, menus; how --list groups), or for font a role (body, heading, code)","type":"string"},{"flag":"--when <prop:value>","description":"Only that variant of the part, such as variant:primary or status:error (how <part> lists them); needs --on","type":"string"},{"flag":"--state <state>","description":"Only that state of the part: hover, active, focus-visible, disabled, or a state the part lists (selected...); needs --on","type":"string"},{"flag":"--mode <mode>","description":"light or dark: only that color mode. Colors only; sizes, numbers, fonts and shadows are the same in both modes, and a light-only or dark-only theme takes no --mode","type":"string"},{"flag":"--only","description":"With one member of an always-alike group (inputs, checks), style just that part instead of the whole group","type":"boolean"},{"flag":"--png","description":"Also take PNG pictures of the previews (light and dark), with no dev server running: it needs a Playwright installed in the project or a Chrome or Chromium found on the machine, and adds a few seconds while the browser starts; without one, the result says how to get it. Each picture carries the editor stamp and is recorded, by name and content, in themes/<theme>/<theme>.pictures.json; a file of yours named like a picture (preview.png, sheet.png) is never written over: no picture is taken, and the result names the file","type":"boolean"}],"json":true,"responseTypes":["themeEdit.set"],"examples":["astryx experimental theme editor set brand corners pill","astryx experimental theme editor set brand spacing more","astryx experimental theme editor set brand accent \"#7c3aed\"","astryx experimental theme editor set brand neutral \"#64748b\"","astryx experimental theme editor set brand vibrancy 70","astryx experimental theme editor set brand --color-accent \"#7c3aed\"","astryx experimental theme editor set brand --color-text-primary \"#e5e7eb\" --mode dark","astryx experimental theme editor set brand background \"linear-gradient(#f6d365, #fda085)\" --on app-shell-header","astryx experimental theme editor set brand background-color \"#f3e8ff\" --on button --when variant:ghost --state hover","astryx experimental theme editor set brand border \"1px solid #9ca3af\" --on inputs"],"exitCodes":[{"code":0,"when":"the change is written, built and previewed (notes and contrast problems included); or written but not checked, when the components could not be rendered: the output starts with [warn] saved, not checked (ERR_THEME_NOT_CHECKED) and the cause, such as two copies of React"},{"code":1,"when":"an unknown option, a refused change (an unknown part, variant, state, token or thing; a value of the wrong type; --mode on something that has no mode; a token the part never reads for that; corners on a part that shows no edge), a theme that does not exist, or a build failure, or a folder outside a project with Core installed (ERR_PROJECT_REQUIRED); nothing is written"}],"outsideProject":"refuse"},{"name":"experimental theme editor show","description":"[experimental] Lists every setting with where it applies and its source (dial, token or property), the resolved value of key tokens in each mode, the colors (the vibrancy; each color with its seed and the shade each token uses in light and dark, marked when an exact token setting wins; any shade moved so text reads), contrast problems this theme caused versus its base, font notes, and last the generated color files. Writes two self-contained HTML files: preview.html (the sample app page) and sheet.html (the theme-building page: every component grouped, each variant side by side, overlays open, and real template pages, with an auto/light/dark switch). A theme with no build is built first, and an in-app preview (`preview add`) of the theme has its route and Colors page rewritten. --section limits the sheet to one section. An own change to <theme>.theme.ts since the last build is built first, and the colors mark where it wins over a generated shade; a theme source that no longer builds, or a token in it that is not text, is refused (ERR_THEME_INVALID, exit 1) and the folder stays as it was. Experimental: it may change or be removed in a patch release. The result ends with `wiring`: `astryx theme add <theme>` for the app copy of the theme (src/themes/<theme>/, a standard local theme every build writes), the `mode` of a one-mode theme for the `<Theme>`, and what builds it; only when a folder of yours holds src/themes/<theme>/ does it give the imports in the root file and the `<Theme>` by hand.","arguments":[{"name":"theme","required":true,"variadic":false,"description":""}],"options":[{"flag":"--section <name>","description":"Only one section of the sheet: actions, inputs, selection, navigation, feedback, data, containers, overlays, or pages","type":"string"},{"flag":"--png","description":"Also take PNG pictures of the previews (light and dark), with no dev server running: it needs a Playwright installed in the project or a Chrome or Chromium found on the machine, and adds a few seconds while the browser starts; without one, the result says how to get it. Each picture carries the editor stamp and is recorded, by name and content, in themes/<theme>/<theme>.pictures.json; a file of yours named like a picture (preview.png, sheet.png) is never written over: no picture is taken, and the result names the file","type":"boolean"}],"json":true,"responseTypes":["themeEdit.show"],"examples":["astryx experimental theme editor show brand","astryx experimental theme editor show brand --png"],"exitCodes":[{"code":0,"when":"the settings are listed and both pages are written"},{"code":1,"when":"the theme does not exist or its base theme package is not installed (ERR_UNKNOWN_THEME), an unknown --section (ERR_INVALID_ARGUMENT), a theme source that does not build or parse or a token in it that is not text (ERR_THEME_INVALID), a folder where a built file goes (ERR_FILE_EXISTS), a built file that cannot be read or written (ERR_WRITE_FAILED), another command changing the theme (ERR_THEME_BUSY), a page that does not render (ERR_RENDER_FAILED), or a folder outside a project with Core installed (ERR_PROJECT_REQUIRED)"}],"outsideProject":"refuse"},{"name":"experimental theme editor undo","description":"[experimental] With only the theme, it steps back one change: the settings, the generated settings module and the build go back to how they were before the last change (your <theme>.theme.ts is not touched), and the preview is rewritten; the result names what was undone and how many earlier steps are left. When the settings file is damaged (not valid JSON), the step back restores the settings from before the last change without reading it. With a thing, it removes that one setting wherever it is in the settings, and the result says what applies now (`now`): the whole-theme setting for a part setting removed, or the base theme's value; the theme is rebuilt and previewed. Name the setting the way it was set: the same thing and the same --on, --when, --state, --mode and --only (`show` lists every setting that way). For the headings dial, name which half: weight or tracking; with no half named it removes the weight half, or the tracking half when that is the only one set. Removing a color (accent, neutral, success, warning, danger, info) stops generating it, and the tokens it fed go back to the base theme; with no color left, the generated color files the editor wrote are deleted; a palette.config.json you made, or one that holds a color of your own, stays. Removing vibrancy makes the colors again at the default, 50; removing the last color removes vibrancy too, as it needs a color. A setting the theme does not have is refused and the error lists the settings it has for that thing. `undo <theme> base` and `undo <theme> mode` go back to the base and mode the theme was made with; when they never changed, that is refused. The history keeps the last 80 steps (in <theme>.history.json); older steps are dropped. Experimental: it may change or be removed in a patch release.","arguments":[{"name":"theme","required":true,"variadic":false,"description":""},{"name":"thing","required":false,"variadic":false,"description":""},{"name":"which","required":false,"variadic":false,"description":""}],"options":[{"flag":"--on <where>","description":"Where it applies (default: the whole theme): a part (button, card, app-shell-header; how --list parts), a group (inputs, containers, checks, menus; how --list groups), or for font a role (body, heading, code)","type":"string"},{"flag":"--when <prop:value>","description":"Only that variant of the part, such as variant:primary or status:error (how <part> lists them); needs --on","type":"string"},{"flag":"--state <state>","description":"Only that state of the part: hover, active, focus-visible, disabled, or a state the part lists (selected...); needs --on","type":"string"},{"flag":"--mode <mode>","description":"light or dark: only that color mode. Colors only; sizes, numbers, fonts and shadows are the same in both modes, and a light-only or dark-only theme takes no --mode","type":"string"},{"flag":"--only","description":"With one member of an always-alike group (inputs, checks), style just that part instead of the whole group","type":"boolean"},{"flag":"--png","description":"Also take PNG pictures of the previews (light and dark), with no dev server running: it needs a Playwright installed in the project or a Chrome or Chromium found on the machine, and adds a few seconds while the browser starts; without one, the result says how to get it. Each picture carries the editor stamp and is recorded, by name and content, in themes/<theme>/<theme>.pictures.json; a file of yours named like a picture (preview.png, sheet.png) is never written over: no picture is taken, and the result names the file","type":"boolean"}],"json":true,"responseTypes":["themeEdit.undo"],"examples":["astryx experimental theme editor undo brand","astryx experimental theme editor undo brand corners","astryx experimental theme editor undo brand background --on app-shell-header"],"exitCodes":[{"code":0,"when":"the last change is undone, or the setting is removed"},{"code":1,"when":"an unknown option, there is no earlier change, the theme does not set the thing, or the theme does not exist; or a folder outside a project with Core installed (ERR_PROJECT_REQUIRED)"}],"outsideProject":"refuse"}]},{"name":"experimental theme eject","description":"[experimental] Fork a theme as editable local source","arguments":[{"name":"slug","required":true,"variadic":false,"description":""},{"name":"path","required":false,"variadic":false,"description":""}],"options":[{"flag":"-f, --overwrite","description":"Replace the existing files of an earlier fork of the same theme. Without it, an existing file fails with ERR_FILE_EXISTS and nothing is written","type":"boolean"},{"flag":"--package <package>","description":"Select the package that owns the theme","type":"string"}],"json":true,"responseTypes":["theme.eject"],"examples":["astryx experimental theme eject ocean","astryx experimental theme eject ocean src/themes/my-ocean --package @acme/themes"],"exitCodes":[{"code":0,"when":"all source and descriptor files are written"},{"code":1,"when":"the theme is unknown or ambiguous, a path escapes, a source file is missing, a destination exists, or the folder holds another theme"}],"outsideProject":"same"},{"name":"experimental theme list","description":"[experimental] List themes available to add","arguments":[],"options":[{"flag":"--package <package>","description":"Show only themes owned by this package","type":"string"}],"json":true,"responseTypes":["theme.list"],"examples":["astryx experimental theme list --json","astryx experimental theme list --package @acme/themes"],"exitCodes":[{"code":0,"when":"success"},{"code":1,"when":"a bundled or installed theme descriptor cannot be read"}],"outsideProject":"same"},{"name":"experimental theme preview","description":"[experimental] One route in the app, a normal page that keeps the app's layout, global CSS and providers: an app shell with a side nav item per preview page and a top bar with the theme name and, when it wears a theme made by `editor`, a light, dark and system switch. `add` adds pages (the default pages, the best template pages for a description, or one template) and writes the route the first time; `list` lists them; `remove` removes one, or the whole preview. With no app, `app <dir>` makes a starter app with the preview in it. Pictures of a theme are on `experimental theme editor show`. Experimental: it may change or be removed in a patch release.","arguments":[],"options":[],"json":true,"responseTypes":["help"],"examples":["astryx experimental theme preview add","astryx experimental theme preview list"],"exitCodes":[{"code":0,"when":"help is shown or a subcommand succeeds"},{"code":1,"when":"an unknown subcommand or a subcommand failure"}],"subcommands":[{"name":"experimental theme preview add","description":"[experimental] Writes the theme preview into the app: one route, a normal page of the app that keeps its layout, global CSS and providers, in an app shell with a side nav item per preview page and a top bar with the theme name and, when it wears a theme made by `editor`, a light, dark and system switch. A description (\"a sales dashboard\") asks the same page ranking `build` uses for the template pages that fit it best (--top of them, default 1), and adds each as a page, saying in `matched` what it picked and why (the words of the description it covers). App frames (the Shell templates) are left out, since the preview is an app shell already. When no page is exactly the one described, the closest is added and `matched` says the rest of the description is not on it; only a description no page relates to is refused, writing nothing and naming the closest pages to add with --template, with the other options repeated. A page the app cannot show (a missing package, or StyleX without a compiler) is skipped and the next match is taken (from the ranking, then the template search), and the result says so. A page's nav label is its template's display name, however it was added; --template names one page template instead; with neither, it adds the default pages: Overview (the theme at a glance, built to show what themes most often break: long and short text, every text level on every surface, every button variant and size with disabled and loading, inputs in their states, selected navigation, status colors, a table, open layers), Components (every component grouped, each with the command that changes it most) and, when the theme sets a color, Colors (each color's shades in light and dark, with the shade number, the hex and the tokens that use each; it reads the theme's generated colors, so it changes with every `editor set`). The route goes in theme-preview/ in the app's routes folder (app/ or src/app/), or in --path; the first add records the pages and the files it wrote in theme-preview.json beside the route, so later calls find it. With no routes folder and no --path, it refuses and names both ways on: --path, or `experimental theme preview app <dir>`, which makes a new starter app with the preview in it. The route fills the whole window with the theme, shell and edges included. Every check (the theme, the template, the ranking and every file it writes) runs before the first write, so a refusal changes nothing. A template page that imports a package the app lacks, or that uses StyleX in an app with no StyleX compiler, is not added: the result names it and the command that installs what it needs. A file the preview did not write is never replaced. The pages wear --theme (default: the only theme under themes/; with none or several, the app's own theme). The pages go in _pages/ beside the route, a folder Next never serves as a route; a preview an older release wrote into pages/ is moved there. theme-preview.json records a hash of each file the preview writes: a file changed by hand since is never replaced (the refusal names it), and a page file that already holds exactly the planned text is taken over. The files are staged and renamed into place together; when a write fails, every file is put back as it was. A damaged theme-preview.json is refused with `ERR_THEME_INVALID`, naming the file. The folder is refused when it is a file, in themes/, node_modules/ or Next's build folder (.next/, out/ or the distDir next.config names), in a Pages Router folder (pages/ or src/pages/), in a folder Next does not route (_private, @slot, [param]), or written with Windows separators, a leading ~ or white space at either end. With no --path and no preview in the default place, a preview recorded for a theme is used; with several, the refusal names each. A theme the preview wore that is gone is replaced by the app's own theme, with a note; a changed theme writes the default pages again. A template page whose package the app's package.json names but nobody installed is skipped like a missing one. Only the first 40 different words of a long description go to the ranking, with a note. The description may be several words without quotes. The project root, src/ and the routes folder itself are refused too: they hold the app. An older preview found there is named, with the remove that clears it. A recorded page whose file is gone is written again (a default page, or the template its id names), or else left out of the nav, with a note. A formatter run (white space, quotes, semicolons, commas) does not count as a change by hand. Refusals never suggest deleting files: they say what to move or rename. Preview commands in one project run one after another. The folder is also refused when it holds a package.json, when another page or route handler of the app already serves its URL (in the folder itself, a route group or the Pages Router), when next.config sets pageExtensions without tsx, when it is in src/app/ while app/ is what Next serves, and when no root layout is above it (an app with its root layout in [locale]/ gets its preview there, opened at /<locale>/theme-preview; an app with a root layout in each route group takes the preview under any of them). A template's needs come from its real import statements, never words in comments or strings; a package the app does not name gets the command that adds it. A theme with no build is built only after every check passed, holding that theme's lock, with a note. An edit inside a string counts as a change by hand; a formatter run does not. Experimental: it may change or be removed in a patch release.","arguments":[{"name":"description","required":false,"variadic":true,"description":""}],"options":[{"flag":"--theme <name>","description":"The theme the pages wear: a theme made by experimental theme editor (default: the only one under themes/; with none or several, the app's own theme)","type":"string"},{"flag":"--template <id>","description":"Add this page template (astryx template --list --type page) instead of ranking one from a description. A default page (overview, components, colors) adds just that page back when it is missing","type":"string"},{"flag":"--top <n>","description":"With a description: how many of the best-fitting page templates to add, 1 to 3 (default 1)","type":"string"},{"flag":"--path <dir>","description":"The folder of the preview route, inside the project. Default: theme-preview/ in the app's routes folder (app/ or src/app/); later commands find it there, or take the same --path","type":"string"}],"json":true,"responseTypes":["themeEdit.previewAdd"],"examples":["astryx experimental theme preview add","astryx experimental theme preview add \"a sales dashboard\" --top 2","astryx experimental theme preview add --template dashboard"],"exitCodes":[{"code":0,"when":"the pages are added"},{"code":1,"when":"outside a project, no routes folder and no --path, a --path that is no place for the preview, a file there that the preview did not write or that was changed by hand, a path outside the project, a damaged theme-preview.json, an unknown theme or template, an empty --template, no template page whose packages the app has, a bad --top, a failed write, or another preview command that did not finish within 30 seconds (ERR_THEME_BUSY)"}],"outsideProject":"refuse"},{"name":"experimental theme preview app","description":"[experimental] Writes a new starter app into <dir> (Next.js app router, Core and the neutral theme, with the Astryx packages pinned to this CLI's release; with --theme, Core and the base theme are pinned to the versions this project has, the ones the copied build was made on, with a note), with the theme preview route and its default pages (the sample app page and every component grouped) in src/app/theme-preview/. With --theme, the theme folder is copied into the app's themes/ and the pages wear it; a base theme or font package it needs is added to package.json. No install runs: it prints the install and dev commands and the page to open. <dir> must be new or empty, inside the current folder; a folder that is not empty is refused, with a free folder name to use instead. Every check runs before the first write, so a refusal changes nothing. Later pages go in with `experimental theme preview add`, run in the new app. Every open font the theme names is added to package.json, at the version this project has or a pinned range, and the route imports it; a theme with generated colors gets the Colors page too, and a one-mode theme starts the route in its mode. The app is written into a temp folder beside the folder and moved into place, so a failure leaves nothing behind. A folder holding only .git, .DS_Store or Thumbs.db counts as empty. The folder is refused when it is a file, a dangling link, inside this app's routes folder, themes/, node_modules/ or Next's build folder (.next/, out/ or the distDir next.config names), or written with Windows separators, white space at either end or a name too long. A theme whose build is missing or older than its settings is built first, with a note. The app's home page links to the preview, and its .gitignore leaves out node_modules, next-env.d.ts and *.tsbuildinfo. Inside a project with a tsconfig.json, a note says to exclude the new folder. It takes one folder; more arguments are refused. With a theme, it holds that theme's lock while it builds and copies it, so an `editor set` on the same theme waits for it. A folder given from a subfolder of the project is taken from where it was given. An app is refused in public/ (served as files at the site root) and under a name Windows does not allow; a base theme passed to --theme is named as a package theme, installed or not, with the command that adds it. Experimental: it may change or be removed in a patch release.","arguments":[{"name":"dir","required":true,"variadic":false,"description":""}],"options":[{"flag":"--theme <name>","description":"A theme made by experimental theme editor here: copied into the app, and the pages wear it (default: the app's own neutral theme)","type":"string"}],"json":true,"responseTypes":["themeEdit.previewApp"],"examples":["astryx experimental theme preview app theme-app","astryx experimental theme preview app theme-app --theme brand"],"exitCodes":[{"code":0,"when":"the app is written"},{"code":1,"when":"no <dir>, a folder that is not empty or is no place for an app, a folder outside the current one, an unknown theme, more than one folder, a failed write, or another command changing the theme that did not finish within 30 seconds (ERR_THEME_BUSY)"}],"outsideProject":"own"},{"name":"experimental theme preview list","description":"[experimental] Lists the pages of the theme preview, in nav order, with the theme they wear and the route folder. With no preview, and with no routes folder for one, it says so and how to add one (the JSON list is empty). A damaged theme-preview.json is refused with `ERR_THEME_INVALID`, naming the file. With no folder given and no preview in the default place, a preview recorded for a theme is listed; with several, the refusal names each. The tip repeats --path. `notes` says when the theme the preview wears is gone. Experimental: it may change or be removed in a patch release.","arguments":[],"options":[{"flag":"--path <dir>","description":"The folder of the preview route, when it is not in the default place","type":"string"}],"json":true,"responseTypes":["themeEdit.previewList"],"examples":["astryx experimental theme preview list"],"exitCodes":[{"code":0,"when":"the pages are listed (none included)"},{"code":1,"when":"outside a project, a damaged theme-preview.json, several recorded previews and no --path, or an argument"}],"outsideProject":"refuse"},{"name":"experimental theme preview remove","description":"[experimental] Removes one page and its nav item, and rewrites the route. With no page, or for the last page, it removes the whole preview: only the files the preview wrote (theme-preview.json lists them) are deleted, and the folder only when nothing else is in it. A path in theme-preview.json that leads outside the route folder is refused before anything is deleted. Only files the preview wrote are deleted: a page file it did not write, or one changed by hand since it wrote it (by the hash theme-preview.json records), is kept and named in `kept`, with a note; files already gone are named in `missing`, and the route and Colors page written again in `rewritten`. Every check runs before the first delete: the theme the route wears is loaded first, so a theme that does not load is refused with nothing deleted, and the refusal names the whole-preview remove, which needs no theme. A theme that is gone is replaced by the theme of the app itself, with a note. A page id matches in any case. A damaged theme-preview.json (not JSON, the wrong shape, a duplicate page, a folder or an absolute path in its files) is refused with `ERR_THEME_INVALID`, naming the file. With no folder given and no preview in the default place, a preview recorded for a theme is used. It takes one page; more arguments are refused. A whole remove stops, deleting nothing, when page.tsx was changed by hand: it imports the pages. A page whose file is gone leaves the nav, with a note. Refusals never suggest deleting files. Preview commands in one project run one after another. A remove deletes only the route file, the record and the page files of recorded pages (in _pages/, or pages/ for an older release), and only when a recorded hash shows they are as the preview wrote them: any other file the record names, and any file with no recorded hash, is kept and named, so a copied or edited record never deletes a project file. A route that stays keeps the pages it imports. Experimental: it may change or be removed in a patch release.","arguments":[{"name":"page","required":false,"variadic":false,"description":""}],"options":[{"flag":"--path <dir>","description":"The folder of the preview route, when it is not in the default place","type":"string"}],"json":true,"responseTypes":["themeEdit.previewRemove"],"examples":["astryx experimental theme preview remove components","astryx experimental theme preview remove"],"exitCodes":[{"code":0,"when":"the page or the preview is removed"},{"code":1,"when":"there is no preview, it has no such page, theme-preview.json is damaged or names a file outside the route folder, the theme the route wears does not load (ERR_THEME_INVALID, ERR_UNKNOWN_THEME, ERR_THEME_LOAD), another preview command did not finish within 30 seconds (ERR_THEME_BUSY), the route file was changed by hand, a write failed, more than one page, or outside a project"}],"outsideProject":"refuse"}]},{"name":"experimental theme remove","description":"[experimental] Remove a non-default theme from the app","arguments":[{"name":"slug","required":true,"variadic":false,"description":""}],"options":[],"json":true,"responseTypes":["theme.app"],"examples":["astryx experimental theme remove ocean"],"exitCodes":[{"code":0,"when":"the module is regenerated without the theme"},{"code":1,"when":"the theme is not added, is the default, or state is invalid"}],"outsideProject":"refuse"},{"name":"experimental theme targets","description":"[experimental] List the component theming targets a theme can override","arguments":[{"name":"filter","required":false,"variadic":false,"description":""}],"options":[],"json":true,"responseTypes":["theme.targets"],"examples":["astryx experimental theme targets","astryx experimental theme targets Switch","astryx experimental theme targets thumb","astryx --json experimental theme targets"],"exitCodes":[{"code":0,"when":"success"},{"code":1,"when":"a filter matches no target, or core cannot be resolved"}],"outsideProject":"same"},{"name":"experimental theme template","description":"[experimental] Write the annotated theme template into your project","arguments":[{"name":"path","required":false,"variadic":false,"description":""}],"options":[{"flag":"-f, --overwrite","description":"Replace an existing copy of the template or theme source file. Any other .ts file, such as util.ts, or a file the theme editor owns (named after its folder, beside its settings, such as themes/t/t.theme.ts), fails with ERR_FILE_EXISTS and is left as it was; an earlier template in that folder is replaced. A path that is not .ts, such as package.json, fails with ERR_INVALID_ARGUMENT, with or without --overwrite","type":"boolean"}],"json":true,"responseTypes":["theme.template"],"examples":["astryx experimental theme template","astryx experimental theme template src/themes/starter.ts"],"exitCodes":[{"code":0,"when":"success, including when an existing file was left untouched"},{"code":1,"when":"the target path escapes the project, is blank, a folder or not a .ts file, --overwrite names a file that is not a theme template or source, or the file cannot be written"}],"outsideProject":"same"},{"name":"experimental theme use","description":"[experimental] Choose the app default from its added themes","arguments":[{"name":"slug","required":true,"variadic":false,"description":""}],"options":[],"json":true,"responseTypes":["theme.app"],"examples":["astryx experimental theme use ocean"],"exitCodes":[{"code":0,"when":"the module is regenerated with the selected default"},{"code":1,"when":"the theme is not added or state is invalid"}],"outsideProject":"refuse"}]}]},{"name":"gap-report","description":"Report a missing component or feature to the package that owns it","arguments":[{"name":"component","required":false,"variadic":false,"description":"Component or design-system area the gap is about, up to 120 characters. Required unless --list-categories is set."}],"options":[{"flag":"--category <category>","description":"Gap category (run --list-categories for values). Required unless --list-categories is set.","type":"string"},{"flag":"--reason <reason>","description":"What capability was missing or difficult, up to 2000 characters. Required unless --list-categories is set.","type":"string"},{"flag":"--additional-context <text>","description":"Optional additional context, up to 8000 characters","type":"string"},{"flag":"--package <pkg>","description":"Package that owns the gap: @astryxdesign/core or a loaded integration. Overrides automatic routing, which picks the integration whose component replaces the named Core component, else the one package that provides it, else Core; needed when more than one package provides the component","type":"string"},{"flag":"--confirm-public","description":"Allow public delivery: public handlers run, and a GitHub issues URL gets an issue filed with your gh login","type":"boolean"},{"flag":"--to <package>","description":"Send the report only to this loaded integration's issues URL, as the person chose; the destinations the output lists are the choices","type":"string"},{"flag":"--list-categories","description":"List valid report categories, and the destinations when there is more than one, without filing; the component and the other gap-report options are refused with ERR_INVALID_ARGUMENT","type":"boolean"}],"json":true,"responseTypes":["gap-report.categories","gap-report.file"],"examples":["astryx gap-report --list-categories","astryx gap-report Button --category missing_variant --reason 'Need a compact size'","astryx gap-report Button --category missing_variant --reason 'Need a compact size' --to @acme/widgets"],"exitCodes":[{"code":0,"when":"filed, routed-only, confirmation required, skipped, or categories listed"},{"code":1,"when":"failed or partial delivery, invalid input, or ambiguous routing"}],"outsideProject":"same"},{"name":"hook","description":"List hooks or print hook docs","arguments":[{"name":"name","required":false,"variadic":false,"description":""}],"options":[{"flag":"--list","description":"List all hooks grouped by category","type":"boolean"},{"flag":"--category <category>","description":"List hooks in a specific category","type":"string"},{"flag":"--params","description":"Print only the parameters table","type":"boolean"}],"json":true,"responseTypes":["hook.list","hook.detail","hook.detail.params"],"examples":["astryx hook --list","astryx hook useFocusTrap --json"],"exitCodes":[{"code":0,"when":"success"},{"code":1,"when":"unknown hook or category, or @astryxdesign/core cannot be resolved"}],"outsideProject":"same"},{"name":"init","description":"Initialize the design system in your project","arguments":[],"options":[{"flag":"--features <list>","description":"Comma-separated features: agents (agent docs), theme (writes theme.template.ts), template (prints the page-building commands; writes no file). An unknown feature exits 1 with ERR_UNKNOWN_FEATURE. Refused with --all or --remove-agents","type":"string"},{"flag":"--all","description":"Install all features (agents, theme, template); refused with --features. Prints their guidance instead of the getting-started steps","type":"boolean"},{"flag":"--remove-agents","description":"Remove the managed block from AGENTS.md, CLAUDE.md, .claude/CLAUDE.md, GEMINI.md, .cursorrules, .hermes.md and HERMES.md, at the project root (where init writes them) and in this folder (deleting AGENTS.md or .claude/CLAUDE.md when only init's heading is left, and GEMINI.md when nothing is left) and do nothing else. Below the project root, a project-root agent file whose block resolves outside the project is left as it is, with a note. --features, --all, --agent and --agent-docs-path are refused; a file written with --agent-docs-path keeps its block","type":"boolean"},{"flag":"--user","description":"Write or refresh the computer-level agent text instead of setting up the folder: one skill file, ~/.agents/skills/astryx/SKILL.md, which most coding agents read, linked into the skill folders of agents that read only their own (~/.claude/skills always; Kiro, Windsurf, Letta, Xcode's coding assistant, and ~/.config/agents/skills when that folder exists): a folder symlink with a relative target, a junction on Windows, or a copy where neither can be made. Continue, whose scanner skips links, gets a managed copy, refreshed with the file. It tells agents anywhere on the computer that Astryx is there, when it is relevant, and to start with `astryx search`. Records the links it made in astryx/settings.json in the per-user configuration folder, so removal removes exactly those; the CLI installed for the computer refreshes the file in the background after each upgrade. Works in any folder. A file without the Astryx markers, one edited since Astryx wrote it, or a symlink, is kept as it is, and so is anything at a link target that Astryx did not create. Warns, and still writes, when no `astryx` command on the computer runs the Astryx CLI. With --remove-agents it removes the file, the links, and the copy instead and records that the text is turned off. --features, --all, --agent and --agent-docs-path are refused","type":"boolean"},{"flag":"--agent <tool>","description":"Target AI tool for agent docs: claude (CLAUDE.md or .claude/CLAUDE.md, else creates .claude/CLAUDE.md), cursor (.cursorrules if present, else AGENTS.md), codex and muse (AGENTS.md), hermes (.hermes.md or HERMES.md if present, else AGENTS.md), all (every existing agent doc except GEMINI.md, which keeps its one-line import of AGENTS.md, else AGENTS.md and .claude/CLAUDE.md). With claude and all, when CLAUDE.md gets the block, .claude/CLAUDE.md gets none and a block already there is removed, unless the project ignores CLAUDE.md: then a .claude/CLAUDE.md the project commits gets a copy too, with claude and all alike. An unknown tool exits 1 with ERR_UNKNOWN_AGENT. Used only when agent docs are installed (the default, --all, or --features agents); --agent-docs-path takes precedence.","type":"string"},{"flag":"--agent-docs-path <path...>","description":"Explicit file path(s) for agent docs, inside the project; takes precedence over --agent. If any path is outside the project, no agent docs are written and the command exits 1. A path in the home folder itself, or in a settings folder in it outside a project (such as ~/.claude or ~/.claude/hooks), is refused with a note (exit 0), and nothing is written. Used only when agent docs are installed","type":"string"}],"json":true,"responseTypes":["init.run","init.remove","init.user"],"examples":["astryx init","astryx init --all","astryx init --json","astryx init --user","astryx init --user --remove-agents"],"exitCodes":[{"code":0,"when":"success, including agent docs left unwritten in five soft cases, each reported as docsError with one note: running in the home folder, or in a settings folder in it outside a project; a GEMINI.md that resolves outside the project; when init runs below the project root, a project-root agent file that resolves outside the project; the project's Claude Code file (root CLAUDE.md, or .claude/CLAUDE.md when there is no root one) when it resolves outside the project and is a block-less import of an existing AGENTS.md, which 0.7.1 left alone; and a .claude/CLAUDE.md that resolves outside the project and that 0.7.1 did not write: beside a CLAUDE.md the project ignores, the one --agent claude adds or a block-less import of an existing AGENTS.md; with --agent claude beside a CLAUDE.md, one whose block it would remove"},{"code":1,"when":"an unknown --agent (ERR_UNKNOWN_AGENT) or feature, an --agent-docs-path outside the project, --remove-agents combined with install options, --user combined with --features, --all, --agent or --agent-docs-path, or --all with --features (ERR_INVALID_ARGUMENT); or, when init runs at the project root, an agent file 0.7.1 also wrote there that resolves outside the project (ERR_PATH_TRAVERSAL, docsError path-safety, nothing written)"}],"outsideProject":"own"},{"name":"integration","description":"Author and verify an Astryx integration package","arguments":[],"options":[],"json":false,"examples":["astryx integration add component AcmeWidget","astryx integration check --strict","astryx integration verify"],"exitCodes":[{"code":0,"when":"help is shown or a subcommand succeeds"},{"code":1,"when":"an unknown subcommand is provided"}],"subcommands":[{"name":"integration add","description":"Add one working contribution to an integration package","arguments":[{"name":"kind","required":true,"variadic":false,"description":"component, doc, template, codemod, agent-doc, or theme"},{"name":"name","required":true,"variadic":false,"description":"Contribution name: PascalCase for component (AcmeWidget); lowercase kebab-case for template, codemod, and theme (account-card); letters, digits, _ and - for doc; the literal guidance line for agent-doc"}],"options":[{"flag":"--dry-run","description":"Validate and show planned writes without changing files","type":"boolean"},{"flag":"--type <type>","description":"Template type: page (default) or block; only valid for template","type":"string"},{"flag":"--replaces <topic>","description":"Existing doc topic this one replaces (letters, digits, _ and -); only valid for doc and not with --extends","type":"string"},{"flag":"--extends <topic>","description":"Existing doc topic this one extends (letters, digits, _ and -); only valid for doc and not with --replaces","type":"string"},{"flag":"--parent <namespace>","description":"Namespace of this package to place the doc in, as a guide in its `guides` slot; writes the namespace doc when it is missing, and declares the CLI that reads it as an optional `@astryxdesign/cli` peer. Only valid for doc, and not with --replaces or --extends","type":"string"},{"flag":"--from <theme>","description":"Existing theme slug to fork as a starting point instead of a blank scaffold; the new theme copies the base and has no link back, and package.json `dependencies` gains the npm packages the copied files import (other than Core and React). Only valid for theme","type":"string"},{"flag":"--to <version>","description":"Exact semver of the @astryxdesign/core version whose upgrade runs the codemod (e.g. 0.7.0); required for codemod and only valid there","type":"string"}],"json":true,"responseTypes":["integration.add"],"examples":["astryx integration add component AcmeWidget --dry-run --json","astryx integration add component AcmeWidget","astryx integration add doc deploying","astryx integration add template acme-dashboard","astryx integration add template account-card --type block","astryx integration add doc acme-getting-started --replaces getting-started","astryx integration add doc acme-theming --extends theme","astryx integration add doc releasing --parent acme","astryx integration add codemod rename-widget --to 1.2.0","astryx integration add agent-doc 'Run acme verify before finishing.'","astryx integration add theme ocean","astryx integration add theme ocean --from neutral"],"exitCodes":[{"code":0,"when":"the contribution is written or the dry run succeeds"},{"code":1,"when":"the kind, name, options, package, or target files are invalid or conflict"}],"outsideProject":"refuse"},{"name":"integration check","description":"The CI check for an integration package's own build: every source check, run in continuous integration or a typecheck script, against the package in the current folder","arguments":[],"options":[{"flag":"--strict","description":"Also exit 1 on any warning and on any check that did not run. A new check or failure code joins only in a minor release, named in the release notes; until then, a malformed `cliCommand` is reported as a note (`invalid_cli_command`) that fails nothing.","type":"boolean"},{"flag":"--next","description":"Also count the findings the next minor release turns into warnings (the notes marked `next`) as warnings now, so `--strict --next` fails on them. Run it to fix them ahead of the release; every run says how many there are.","type":"boolean"}],"json":true,"responseTypes":["integration.check"],"examples":["integration check --strict","integration check","integration check --strict --next","integration check --strict --json","integration verify"],"exitCodes":[{"code":0,"when":"no check fails on its own; with --strict, also no warning, and every check ran"},{"code":1,"when":"a check fails on its own (an error); with --strict, also any warning, or a check that did not run"}],"outsideProject":"own"},{"name":"integration pack","description":"Deprecated: the old name of `integration verify`","arguments":[],"options":[{"flag":"--check","description":"Run the check. Required, as before.","type":"boolean"}],"json":true,"responseTypes":["integration.pack-check"],"examples":["astryx integration pack --check"],"exitCodes":[{"code":0,"when":"the packed package exposes the same valid contributions"},{"code":1,"when":"--check is omitted or the tarball is incomplete or invalid"}],"outsideProject":"own"},{"name":"integration verify","description":"Check the package the way npm will publish it, before you publish","arguments":[],"options":[],"json":true,"responseTypes":["integration.pack-check"],"examples":["astryx integration verify","astryx integration verify --json"],"exitCodes":[{"code":0,"when":"the packed package exposes the same valid contributions"},{"code":1,"when":"the tarball is incomplete or invalid"}],"outsideProject":"own"}]},{"name":"manifest","description":"Print the full CLI capability manifest (use with --json)","arguments":[],"options":[],"json":true,"responseTypes":["manifest"],"examples":["astryx manifest --json","astryx --json"],"exitCodes":[{"code":0,"when":"success"},{"code":1,"when":"the manifest cannot be generated"}],"outsideProject":"same"},{"name":"search","description":"Search components, hooks, docs, templates, and themes in one ranked list","arguments":[{"name":"query","required":true,"variadic":true,"description":""}],"options":[{"flag":"--type <domain>","description":"Filter to one domain (component|hook|doc|template|theme)","type":"string"},{"flag":"--limit <n>","description":"Max number of results, a positive integer (default 20)","type":"string"},{"flag":"--verbose","description":"Also print each result's score and match reason","type":"boolean"}],"json":true,"responseTypes":["search"],"examples":["astryx search button","astryx search dark mode --type doc","astryx search \"data table\" --type template --json","astryx search warm --type theme"],"exitCodes":[{"code":0,"when":"success (including zero matches)"},{"code":1,"when":"invalid --type, a --limit that is not a positive integer, or --type component, hook, or template where @astryxdesign/core cannot be found"}],"outsideProject":"same"},{"name":"swizzle","description":"Copy component source for customization","arguments":[{"name":"component","required":false,"variadic":false,"description":""}],"options":[{"flag":"--output <dir>","description":"Output directory","type":"string","default":"./components/astryx"},{"flag":"--package <pkg>","description":"Scope to a specific owning package. Use @astryxdesign/core to copy an original replaced by an integration component","type":"string"},{"flag":"--list","description":"List the swizzlable Core components, including any that an integration component replaces","type":"boolean"},{"flag":"-f, --overwrite","description":"Replace the component's existing files. Without it, existing files fail the command with ERR_FILE_EXISTS and nothing is written. A helper an earlier swizzle wrote is reused when it is the same and is never replaced by a copy that carries it: a different one stays, and this copy writes its own under a version-suffixed name. Swizzling the component whose folder holds that helper counts it as one of that component's own files. A changed private attribute owner module, or a style module it imports, fails the command without --overwrite and is replaced with it","type":"boolean"}],"json":true,"responseTypes":["swizzle.list","swizzle.copy"],"examples":["astryx swizzle --list","astryx swizzle Button","astryx swizzle SideNav --package @astryxdesign/core"],"exitCodes":[{"code":0,"when":"success"},{"code":1,"when":"unknown or ambiguous component, no source on disk, a path escape, or existing files without --overwrite"}],"outsideProject":"refuse"},{"name":"template","description":"List, show, or scaffold page and block templates","arguments":[{"name":"name","required":false,"variadic":false,"description":"Template id (see --list). Omit it to list the templates."},{"name":"path","required":false,"variadic":false,"description":"Where to scaffold the template, relative to the project root. A path that ends in .tsx, .ts, .jsx, .js, .mjs, .cjs, .css, .scss, .json, .md or .html is the file to write; any other path is a directory, which receives page.tsx for a page template or the block's own file name for a block. Omit it to print the source."}],"options":[{"flag":"--list","description":"List available templates (narrow with --type and --package) and do nothing else: <name>, <path>, --skeleton and --overwrite are refused","type":"boolean"},{"flag":"--type <type>","description":"Filter by template type: page or block","type":"string"},{"flag":"--package <pkg>","description":"Narrow to templates from a specific package. Use @astryxdesign/core to select an original hidden by an integration replacement.","type":"string"},{"flag":"--skeleton","description":"Show layout skeleton with spatial annotations (padding, gap, nesting) instead of the source. Needs <name>. It writes nothing, so <path> and --overwrite are refused with ERR_INVALID_ARGUMENT","type":"boolean"},{"flag":"--cdn [path]","description":"Write the no-build-step CDN starter page and do nothing else: <name>, --list, --skeleton, --type and --package are refused. The page goes to the --cdn value, else to <path>, else cdn.template.html, and that path is always the file itself. A value right after --cdn (anything not starting with -) is taken as that path","type":"string"},{"flag":"-f, --overwrite","description":"Replace an existing target file. Without it an existing file is refused (ERR_FILE_EXISTS) and an existing CDN page is left as is","type":"boolean"}],"json":true,"responseTypes":["template.list","template.show","template.skeleton","template.copy","template.cdn"],"examples":["astryx template --json","astryx --json template --list --package @astryxdesign/core","astryx template dashboard ./src/app","astryx template shell-side-nav ./src/app --package @astryxdesign/core","astryx template --cdn","astryx template --cdn public/demo.html"],"exitCodes":[{"code":0,"when":"success, including a CDN page left untouched because it already exists"},{"code":1,"when":"unknown or ambiguous template, no source, a path escape, an existing target without --overwrite, or --list with a type outside page or block or a package that provides no templates"}],"outsideProject":"same"},{"name":"theme","description":"Add, switch, build, and author themes (to make or change one, use experimental theme editor)","arguments":[],"options":[],"json":false,"examples":["astryx experimental theme editor new brand --like neutral","astryx theme list","astryx theme add ocean","astryx theme use ocean","astryx theme eject ocean","astryx theme palette generate palette.config.json","astryx theme targets"],"exitCodes":[{"code":0,"when":"help is shown or a subcommand succeeds"},{"code":1,"when":"an unknown subcommand or a subcommand failure"}],"subcommands":[{"name":"theme add","description":"Add a built theme to the app. To copy a theme's source as an editable fork, run `theme eject <slug> [path] [--overwrite]`.","arguments":[{"name":"slug","required":false,"variadic":false,"description":""}],"options":[{"flag":"--list","description":"List available themes","type":"boolean"},{"flag":"--import","description":"Compatibility no-op; the built theme is added with or without this flag","type":"boolean"},{"flag":"--package <package>","description":"Select the package that owns the theme","type":"string"}],"json":true,"responseTypes":["theme.app","theme.list"],"examples":["astryx theme add ocean","astryx theme add ocean --package @acme/themes"],"exitCodes":[{"code":0,"when":"the theme is listed or added"},{"code":1,"when":"the theme, its built imports, its record, or the option combination is invalid"}],"outsideProject":"own"},{"name":"theme build","description":"Compile standalone themes or one keyed theme family","arguments":[{"name":"files","required":true,"variadic":true,"description":""}],"options":[{"flag":"--family","description":"Build the selected extension family into one keyed CSS, JS, and declaration set, written beside the family root theme file, which must be inside the working directory to build (ERR_PATH_TRAVERSAL); --check only reads, so it compares outputs anywhere. Requires --family-key; refused with --out or --watch (ERR_THEME_INVALID)","type":"boolean"},{"flag":"--family-key <key>","description":"Lower-kebab filename stem required with --family and refused without it; must differ from every member name (ERR_THEME_INVALID)","type":"string"},{"flag":"-o, --out <path>","description":"Output CSS file path, relative or absolute; the .js and .d.ts are written beside it (default: <theme name>.css next to the source). A folder, or a path ending in /, writes <theme name>.css into it. The path should end in .css; another name still builds, with a warning. A build never replaces the theme source (ERR_THEME_INVALID). At a path --out names, it replaces its own earlier outputs, and the output of another theme source with a warning that names both sources; any other existing file fails with ERR_FILE_EXISTS and nothing is written. Into a folder the theme editor made (folder <slug>/ holds <slug>.settings.json), a source outside that folder builds there too, with a warning; to keep the editor folder to its own theme, build beside the source, or pass an --out outside it. A build writes only inside the working directory, the defaults beside the source too (ERR_PATH_TRAVERSAL); --check writes nothing, so it compares outputs anywhere and refuses only a relative path that escapes the working directory. Single theme only: refused with more than one file or with --family (ERR_THEME_INVALID)","type":"string"},{"flag":"--icons-specifier <specifier>","description":"Override the icon-registry import in the generated JS module, for example ./icons.mjs (default: the specifier in the theme source's own import). With --family it applies to every member's icon import","type":"string"},{"flag":"-w, --watch","description":"Rebuild automatically when the theme source, or a local file it imports, changes (Ctrl-C to stop). Refused with --check, --family, or --json (ERR_THEME_INVALID)","type":"boolean"},{"flag":"-c, --check","description":"Verify the committed outputs match the source without writing; exit non-zero if stale. Composes with --family and several files; refused with --watch (ERR_THEME_INVALID)","type":"boolean"}],"json":true,"responseTypes":["theme.build","theme.build.check","theme.build.batch"],"examples":["astryx theme build ./src/themes/ocean.ts --out ./dist/ocean.css","astryx theme build --family ./themes/ocean.mjs ./themes/ocean-calm.mjs --family-key ocean-family","astryx theme build ./src/themes/*.ts","astryx theme build ./src/themes/ocean.ts --check","astryx theme build ./src/themes/ocean.ts --icons-specifier ./icons.mjs"],"exitCodes":[{"code":0,"when":"the theme builds, or --check finds the outputs up to date"},{"code":1,"when":"a build or validation error (an error envelope), or --check finds stale or missing outputs (the check result, with upToDate false, the stale files and code ERR_THEME_STALE)"}],"outsideProject":"same"},{"name":"theme eject","description":"Fork a theme as editable local source","arguments":[{"name":"slug","required":true,"variadic":false,"description":""},{"name":"path","required":false,"variadic":false,"description":""}],"options":[{"flag":"-f, --overwrite","description":"Replace the existing files of an earlier fork of the same theme. Without it, an existing file fails with ERR_FILE_EXISTS and nothing is written","type":"boolean"},{"flag":"--package <package>","description":"Select the package that owns the theme","type":"string"}],"json":true,"responseTypes":["theme.eject"],"examples":["astryx theme eject ocean","astryx theme eject ocean src/themes/my-ocean --package @acme/themes"],"exitCodes":[{"code":0,"when":"all source and descriptor files are written"},{"code":1,"when":"the theme is unknown or ambiguous, a path escapes, a source file is missing, a destination exists, or the folder holds another theme"}],"outsideProject":"same"},{"name":"theme list","description":"List themes available to add","arguments":[],"options":[{"flag":"--package <package>","description":"Show only themes owned by this package","type":"string"}],"json":true,"responseTypes":["theme.list"],"examples":["astryx theme list --json","astryx theme list --package @acme/themes"],"exitCodes":[{"code":0,"when":"success"},{"code":1,"when":"a bundled or installed theme descriptor cannot be read, or the generated theme module exists and its record cannot be read"}],"outsideProject":"same"},{"name":"theme palette","description":"Create and work with theme-owned color palettes","arguments":[],"options":[],"json":false,"examples":["astryx theme palette generate palette.config.json"],"exitCodes":[{"code":0,"when":"help is shown or a subcommand succeeds"},{"code":1,"when":"an unknown subcommand is provided"}],"subcommands":[{"name":"theme palette generate","description":"Generate an OKLCH palette candidate for human review","arguments":[{"name":"config","required":true,"variadic":false,"description":""}],"options":[{"flag":"-o, --out <path>","description":"Write a candidate TypeScript or JSON file and a sibling receipt","type":"string"},{"flag":"--preview <path>","description":"Write a self-contained HTML preview page; the path must end in .html","type":"string"},{"flag":"-f, --overwrite","description":"Replace existing candidate, receipt, and preview files. Without it, if any of them exists, nothing is written","type":"boolean"}],"json":true,"responseTypes":["theme.palette.generate"],"examples":["astryx theme palette generate themes/ocean/palette.config.json","astryx theme palette generate themes/ocean/palette.config.json --out themes/ocean/tokens/ocean.palette.ts","astryx theme palette generate themes/ocean/palette.config.json --out themes/ocean/tokens/ocean.palette.ts --preview themes/ocean/tokens/ocean.palette.html"],"exitCodes":[{"code":0,"when":"a candidate is produced or existing output is left untouched"},{"code":1,"when":"the request is invalid or output cannot be written safely"}],"outsideProject":"same"}]},{"name":"theme remove","description":"Remove a non-default theme from the app","arguments":[{"name":"slug","required":true,"variadic":false,"description":""}],"options":[],"json":true,"responseTypes":["theme.app"],"examples":["astryx theme remove ocean"],"exitCodes":[{"code":0,"when":"the module is regenerated without the theme"},{"code":1,"when":"the theme is not added, is the default, or state is invalid"}],"outsideProject":"refuse"},{"name":"theme targets","description":"List the component theming targets a theme can override","arguments":[{"name":"filter","required":false,"variadic":false,"description":""}],"options":[],"json":true,"responseTypes":["theme.targets"],"examples":["astryx theme targets","astryx theme targets Switch","astryx theme targets thumb","astryx --json theme targets"],"exitCodes":[{"code":0,"when":"success"},{"code":1,"when":"a filter matches no target, or core cannot be resolved"}],"outsideProject":"same"},{"name":"theme template","description":"Write the annotated theme template into your project","arguments":[{"name":"path","required":false,"variadic":false,"description":""}],"options":[{"flag":"-f, --overwrite","description":"Replace an existing copy of the template or theme source file. Any other .ts file, such as util.ts, or a file in a folder the theme editor made, fails with ERR_FILE_EXISTS and is left as it was. A path that is not .ts, such as package.json, fails with ERR_INVALID_ARGUMENT, with or without --overwrite","type":"boolean"}],"json":true,"responseTypes":["theme.template"],"examples":["astryx theme template","astryx theme template src/themes/starter.ts"],"exitCodes":[{"code":0,"when":"success, including when an existing file was left untouched"},{"code":1,"when":"the target path escapes the project, is blank, a folder or not a .ts file, --overwrite names a file that is not a theme template or source, or the file cannot be written"}],"outsideProject":"same"},{"name":"theme use","description":"Choose the app default from its added themes","arguments":[{"name":"slug","required":true,"variadic":false,"description":""}],"options":[],"json":true,"responseTypes":["theme.app"],"examples":["astryx theme use ocean"],"exitCodes":[{"code":0,"when":"the module is regenerated with the selected default"},{"code":1,"when":"the theme is not added or state is invalid"}],"outsideProject":"refuse"}]},{"name":"upgrade","description":"Update your code after upgrading Astryx, and refresh ShadCN-copied components","arguments":[],"options":[{"flag":"--from <version>","description":"Previous version before the dependency upgrade; required unless --list or --registry is set. The target is the installed @astryxdesign/core version, or legacy @xds/core when @astryxdesign/core is not installed","type":"string"},{"flag":"--apply","description":"Write changes to disk; without it, the run is a dry run","type":"boolean","default":false},{"flag":"--force","description":"Run codemods even if --from is newer than the installed version","type":"boolean","default":false},{"flag":"--codemod <name>","description":"Run only the named codemod. Optional codemods run only when named here; a normal run skips them. Also skips the check of ShadCN-copied compositions. An unknown name exits 1 with ERR_UNKNOWN_CODEMOD when the version range has codemods","type":"string"},{"flag":"--skip-codemod <name...>","description":"Exclude named codemods (repeatable). Re-run past a failed codemod by skipping it.","type":"string"},{"flag":"--integration <package>","description":"Explicit integration specifier (repeatable). Resolved beneath node_modules; absolute paths and `.` or `..` segments are rejected.","type":"string","default":[]},{"flag":"--path <dir>","description":"Source directory to scan, relative to where you run the command, however you spell it. Without --path, the project's src folder, from any folder in the project","type":"string","default":"./src at the project root"},{"flag":"--install-deps","description":"Install jscodeshift when it is missing. Without it, a missing jscodeshift fails the command with ERR_DEP_MISSING","type":"boolean","default":false},{"flag":"--registry","description":"Only update ShadCN-copied compositions from their install receipts: unchanged files are updated, edits that do not overlap are merged, and conflicts are left untouched; --from is not required. Combining it with --list, --from, --force, --codemod, --skip-codemod, --integration or --install-deps exits 1 with ERR_INVALID_ARGUMENT","type":"boolean","default":false},{"flag":"--list","description":"List available codemods and do nothing else. Every other flag is refused, as is --registry (exit 1)","type":"boolean","default":false}],"json":true,"responseTypes":["upgrade.list","upgrade.registry","upgrade.status","upgrade.run"],"examples":["astryx upgrade --list --json","astryx upgrade --registry --apply","astryx upgrade --from 0.1.0 --apply"],"exitCodes":[{"code":0,"when":"success, including complete dry-run previews and runs whose only findings are manual migrations"},{"code":1,"when":"missing or invalid --from, --registry with --list or a migration flag, a --path escape, no installed @astryxdesign/core (or legacy @xds/core), jscodeshift missing and not installed by --install-deps, an astryx.config that fails validation and that no pending config codemod repairs, an unreadable or invalid protection declaration, a protected file that still requires a codemod change, a generated file that must be regenerated, an unknown codemod, a codemod or post-codemod hook failure, or unresolved registry items"}],"outsideProject":"own"}],"jsonSupported":["blog","build","component","discover","docs","doctor","doctor integration components","doctor integration docs","doctor integration templates","doctor integration validate","experimental icon","experimental icon add","experimental icon map","experimental icon new-definition","experimental icon new-set","experimental icon use","experimental render","experimental theme","experimental theme add","experimental theme compile","experimental theme editor","experimental theme editor how","experimental theme editor new","experimental theme editor set","experimental theme editor show","experimental theme editor undo","experimental theme eject","experimental theme list","experimental theme preview","experimental theme preview add","experimental theme preview app","experimental theme preview list","experimental theme preview remove","experimental theme remove","experimental theme targets","experimental theme template","experimental theme use","gap-report","hook","init","integration add","integration check","integration pack","integration verify","manifest","search","swizzle","template","theme add","theme build","theme eject","theme list","theme palette generate","theme remove","theme targets","theme template","theme use","upgrade"],"globalMode":{"docs":"astryx docs global","summary":"In a folder that belongs to a project, the project's own CLI answers: this copy hands the run to it. In a project with no CLI of its own, and outside any project, this copy answers. A copy installed for the computer checks the registry for a newer release once a day in the background, and keeps one agent skill file in the home folder."},"responseTypes":{"blog":["blog.list","blog.detail"],"build":["build.help","build.kit"],"component":["component.list","component.batch","component.detail","component.detail.props","component.detail.source","component.detail.showcase","component.detail.blocks"],"discover":["discover.list","discover.detail","discover.detail.doc","discover.item","discover.search"],"docs":["docs.list","docs.detail","docs.index","docs.detail.section","docs.node"],"doctor":["doctor"],"doctor integration components":["integration.component-conflicts"],"doctor integration docs":["integration.doc-conflicts"],"doctor integration templates":["integration.template-conflicts"],"doctor integration validate":["integration.validate"],"experimental icon":["icon.search","icon.detail","icon.definitions","icon.setIcons","icon.list"],"experimental icon add":["icon.add","icon.addVariants","icon.definitionMatches"],"experimental icon map":["icon.mapMany","icon.map"],"experimental icon new-definition":["icon.newDefinition"],"experimental icon new-set":["icon.newSet"],"experimental icon use":["icon.use"],"experimental render":["render.page","render.reverse"],"experimental theme":["help"],"experimental theme add":["theme.app"],"experimental theme compile":["theme.build","theme.build.check"],"experimental theme editor":["help"],"experimental theme editor how":["themeEdit.how"],"experimental theme editor new":["themeEdit.new"],"experimental theme editor set":["themeEdit.set"],"experimental theme editor show":["themeEdit.show"],"experimental theme editor undo":["themeEdit.undo"],"experimental theme eject":["theme.eject"],"experimental theme list":["theme.list"],"experimental theme preview":["help"],"experimental theme preview add":["themeEdit.previewAdd"],"experimental theme preview app":["themeEdit.previewApp"],"experimental theme preview list":["themeEdit.previewList"],"experimental theme preview remove":["themeEdit.previewRemove"],"experimental theme remove":["theme.app"],"experimental theme targets":["theme.targets"],"experimental theme template":["theme.template"],"experimental theme use":["theme.app"],"gap-report":["gap-report.categories","gap-report.file"],"hook":["hook.list","hook.detail","hook.detail.params"],"init":["init.run","init.remove","init.user"],"integration add":["integration.add"],"integration check":["integration.check"],"integration pack":["integration.pack-check"],"integration verify":["integration.pack-check"],"manifest":["manifest"],"search":["search"],"swizzle":["swizzle.list","swizzle.copy"],"template":["template.list","template.show","template.skeleton","template.copy","template.cdn"],"theme add":["theme.app","theme.list"],"theme build":["theme.build","theme.build.check","theme.build.batch"],"theme eject":["theme.eject"],"theme list":["theme.list"],"theme palette generate":["theme.palette.generate"],"theme remove":["theme.app"],"theme targets":["theme.targets"],"theme template":["theme.template"],"theme use":["theme.app"],"upgrade":["upgrade.list","upgrade.registry","upgrade.status","upgrade.run"]}}