@db-ux/agent-cli

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

CLI for DB UX Design System generate AI agent instructions

原始使用文档
文档目录9 节
  1. Usage
  2. Running the CLI Tool
  3. Advanced Usage
  4. What the tool does
  5. Best practices
  6. Deutsche Bahn brand
  7. Contributions
  8. Code of conduct
  9. License

@db-ux/agent-cli

Apache 2.0 license badge code style: prettier Conventional Commits PRs Welcome

Usage

We provide a command-line interface (CLI) tool that copies the @db-ux documentation to your repository, making it available to AI agents.

Running the CLI Tool

Use this command in your repository:

npx @db-ux/agent-cli

Or with pnpm:

pnpm i @db-ux/agent-cli --save-dev
pnpm exec db-ux-agent-cli

The DB UX Design System documentation will be added to (or replaced in subsequent runs, e.g. after a DB UX Design System update) in the file .github/copilot-instructions.md (if this file does not yet exist in your codebase, it will be created).

Note: The tool works with all package managers (npm, yarn, pnpm) and correctly handles symlinked packages in pnpm's node_modules structure.

Advanced Usage

You can also change the root path where the tool should check for node_modules:

npx @db-ux/agent-cli packages/frontend

This is useful in monorepo setups where your DB UX packages might be installed in a specific workspace directory.

What the tool does

  1. Scans your project's node_modules for installed @db-ux packages
  2. Extracts relevant documentation based on your installed versions
  3. Creates or updates .github/copilot-instructions.md with component documentation
  4. Provides AI agents with context about available components and their usage patterns

Best practices

We've had the best experience with GitHub Copilot and Amazon Q when using the following settings:

  • Agent mode works best for code generation and may also offer the best developer experience.
  • Regarding the provided models, GPT-4o seemed to strike the best balance between "used tokens" and performance, although "Claude Sonnet 4" is still better. However, you run out of tokens quite quickly with this model.
  • If you're primarily interested in testing this functionality at the moment, we have quite a bit of experience using a prompt that is both equal and non-trivial, but rather complex, such as "Can you create a new page with a dashboard? It should contain selections for KPIs. Each KPI is a card containing information and buttons."

Deutsche Bahn brand

As we'd like to perfectly support our users and customers on their digital journey, the usage of Deutsche Bahn brand and trademarks are bound of clear guidelines and restrictions even if being used with the code that we're providing with this product; Deutsche Bahn fully reserves all rights regarding the Deutsche Bahn brand, even though that we're providing the code of DB UX Design System products free to use and release it under the Apache 2.0 license. Please have a look at our brand portal at https://marketingportal.extranet.deutschebahn.com/ for any further questions and whom to contact on any brand issues.

For any usage outside of Deutsche Bahn websites and applications you aren't allowed to use any Deutsche Bahn brand and design assets as well as protected characteristics and trademarks, that for not including the DB Theme.

Contributions

Contributions are very welcome, please refer to the contribution guide.

Code of conduct

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone – have a look at our Contributor Covenant Code of Conduct.

License

This project is licensed under Apache-2.0.

版本与发布记录

@db-ux/agent-cli 共发布 134 个版本,首次发布于 2025/07/25;过去 12 个月发布了 119 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
6.3.2latest2026/11/11今天
6.3.12026/11/101 天前
6.3.02026/11/056 天前
6.2.12026/11/047 天前
6.2.1-optimized-icon-fonts-amount2-b78987enext2026/11/047 天前
6.2.02026/10/2913 天前

关于 @db-ux/agent-cli 的常见问题

@db-ux/agent-cli 是什么?

CLI for DB UX Design System generate AI agent instructions

如何安装 @db-ux/agent-cli?

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

@db-ux/agent-cli 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/db-ux__agent-cli 是否存在。

@db-ux/agent-cli 支持 ESM 还是 CommonJS?

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

@db-ux/agent-cli 可以商用吗?

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

@db-ux/agent-cli 的下载量有多少?

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

@db-ux/agent-cli 还在维护吗?

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