React

Commands

Guide to @seed-design/cli commands.

Common Behavior

  • Node.js 20.19.0 or higher is required to run the CLI.
  • add and add-all use the seed-design.json configuration file.
  • If the configuration file is missing or unreadable, it first asks whether to create one.
  • Required npm package dependencies are automatically installed when adding items.
  • When running add or add-all, if the snippet's required seed-design package version differs from the current project version, a warning is shown. (React: @seed-design/react, @seed-design/css / Lynx: @seed-design/lynx-react, @seed-design/lynx-css)
  • If an existing file has different content, by default you can choose Overwrite / Backup and Replace / Skip.
  • You can fix the conflict handling method in advance by providing the --on-diff option.
  • Use the --verbose option to see detailed information about the cause of failure.

init

A command to create the seed-design.json file.

Configuration

Learn about the seed-design.json file.

npx @seed-design/cli@latest init

Configure seed-design

◇  Do you use TypeScript?
│  Yes
│
◇  Do you use React Server Components?
│  No
│
◇  Which framework do you use?
│  React
│
◇  Enter the seed-design folder path. (The default is the project root.)
│  ./seed-design
│
◇  Collect anonymous usage data for improvements?
│  Yes

Options

OptionDescription
-c, --cwd <cwd>Working directory. Default is current directory
-y, --yesCreate seed-design.json with defaults without questions
--defaultDeprecated. Same as --yes, creates with defaults
--verbosePrint detailed error information including stack trace on failure
-h, --helpPrint help
npx @seed-design/cli@latest init --yes

add

A command to download and add snippets to your project.

Snippet

Learn about snippets that help with reusing commonly used UI patterns.

npx @seed-design/cli@latest add [...item-ids]

If you omit item-ids, you can interactively select items to download.

npx @seed-design/cli@latest add
◆  Select items to add (multiple selection available with space)
│  ◻ ui:action-button
│  ◻ ui:alert-dialog
│  ◻ ui:callout
│  ◻ ui:checkbox
│  ◻ ui:switch
│  ◻ ui:text-field
│  ◻ ui:tabs
│  ◻ (deprecated) ui:old-component
│  ◻ ...
└

You can also specify multiple items directly.

npx @seed-design/cli@latest add ui:action-button ui:alert-dialog

Options

OptionDescription
-c, --cwd <cwd>Working directory. Default is current directory
-u, --baseUrl <baseUrl>Registry base URL
--seed-react-version <version>Use registry for specified Crispy React version (e.g., 1.2). Takes precedence over --baseUrl/--framework
-f, --framework <framework>Target framework (react or lynx). Overrides framework value in config
--on-diff <mode>Specify file conflict handling mode (overwrite or backup)
-a, --allDeprecated. Currently outputs an error and recommends using add-all
--verbosePrint detailed error information including stack trace on failure
-h, --helpPrint help

Getting snippets for your version

If you need snippets compatible with the Crispy package version installed in your project, use the version option. The CLI automatically finds the registry address where that version is deployed.

npx @seed-design/cli@latest add --seed-react-version 1.2 ui:action-button

The version option determines base URL and framework (react) together, so it takes precedence over --baseUrl / --framework.

Specifying baseUrl directly

To specify the registry address directly, use --baseUrl. The default is https://crispy.carrot-soft.tech for the production environment.

npx @seed-design/cli@latest add --baseUrl https://v1-2.crispy.carrot-soft.tech

File conflict handling

If you don't specify --on-diff, when an existing file differs from a new snippet, you can choose one of the following:

  • Overwrite
  • Backup existing file as legacy-<filename>-<timestamp> and replace
  • Skip

add-all

A command to add items from a registry at once.

npx @seed-design/cli@latest add-all [...registry-ids]

To add all items from all registries, use the --all option.

npx @seed-design/cli@latest add-all --all # Add all items from all registries

You can also add all items from a specific registry.

npx @seed-design/cli@latest add-all breeze # Add all items from breeze registry

To include deprecated items, use the --include-deprecated option.

npx @seed-design/cli@latest add-all ui --include-deprecated # Add all items from ui registry (including deprecated)

If you omit both registry IDs and --all, you can interactively select registries to add.

Options

OptionDescription
-a, --allAdd all items from all registries
--include-deprecatedInclude deprecated items
-c, --cwd <cwd>Working directory. Default is current directory
-u, --baseUrl <baseUrl>Registry base URL
--seed-react-version <version>Use registry for specified Crispy React version (e.g., 1.2). Takes precedence over --baseUrl/--framework
-f, --framework <framework>Target framework (react or lynx). Overrides framework value in config
--on-diff <mode>Specify file conflict handling mode (overwrite or backup)
--verbosePrint detailed error information including stack trace on failure
-h, --helpPrint help

compat

Checks if the seed-design package version in your current project is compatible with the version required by snippets. The target package varies depending on the platform. (React: @seed-design/react, @seed-design/css / Lynx: @seed-design/lynx-react, @seed-design/lynx-css)

npx @seed-design/cli@latest compat

By default, it only checks snippets already added under the path in seed-design.json.

If there's a compatibility issue, it exits with code 1; if there's no problem, it exits with 0, so it can be used directly in CI/agent environments.

You can also check specific items only.

npx @seed-design/cli@latest compat ui:action-button ui:alert-dialog

When using component shorthand, use the -c option.

npx @seed-design/cli@latest compat -c action-button -c alert-dialog

To check all registry items, use --all.

npx @seed-design/cli@latest compat --all

Options

OptionDescription
-c, --component <component>Component ID to check. Can be specified multiple times or comma-separated
-r, --registry <registryId>Specify default registry when using shorthand in --component
-a, --allCheck all registry items
--cwd <cwd>Working directory. Default is current directory
-u, --baseUrl <baseUrl>Registry base URL
-f, --framework <framework>Target framework (react or lynx). Overrides framework value in config
--verbosePrint detailed error information including stack trace on failure
-h, --helpPrint help

docs

A command to retrieve documentation links, llms.txt links, and snippet links.

npx @seed-design/cli@latest docs [query]

If you omit query, you can interactively select category → section → item.

npx @seed-design/cli@latest docs
◆  Select category
│  React
│
◆  Select section
│  Components
│
◆  Select item
│  Action Button
│
│  action-button
│  - docs: https://crispy.carrot-soft.tech/react/components/action-button
│  - llms.txt: https://crispy.carrot-soft.tech/llms/react/components/action-button.txt
│  - snippet: https://raw.githubusercontent.com/daangn/seed-design/refs/heads/dev/docs/registry/react/ui/action-button.tsx
│

You can search directly by item name.

npx @seed-design/cli@latest docs action-button

You can specify the path directly in the form category/section/item.

npx @seed-design/cli@latest docs react/components/action-button

If you specify only the category, you can select sections/items in that category.

npx @seed-design/cli@latest docs react

If you specify up to category/section, you can select items in that section.

npx @seed-design/cli@latest docs react/components

Typo suggestions

If there's a typo in the path, it suggests similar valid paths.

react/component/action-buton: Documentation not found.

💡 Did you mean?
   - react/components/action-button

Raw mode

Using the --raw option outputs llms.txt content as pure markdown without UI. It can be used in LLM pipes or scripts.

npx @seed-design/cli@latest docs react/components/action-button --raw

You can also get package changelogs.

npx @seed-design/cli@latest docs react/updates/changelog/react/1.2.5 --raw

Options

OptionDescription
--rawOutput llms.txt content as pure markdown without UI
-u, --baseUrl <baseUrl>Registry base URL
--verbosePrint detailed error information including stack trace on failure
-h, --helpPrint help

Table of contents