React

Configuration

Guide to seed-design.json configuration.

Creating seed-design.json

The seed-design.json file can be created by CLI or added manually.

Basic Format

seed-design.json
{
  "rsc": false,
  "tsx": true,
  "framework": "react",
  "path": "./seed-design",
  "telemetry": true
}

seed-design.json is parsed strictly. Adding arbitrary keys not documented can cause errors when running CLI.

Options at a Glance

OptionTypeDefaultDescription
pathstringNone (init creates ./seed-design)Root path where snippets are generated
rscbooleanfalseKeep/remove "use client" based on React Server Components usage
tsxbooleantrueConvert generated files to TypeScript(.ts/.tsx) or JavaScript(.js/.jsx)
framework"react" | "lynx""react"Target framework for snippets. Auto-detected during init
telemetrybooleantrueWhether to collect anonymous usage data
$schemastringOptionalField for JSON schema hints (does not affect CLI operation)

path

path is the root directory where snippets are generated.

When running add/add-all, files are created under path based on registry ID and snippet internal path. It's not a fixed folder structure, but the structure varies depending on the items you select.

seed-design.json
{
  "path": "./seed-design"
}
action-button.tsx
tabs.tsx
animate-number.tsx
classnames.ts

rsc

Configure whether to use React Server Components.

Decide whether to keep the "use client" directive already in the snippet.

  • true: Keep "use client".
  • false: Remove "use client" from the top of the file.
seed-design.json
{
  "rsc": true | false // default: false
}

tsx

Configure whether to use TypeScript.

If set to false, .ts/.tsx files are converted to .js/.jsx.

seed-design.json
{
  "tsx": true | false // default: true
}

framework

Configure the target framework for snippets.

When running init, if @lynx-js/react or @seed-design/lynx-react is found in the project's package.json, it's auto-detected as "lynx".

  • "react": Use snippets based on @seed-design/react, @seed-design/css.
  • "lynx": Use snippets based on @seed-design/lynx-react, @seed-design/lynx-css.
seed-design.json
{
  "framework": "react" | "lynx" // default: "react"
}

You can temporarily override this value with the --framework option in CLI commands.

telemetry

Configure whether to collect telemetry data.

Crispy CLI collects anonymous usage data for improvement. Project paths, file contents, and source code are not collected.

seed-design.json
{
  "telemetry": true | false // default: true
}

Priority

Telemetry activation is determined in the following order:

  1. DISABLE_TELEMETRY=true environment variable
  2. SEED_DISABLE_TELEMETRY=true environment variable
  3. telemetry in seed-design.json
  4. Default value true

Examples of collected data

  • Execution events: init, add, add-all, compat
  • Execution stats: execution time (duration_ms), number of items added
  • Configuration info: tsx, rsc, include_deprecated, yes_option, etc.

Data not collected

  • Project path, generated file path
  • Snippet file contents
  • Source code
  • Personally identifiable information

How to disable

1. seed-design.json configuration

{
  "telemetry": false
}

2. Environment variable configuration

export DISABLE_TELEMETRY=true
# or
export SEED_DISABLE_TELEMETRY=true

$schema

$schema is an optional string field. It does not affect current CLI operation and can only be used for JSON auto-completion/validation in editors.

Table of contents