@gitlab/duo-cli

中文文档
9.16.0发布于 2026/08/27MITES Module零依赖近 30 天下载 1.8万

GitLab Duo for your command line

此软件包已被标记为弃用

No longer updated after 9.16.0. See our latest install instructions: https://docs.gitlab.com/user/gitlab_duo_cli/

原始使用文档
文档目录3 节
  1. Development
  2. Packages
  3. License

GitLab Duo CLI

GitLab Duo for your command line. An AI-powered CLI tool that brings GitLab Duo Agentic Chat to your terminal.

[!note] The GitLab Duo CLI is now generally available. Update to GitLab Duo CLI 9.0.0 or later for the full generally available experience. If you are on GitLab 18.11 to 19.1, you must also meet the beta requirements.

📖 For installation, usage, and configuration see the GitLab Duo CLI documentation.

Development

To run the CLI from a local checkout, from inside packages/cli:

bun run start

This builds and launches the app. Pass CLI flags after --:

bun run start -- run --goal "example"

For hot-reload development, use bun run dev:watch instead.

[!note] The bun run start and bun run dev:watch scripts are package-local and must be run from inside packages/cli. The repository root exposes equivalent scripts (bun run cli, bun run cli:watch) that can be run from the checkout root.

See the Development Guide for prerequisites, building, debugging, testing, architecture details, and how the CLI resolves credentials during development (standalone vs. glab authentication paths).

Packages

The GitLab Duo CLI is split across two packages:

  • packages/cli — CLI entry point, command routing, backend abstraction, and controllers for interactive and headless modes.
  • packages/tui — React-based terminal UI built on Ink. Pure presentation layer with zero domain logic. Renders the chat interface, messages, tool calls, diffs, and Markdown.

License

See the License for details.

版本与发布记录

@gitlab/duo-cli 共发布 130 个版本,首次发布于 2025/09/23;过去 12 个月发布了 97 个版本。

版本发布日期距今
9.16.0latest2026/08/272 个月前
9.15.02026/08/272 个月前
9.14.02026/08/242 个月前
9.13.02026/08/212 个月前
9.12.02026/08/202 个月前
9.11.02026/08/192 个月前

关于 @gitlab/duo-cli 的常见问题

@gitlab/duo-cli 是什么?

GitLab Duo for your command line注意:该包已被作者标记为弃用——No longer updated after 9.16.0. See our latest install instructions: https://docs.gitlab.com/user/gitlab_duo_cli/

如何安装 @gitlab/duo-cli?

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

@gitlab/duo-cli 支持 TypeScript 吗?

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

@gitlab/duo-cli 支持 ESM 还是 CommonJS?

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

@gitlab/duo-cli 可以商用吗?

@gitlab/duo-cli 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@gitlab/duo-cli 的下载量有多少?

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

@gitlab/duo-cli 还在维护吗?

最新版本 9.16.0 发布于 2026/08/27(2 个月前);至今共发布 130 个版本,其中过去 12 个月发布了 97 个;首次发布于 2025/09/23。作者已将其标记为弃用,新项目建议寻找替代方案。