@cyclone-ui/cli

中文文档
0.6.57发布于 2026/11/11Apache-2.0TypeScriptES Module构建来源已验证近 30 天下载 9229

🌀 Tamagui based design components used by Storm Software. Like shadcn/ui, the components are copied into other repositories via the Cyclone CLI.

原始使用文档
文档目录8 节
  1. Table of Contents
  2. Installing
  3. Configuration
  4. Coding agent component protection
  5. Development
  6. Building
  7. Running unit tests
  8. Linting

Cyclone UI - Command-Line Interface (CLI)

The Cyclone UI command-line interface application.

Table of Contents

Installing

Using pnpm:

pnpm add @cyclone-ui/cli
Using npm
npm install @cyclone-ui/cli
Using yarn
yarn add @cyclone-ui/cli

The Cyclone CLI downloads component source from the public R2 registry at https://public.storm-cdn.com/cyclone-ui/registry, following the copy-and-own workflow used by shadcn/ui. The bucket serves a registry.json catalog and self-contained components/<name>.json files; no Worker API is required.

# Create components.json and the local component directory.
cyclone-ui init

# Browse the registry. `list` is an alias for `search`.
cyclone-ui search --query button

# Inspect or install registry components.
cyclone-ui view button
cyclone-ui add button

# Preview an installation or compare installed files with the registry.
cyclone-ui add button --dry-run
cyclone-ui diff button

# Inspect the current project configuration.
cyclone-ui info

# Generate a Tamagui config from design tokens, then compile it and its CSS.
cyclone-ui build --config razorwind.config.ts --output tamagui.config.ts

# Generate only the config, without compiling it.
cyclone-ui build-tokens --config razorwind.config.ts

# Validate a shadcn-format registry.
cyclone-ui registry validate registry.json

init writes a components.json file containing the public registry URL, output path, and installed component manifest. add resolves internal component dependencies, refuses to overwrite changed files unless --overwrite is provided, updates package dependencies, and records the installed version and files. Registry file paths are constrained to the configured component directory.

In a second repository, use the installed cyclone-ui executable:

pnpm exec cyclone-ui init --path src/components/ui
pnpm exec cyclone-ui add button
pnpm install

Component dependencies are copied recursively. Imports between copied components become relative imports, including subpath imports from nested files. Other packages, including @cyclone-ui/helpers and @cyclone-ui/state, are added to package.json with published version ranges. Existing dependency declarations are preserved. Run your package manager to install newly added dependencies.

To use another public registry, pass --registry <url> to init, or change registry in components.json. A URL ending in /registry.json is also accepted. For a prerelease channel use the registry's /tags/<tag> URL. Explicit legacy Worker registry URLs ending in /api continue to use the typed API client.

For a Next.js App Router project, enable React Server Component support with cyclone-ui init --rsc, or add "rsc": true to your existing components.json. This preserves registry directives, matching shadcn's RSC-enabled behavior. Registry authors are responsible for supplying "use client" directives on client-only components, hooks, and helpers. The CLI does not infer client boundaries or add directives to unmarked files.

Set "rsc": false to remove module-level "use client" directives from installed JavaScript and TypeScript files, following shadcn's RSC opt-out behavior. Server/cache directives, function bodies, comments, and non-script files remain unchanged. Omitting rsc preserves registry contents without transformation. The add command also accepts --rsc to override the project setting for that installation. Previews and diffs use the same transformed contents as writes.

To style components with Tamagui Tailwind class names instead of style props, run cyclone-ui init --style tailwind, or add "style": "tailwind" to your existing components.json. Components that ship a Tailwind variant (Skeleton.tailwind.tsx) install it in place of the default file, and @tamagui/tailwind is added to package.json. Style them with className, for example <Skeleton className="h-[32px] w-1/2" />. Cyclone defines no border width tokens and there is no Tailwind preflight, so give borders a px width and a style, such as border-[1px] border-solid. Animate class changes with Tamagui's transition prop, as the installed components do. @tamagui/tailwind leaves it out of its prop types, so pass it in a spread typed with TransitionProp from @tamagui/core. Components without a variant install their Tamagui source, which renders alongside Tailwind components with the same tokens and themes. For build-time CSS extraction, add tamaguiPlugin({ components: ["@tamagui/tailwind"] }) from @tamagui/tailwind/vite to your Vite config.

Registry authors add a Tailwind variant by placing <Name>.tailwind.tsx next to <Name>.tsx with the same exports.

build accepts the same --cwd, --config, --tokens, and --output options as build-tokens. It compiles the generated config into .tamagui/ and writes tamagui.generated.css in the working directory. The compiler is included with the Cyclone CLI; no separate Tamagui CLI installation is required.

Configuration

Coding agent component protection

Coding agents must not change installed or added Cyclone UI component files unless the user specifically instructs them to do so. components.json identifies the configured component path and installed files. General feature, styling, or application-fix requests do not authorize component edits, formatting, renames, deletions, registry updates, or overwrites. Prefer supported props, composition, application-owned wrappers, and theme configuration outside the installed files. If changing a component is necessary, explain why and ask for specific instructions first. Explicitly requested component additions or changes must remain scoped and preserve unrelated installed files and local edits.

This guidance is included in the CLI's guidelines command (also exposed through MCP), component command descriptions, and info output. info --json includes an agentInstructions field. It is guidance for agents, not a filesystem write lock; explicitly requested CLI operations remain available.

Development

This project is built using Nx. As a result, many of the usual commands are available to assist in development.

Building

Run nx build cli to build the library. The Razorwind Shell Shock plugin extracts this repository's design system during the build and bakes its tokens, components, icons and fonts into CLI commands and MCP tools. No Razorwind configuration or generated snapshot is needed at runtime.

Running unit tests

Run nx test cli to execute the unit tests via Vitest.

Linting

Run nx lint cli to run ESLint on the package.

版本与发布记录

@cyclone-ui/cli 共发布 57 个版本,首次发布于 2026/10/12;过去 12 个月发布了 57 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.6.57latest2026/11/11今天
0.6.562026/11/10今天
0.6.552026/11/091 天前
0.6.542026/11/092 天前
0.6.532026/11/092 天前
0.6.522026/11/092 天前

关于 @cyclone-ui/cli 的常见问题

@cyclone-ui/cli 是什么?

🌀 Tamagui based design components used by Storm Software. Like shadcn/ui, the components are copied into other repositories via the Cyclone CLI.

如何安装 @cyclone-ui/cli?

在项目目录运行 npm install @cyclone-ui/cli,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 cyclone-ui,可以用 npx cyclone-ui 直接运行。

@cyclone-ui/cli 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@cyclone-ui/cli 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@cyclone-ui/cli 可以商用吗?

@cyclone-ui/cli 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@cyclone-ui/cli 的下载量有多少?

根据 npm 官方下载统计,@cyclone-ui/cli 在 2026/10/11 – 2026/11/09 这 30 天内被下载 9,229 次,日均约 308 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@cyclone-ui/cli 还在维护吗?

最新版本 0.6.57 发布于 2026/11/11(今天);至今共发布 57 个版本,其中过去 12 个月发布了 57 个;首次发布于 2026/10/12。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。