beui-pro

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

beUI Pro

beUI Pro

Use the customer's licensed beUI Pro registry as the source of truth. Discover current items at runtime, install only the blocks the project needs, then compose and adapt the generated source.
以客户授权的beUI Pro注册表作为可信数据源。在运行时发现当前可用组件,仅安装项目所需的区块,然后组合并适配生成的源码。

Protect access

保护访问权限

  • Require
    BEUI_PRO_TOKEN
    in the environment before accessing the registry.
  • Never print, paste, commit, or write the token into source files.
  • Never accept a token copied into the user's prompt when an environment variable can be used.
  • Stop and ask the user to configure their token when it is unavailable. Do not replace a requested Pro block with an approximation.
  • If the live catalog cannot be fetched, do not present remembered, documented, or locally inferred slugs as the current catalog.
  • Treat
    401
    as a missing, invalid, or expired token. Treat
    404
    as a stale or incorrect install slug and refresh the catalog.
Check access without revealing the value:
bash
test -n "$BEUI_PRO_TOKEN" && echo "beUI Pro token is configured"
  • 在访问注册表前,要求环境中配置
    BEUI_PRO_TOKEN
    。
  • 切勿打印、粘贴、提交或将令牌写入源文件。
  • 当可以使用环境变量时,切勿接受用户提示中复制的令牌。
  • 当令牌不可用时,停止操作并要求用户配置令牌。请勿用近似组件替代请求的Pro区块。
  • 如果无法获取实时目录,请勿将记忆中的、文档记录的或本地推断的slug作为当前目录展示。
  • 将
    401
    错误视为令牌缺失、无效或过期。将
    404
    错误视为安装slug过时或错误,并刷新目录。
在不泄露令牌值的情况下检查访问权限:
bash
test -n "$BEUI_PRO_TOKEN" && echo "beUI Pro token is configured"

Configure the registries

配置注册表

Inspect the project's existing
components.json
before editing it. Preserve its aliases and settings. Ensure both namespaces exist because Pro blocks can depend on public beUI primitives:
jsonc
{
  "registries": {
    "@beui": "https://beui.dev/r/{name}.json",
    "@beui-pro": {
      "url": "https://pro.beui.dev/r/{name}.json",
      "headers": {
        "Authorization": "Bearer ${BEUI_PRO_TOKEN}"
      }
    }
  }
}
Merge this into the existing file rather than replacing it. Do not create or modify a secret file unless the user explicitly asks.
编辑前先检查项目现有的
components.json
。保留其别名和设置。确保两个命名空间都存在,因为Pro区块可能依赖公开的beUI基础组件:
jsonc
{
  "registries": {
    "@beui": "https://beui.dev/r/{name}.json",
    "@beui-pro": {
      "url": "https://pro.beui.dev/r/{name}.json",
      "headers": {
        "Authorization": "Bearer ${BEUI_PRO_TOKEN}"
      }
    }
  }
}
将上述配置合并到现有文件中,而非替换整个文件。除非用户明确要求,否则不要创建或修改机密文件。

Workflow

工作流程

1. Understand the project

1. 了解项目

Read the existing app before choosing blocks. Identify:
  • framework and package manager
  • requested page or section
  • existing typography, theme tokens, spacing, and layout shell
  • blocks already installed
  • required states, data, and interactions
Prefer a coherent page composition over selecting blocks independently.
在选择区块前先阅读现有应用。确定:
  • 框架和包管理器
  • 请求的页面或板块
  • 现有排版、主题令牌、间距和布局框架
  • 已安装的区块
  • 所需状态、数据和交互
优先选择连贯的页面组合,而非独立选择区块。

2. Fetch the live catalog

2. 获取实时目录

Fetch the authenticated registry every time instead of relying on remembered slugs:
bash
curl -fsS \
  -H "Authorization: Bearer ${BEUI_PRO_TOKEN}" \
  https://pro.beui.dev/r/registry.json
Choose only from
items[].name
. This endpoint is the complete list of currently installable Pro blocks and components.
Use the grouped index when the request needs broader discovery:
bash
curl -fsS \
  -H "Authorization: Bearer ${BEUI_PRO_TOKEN}" \
  https://pro.beui.dev/r
Use names and descriptions to match the user's intent. Do not invent or shorten install slugs.
每次都获取已认证的注册表,而非依赖记忆中的slug:
bash
curl -fsS \
  -H "Authorization: Bearer ${BEUI_PRO_TOKEN}" \
  https://pro.beui.dev/r/registry.json
仅从
items[].name
中选择。该端点包含当前可安装的所有Pro区块和组件的完整列表。
当请求需要更广泛的发现时,使用分组索引:
bash
curl -fsS \
  -H "Authorization: Bearer ${BEUI_PRO_TOKEN}" \
  https://pro.beui.dev/r
使用名称和描述匹配用户意图。请勿编造或缩短安装slug。

3. Select intentionally

3. 有意选择

Map the page brief to the smallest useful set of sections. A typical landing page may need one item from each relevant family:
  1. navbar
  2. hero
  3. trust or social proof
  4. features or content
  5. pricing when applicable
  6. CTA
  7. footer
Do not install the whole catalog unless the user explicitly requests it. Avoid combining blocks with conflicting visual directions. Preserve the strongest aesthetic of each selected block while aligning shared typography, spacing, and theme tokens across the page.
Only entries returned by
/r/registry.json
are shadcn-installable. Full standalone templates use a separate purchase and download entitlement; do not fabricate an
@beui-pro
template command.
将页面需求映射到最小的实用板块集合。典型的落地页可能需要每个相关类别中的一个组件:
  1. 导航栏
  2. Hero区块
  3. 信任或社交证明区块
  4. 功能或内容区块
  5. 适用时的定价区块
  6. CTA
  7. 页脚
除非用户明确要求,否则不要安装整个目录。避免组合视觉风格冲突的区块。在统一页面的排版、间距和主题令牌的同时,保留每个所选区块最突出的美学风格。
只有
/r/registry.json
返回的条目可通过shadcn安装。完整的独立模板需要单独购买和下载权限;请勿编造
@beui-pro
模板命令。

4. Inspect before installing

4. 安装前查看

Inspect each selected item so the agent understands its files, dependencies, props, and named exports:
bash
npx shadcn@latest view @beui-pro/<slug>
Use the project's package runner when appropriate:
bash
pnpm dlx shadcn@latest view @beui-pro/<slug>
bunx --bun shadcn@latest view @beui-pro/<slug>
Re-fetch the live catalog if inspection returns
404
. Resolve authentication or registry configuration if it returns
401
; do not bypass the private registry.
查看每个选定组件,以便Agent了解其文件、依赖项、props和命名导出:
bash
npx shadcn@latest view @beui-pro/<slug>
适当时使用项目的包运行器:
bash
pnpm dlx shadcn@latest view @beui-pro/<slug>
bunx --bun shadcn@latest view @beui-pro/<slug>
如果查看返回
404
,重新获取实时目录。如果返回
401
,解决认证或注册表配置问题;请勿绕过私有注册表。

5. Install the selected source

5. 安装选定源码

Install through the configured namespace:
bash
npx shadcn@latest add @beui-pro/<slug>
The registry can install public
@beui
dependencies automatically. Keep those generated dependencies and helpers instead of copying or rebuilding them.
通过配置的命名空间安装:
bash
npx shadcn@latest add @beui-pro/<slug>
注册表会自动安装公开的
@beui
依赖项。保留这些生成的依赖项和工具,而非复制或重新构建它们。

6. Compose and adapt

6. 组合与适配

Read every generated file before using it. Then:
  • import its named exports from the installed paths
  • connect real copy, links, images, and data
  • preserve accessibility and reduced-motion behavior
  • use existing semantic theme tokens
  • make layout-level changes with
    className
    and composition first
  • change block internals only when the product requirement needs it
  • keep all work inside the user's project
Do not recreate a low-level motion primitive when the installed block already depends on a public beUI primitive.
使用前先阅读所有生成的文件。然后:
  • 从安装路径导入其命名导出
  • 连接真实文案、链接、图片和数据
  • 保留可访问性和减少动画行为
  • 使用现有的语义化主题令牌
  • 优先通过
    className
    和组合进行布局层面的更改
  • 仅当产品需求需要时才修改区块内部
  • 所有工作都在用户项目内完成
当已安装的区块已依赖公开的beUI基础组件时,请勿重新创建低级动画基础组件。

7. Verify

7. 验证

Run the project's relevant typecheck and lint commands. Render the changed route at desktop and mobile widths, check interaction and reduced-motion behavior, and confirm there is no overflow or hydration error.
Report which Pro slugs were installed and which files were adapted.
运行项目相关的类型检查和 lint 命令。在桌面和移动端宽度渲染修改后的路由,检查交互和减少动画行为,并确认没有溢出或 hydration 错误。
报告已安装的Pro slug以及已适配的文件。

Common requests

常见请求

  • For “build a landing page,” select a complete but restrained section sequence, install each exact slug, and compose it in the existing route.
  • For “add a pricing section,” search pricing entries, inspect the closest variants, install one, and connect the real plans.
  • For “use beUI Pro components,” inspect the current UI first and prefer relevant Pro blocks over custom replacements.
  • For “show me what Pro has,” fetch the live registry and summarize matching items without exposing source or the token.
  • 对于“构建落地页”请求,选择完整但简洁的板块序列,安装每个精确的slug,并在现有路由中组合它们。
  • 对于“添加定价板块”请求,搜索定价条目,查看最匹配的变体,安装一个并连接真实的定价方案。
  • 对于“使用beUI Pro组件”请求,先检查当前UI,优先选择相关的Pro区块而非自定义替代组件。
  • 对于“展示Pro有哪些内容”请求,获取实时注册表并总结匹配的条目,不暴露源码或令牌。