# @asyncapi/cli 中文文档

规范地址：https://npmcn.com/package/%40asyncapi/cli/

版本：6\.3\.0
npm 元数据更新时间：2026-11-07T02:23:23.669Z
中文译文更新时间：2026-11-07T01:37:58.046Z
软件包许可：Apache-2\.0

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40asyncapi/cli
原文对照：https://npmcn.com/package/%40asyncapi/cli/?lang=original
项目主页：https://github.com/asyncapi/cli
源码仓库：https://github.com/asyncapi/cli

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：1.4 MB，290 个文件
- 模块格式：CommonJS
- TypeScript 类型：包内自带
- Node.js 要求：\>=24\.11\.0
- 运行依赖：40 个
- 首次发布：2021-06-18T12:06:58.259Z
- 最新版本发布：2026-11-07T02:23:23.329Z
- 近 30 天下载量：300001（2026-10-07 至 2026-11-05，npm 官方下载统计）
- 已发布版本数：451（近 12 个月 18 个）

## 中文简介

所有 AsyncAPI 工具的 CLI

## 安装

```sh
npm install @asyncapi/cli
```

也可以使用：`pnpm add @asyncapi/cli`、`yarn add @asyncapi/cli`、`bun add @asyncapi/cli`

## README

[![AsyncAPI CLI](https://npmcn.com/package/%40asyncapi/cli/assets/logo.png)](https://www.asyncapi.com/tools/cli)

CLI 可以使用您的 AsyncAPI 文件 。 目前正在发展之中,我们正在努力带来更多的特点.

[![GitHub license](https://img.shields.io/github/license/asyncapi/cli)](https://github.com/asyncapi/cli/blob/master/LICENSE) [![PR testing - if Node project](https://github.com/asyncapi/cli/actions/workflows/if-nodejs-pr-testing.yml/badge.svg)](https://github.com/asyncapi/cli/actions/workflows/if-nodejs-pr-testing.yml) [![npm](https://img.shields.io/npm/dw/@asyncapi/cli)](https://www.npmjs.com/package/@asyncapi/cli)

## 目录

-   [安装](https://npmcn.com/package/%40asyncapi/cli/#readme-installation)
-   [使用量](https://npmcn.com/package/%40asyncapi/cli/#readme-usage)
-   [建筑](https://npmcn.com/package/%40asyncapi/cli/#readme-architecture)
-   [调试( T)](https://npmcn.com/package/%40asyncapi/cli/#readme-debugging--testing)
-   [Github 动作](https://npmcn.com/package/%40asyncapi/cli/#readme-github-action)
-   [捐款](https://npmcn.com/package/%40asyncapi/cli/#readme-contributing)
    -   [建立发展环境](https://npmcn.com/package/%40asyncapi/cli/#readme-set-up-development-environment)
    -   [命令结构和模式](https://npmcn.com/package/%40asyncapi/cli/#readme-command-structure-and-patterns)
-   [贡献者](https://npmcn.com/package/%40asyncapi/cli/#readme-contributors)

## 安装

学习如何安装 AsyncAPI CMI , 方法是遵循其中的指令 [安装指南](https://npmcn.com/docs/installation.md)。 。 。 .

## 使用量

这个 [使用指南](https://npmcn.com/docs/usage.md) 提供不同方式使用CLI的信息.

## 建筑

这个 [架构指南](https://npmcn.com/docs/architecture.md) 提供架构信息。 捆绑者图书馆住在这里 [`packages/bundler`](https://github.com/asyncapi/cli/tree/master/packages/bundler)。 。 。 .

## 调试( T)

这个 [调试测试指南( t)](https://npmcn.com/docs/debugging-testing.md) 为调试CLI指令,API端点,以及服务提供分步指令,同时提供综合测试指南.

## Github 动作

AsyncAPI 的 CLI 可用作 GitHub 动作. 您可以在 [GitHub 动作指南](https://www.asyncapi.com/docs/tools/cli/github-action)。 。 。 .

## 捐款

读取 [捐款](https://github.com/asyncapi/.github/blob/master/CONTRIBUTING.md) 向导.

### 建立发展环境

读取 [发展.md](https://npmcn.com/DEVELOPMENT.md) 用于开发设置的文件.

其他步骤:

-   运行 `npm run test` 确保一切正常进行
-   运行 `npm run build` 接下来 `bin/run` 尝试本地新 CLI

> 这个寄存器是npm-workspaces + Turbo monorepo. 根包子是: `@asyncapi/cli` (工作空间) 包含 `"."` 因此更改器仍然像今天一样. `@asyncapi/optimizer` 住在这里 [`packages/optimizer/`](https://npmcn.com/packages/optimizer) 财务报告和审定财务报表 `@asyncapi/diff` 住在这里 [`packages/diff/`](https://npmcn.com/packages/diff)。两者单独发布至npm. 使用 `npm run optimizer:build` 编号 : `npm run optimizer:test` 财务报告和审定财务报表 `npm run diff:build` 编号 : `npm run diff:test` 来研究那些包裹 见其规格: [优化器](https://npmcn.com/docs/optimizer/spec.md), (中文(简体) ), [微调](https://npmcn.com/docs/diff/spec.md)。 。 。 .

为CLI开发的UX应当遵守 [命令行界面准则](https://clig.dev/)

### 命令结构和模式

我们跟着 `verb + noun` 财务报告和审定财务报表 `namespace + noun + [verb]` 用于发布命令和参数的模式。 举个例子 `asyncapi validate <spec-file-path>` 财务报告和审定财务报表 `asyncapi config context add <context-name> <spec-file-path>`。 。 。 .

## 贡献者

感谢这些优秀的人[emoji 密钥](https://allcontributors.org/docs/en/emoji-key):

<table><tbody><tr><td align="center"><a href="https://github.com/jotamusik" rel="nofollow noopener noreferrer"><img alt="Jorge Aguiar Martín" src="https://avatars.githubusercontent.com/u/14940638?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>豪尔赫·阿吉亚尔·马丁</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=jotamusik" title="Code" rel="nofollow noopener noreferrer">💻</a> <a href="https://npmcn.com/package/%40asyncapi/cli/#readme-ideas-jotamusik" title="Ideas, Planning, &amp; Feedback" rel="nofollow noopener noreferrer">🤔</a> <a href="https://github.com/asyncapi/cli/commits?author=jotamusik" title="Tests" rel="nofollow noopener noreferrer">⚠️</a> <a href="https://github.com/asyncapi/cli/commits?author=jotamusik" title="Documentation" rel="nofollow noopener noreferrer">📖</a></td><td align="center"><a href="https://www.brainfart.dev/" rel="nofollow noopener noreferrer"><img alt="Lukasz Gornicki" src="https://avatars.githubusercontent.com/u/6995927?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>卢卡斯·戈尔尼茨基</b></sub></a><br><a href="https://npmcn.com/package/%40asyncapi/cli/#readme-ideas-derberg" title="Ideas, Planning, &amp; Feedback" rel="nofollow noopener noreferrer">🤔</a> <a href="https://github.com/asyncapi/cli/commits?author=derberg" title="Code" rel="nofollow noopener noreferrer">💻</a> <a href="https://github.com/asyncapi/cli/pulls?q=is%3Apr+reviewed-by%3Aderberg" title="Reviewed Pull Requests" rel="nofollow noopener noreferrer">👀</a> <a href="https://npmcn.com/package/%40asyncapi/cli/#readme-maintenance-derberg" title="Maintenance" rel="nofollow noopener noreferrer">🚧</a></td><td align="center"><a href="https://souvik.vercel.app/" rel="nofollow noopener noreferrer"><img alt="souvik" src="https://avatars.githubusercontent.com/u/41781438?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>苏维克语</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=Souvikns" title="Code" rel="nofollow noopener noreferrer">💻</a> <a href="https://npmcn.com/package/%40asyncapi/cli/#readme-ideas-Souvikns" title="Ideas, Planning, &amp; Feedback" rel="nofollow noopener noreferrer">🤔</a> <a href="https://github.com/asyncapi/cli/commits?author=Souvikns" title="Tests" rel="nofollow noopener noreferrer">⚠️</a> <a href="https://github.com/asyncapi/cli/pulls?q=is%3Apr+reviewed-by%3ASouvikns" title="Reviewed Pull Requests" rel="nofollow noopener noreferrer">👀</a> <a href="https://npmcn.com/package/%40asyncapi/cli/#readme-maintenance-Souvikns" title="Maintenance" rel="nofollow noopener noreferrer">🚧</a> <a href="https://github.com/asyncapi/cli/commits?author=Souvikns" title="Documentation" rel="nofollow noopener noreferrer">📖</a></td><td align="center"><a href="https://boyney.io/" rel="nofollow noopener noreferrer"><img alt="David Boyne" src="https://avatars.githubusercontent.com/u/3268013?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>大卫·博因</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=boyney123" title="Code" rel="nofollow noopener noreferrer">💻</a> <a href="https://npmcn.com/package/%40asyncapi/cli/#readme-ideas-boyney123" title="Ideas, Planning, &amp; Feedback" rel="nofollow noopener noreferrer">🤔</a> <a href="https://npmcn.com/package/%40asyncapi/cli/#readme-maintenance-boyney123" title="Maintenance" rel="nofollow noopener noreferrer">🚧</a></td><td align="center"><a href="http://www.fmvilas.com/" rel="nofollow noopener noreferrer"><img alt="Fran Méndez" src="https://avatars.githubusercontent.com/u/242119?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>弗朗·门德斯</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=fmvilas" title="Code" rel="nofollow noopener noreferrer">💻</a> <a href="https://npmcn.com/package/%40asyncapi/cli/#readme-ideas-fmvilas" title="Ideas, Planning, &amp; Feedback" rel="nofollow noopener noreferrer">🤔</a> <a href="https://github.com/asyncapi/cli/pulls?q=is%3Apr+reviewed-by%3Afmvilas" title="Reviewed Pull Requests" rel="nofollow noopener noreferrer">👀</a></td><td align="center"><a href="https://github.com/magicmatatjahu" rel="nofollow noopener noreferrer"><img alt="Maciej Urbańczyk" src="https://avatars.githubusercontent.com/u/20404945?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>马西杰·乌尔班奇克</b></sub></a><br><a href="https://github.com/asyncapi/cli/pulls?q=is%3Apr+reviewed-by%3Amagicmatatjahu" title="Reviewed Pull Requests" rel="nofollow noopener noreferrer">👀</a> <a href="https://npmcn.com/package/%40asyncapi/cli/#readme-maintenance-magicmatatjahu" title="Maintenance" rel="nofollow noopener noreferrer">🚧</a> <a href="https://npmcn.com/package/%40asyncapi/cli/#readme-ideas-magicmatatjahu" title="Ideas, Planning, &amp; Feedback" rel="nofollow noopener noreferrer">🤔</a></td><td align="center"><a href="https://aayushsahu.com/" rel="nofollow noopener noreferrer"><img alt="Aayush Kumar Sahu" src="https://avatars.githubusercontent.com/u/54525741?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>阿尤什·库马尔·萨胡</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=aayushmau5" title="Code" rel="nofollow noopener noreferrer">💻</a> <a href="https://github.com/asyncapi/cli/commits?author=aayushmau5" title="Tests" rel="nofollow noopener noreferrer">⚠️</a></td></tr><tr><td align="center"><a href="https://github.com/mihirterna" rel="nofollow noopener noreferrer"><img alt="Mihir Kulkarni" src="https://avatars.githubusercontent.com/u/31316452?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>米希尔·库尔卡尔尼</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=mihirterna" title="Code" rel="nofollow noopener noreferrer">💻</a></td><td align="center"><a href="https://imabp.github.io/resume/" rel="nofollow noopener noreferrer"><img alt="Abir" src="https://avatars.githubusercontent.com/u/53480076?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>阿比尔</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=imabp" title="Tests" rel="nofollow noopener noreferrer">⚠️</a> <a href="https://github.com/asyncapi/cli/commits?author=imabp" title="Code" rel="nofollow noopener noreferrer">💻</a></td><td align="center"><a href="https://github.com/peter-rr" rel="nofollow noopener noreferrer"><img alt="Peter Ramos" src="https://avatars.githubusercontent.com/u/81691177?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>彼得·拉莫斯</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=peter-rr" title="Code" rel="nofollow noopener noreferrer">💻</a></td><td align="center"><a href="https://samridhi-98.github.io/Portfolio" rel="nofollow noopener noreferrer"><img alt="Samriddhi" src="https://avatars.githubusercontent.com/u/54466041?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>萨姆里德迪</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=Samridhi-98" title="Tests" rel="nofollow noopener noreferrer">⚠️</a></td><td align="center"><a href="https://linktr.ee/KharabePranay" rel="nofollow noopener noreferrer"><img alt="Pranay Kharabe" src="https://avatars.githubusercontent.com/u/68046838?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>普拉奈·哈拉贝</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=pranay202" title="Code" rel="nofollow noopener noreferrer">💻</a></td><td align="center"><a href="https://d-m-oladele.netlify.app/" rel="nofollow noopener noreferrer"><img alt="Damilola Oladele" src="https://avatars.githubusercontent.com/u/98895460?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>达米洛拉·奥拉德勒</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=activus-d" title="Documentation" rel="nofollow noopener noreferrer">📖</a></td><td align="center"><a href="https://github.com/prayutsu" rel="nofollow noopener noreferrer"><img alt="Abhay Garg" src="https://avatars.githubusercontent.com/u/54636525?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>阿比・加格</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=prayutsu" title="Code" rel="nofollow noopener noreferrer">💻</a> <a href="https://github.com/asyncapi/cli/commits?author=prayutsu" title="Tests" rel="nofollow noopener noreferrer">⚠️</a></td></tr><tr><td align="center"><a href="https://github.com/sambhavgupta0705" rel="nofollow noopener noreferrer"><img alt="Sambhav Gupta" src="https://avatars.githubusercontent.com/u/81870866?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>萨姆哈夫·古普塔</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=sambhavgupta0705" title="Code" rel="nofollow noopener noreferrer">💻</a> <a href="https://github.com/asyncapi/cli/commits?author=sambhavgupta0705" title="Tests" rel="nofollow noopener noreferrer">⚠️</a></td><td align="center"><a href="https://github.com/CyberHippo" rel="nofollow noopener noreferrer"><img alt="Hippolyte Vergnol" src="https://avatars.githubusercontent.com/u/18269437?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>Hippolyte Vergnol (英语)</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=CyberHippo" title="Code" rel="nofollow noopener noreferrer">💻</a> <a href="https://npmcn.com/package/%40asyncapi/cli/#readme-infra-CyberHippo" title="Infrastructure (Hosting, Build-Tools, etc)" rel="nofollow noopener noreferrer">🚇</a></td><td align="center"><a href="https://www.jentevets.com/" rel="nofollow noopener noreferrer"><img alt="Jente Vets" src="https://avatars.githubusercontent.com/u/22449126?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>简特·韦茨</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=Vetsoo" title="Code" rel="nofollow noopener noreferrer">💻</a></td><td align="center"><a href="https://github.com/kaushik-rishi" rel="nofollow noopener noreferrer"><img alt="Rishi" src="https://avatars.githubusercontent.com/u/52498617?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>丽希</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=kaushik-rishi" title="Code" rel="nofollow noopener noreferrer">💻</a></td><td align="center"><a href="http://ashishpadhy.live/" rel="nofollow noopener noreferrer"><img alt="Ashish Padhy" src="https://avatars.githubusercontent.com/u/100484401?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>阿诗·帕迪</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=Shurtu-gal" title="Code" rel="nofollow noopener noreferrer">💻</a></td><td align="center"><a href="https://github.com/meetagrawal09" rel="nofollow noopener noreferrer"><img alt="Meet Agrawal" src="https://avatars.githubusercontent.com/u/73902874?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>见见阿格拉瓦尔</b></sub></a><br><a href="https://npmcn.com/package/%40asyncapi/cli/#readme-infra-meetagrawal09" title="Infrastructure (Hosting, Build-Tools, etc)" rel="nofollow noopener noreferrer">🚇</a></td><td align="center"><a href="https://www.chinmayyy.tech/" rel="nofollow noopener noreferrer"><img alt="Chinmay Shewale" src="https://avatars.githubusercontent.com/u/112387862?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>钦迈·谢瓦尔</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=chinma-yyy" title="Code" rel="nofollow noopener noreferrer">💻</a> <a href="https://github.com/asyncapi/cli/commits?author=chinma-yyy" title="Tests" rel="nofollow noopener noreferrer">⚠️</a></td></tr><tr><td align="center"><a href="https://github.com/mhmohona" rel="nofollow noopener noreferrer"><img alt="Mahfuza Humayra Mohona" src="https://avatars.githubusercontent.com/u/14244685?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>马赫富扎·胡迈拉·莫霍纳</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=mhmohona" title="Documentation" rel="nofollow noopener noreferrer">📖</a></td><td align="center"><a href="https://github.com/GreenRover" rel="nofollow noopener noreferrer"><img alt="Heiko Henning" src="https://avatars.githubusercontent.com/u/512850?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>兴宁平子</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=GreenRover" title="Code" rel="nofollow noopener noreferrer">💻</a></td><td align="center"><a href="https://www.linkedin.com/in/aayush-saini-0a25931b1/" rel="nofollow noopener noreferrer"><img alt="Zack_Aayush" src="https://avatars.githubusercontent.com/u/60972989?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>扎克-阿约什</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=AayushSaini101" title="Code" rel="nofollow noopener noreferrer">💻</a></td><td align="center"><a href="https://github.com/ayushnau" rel="nofollow noopener noreferrer"><img alt="Ayush Nautiyal" src="https://avatars.githubusercontent.com/u/78146753?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>阿尤什·瑙蒂亚勒</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=ayushnau" title="Code" rel="nofollow noopener noreferrer">💻</a></td><td align="center"><a href="https://github.com/AnishKacham" rel="nofollow noopener noreferrer"><img alt="AnishKacham" src="https://avatars.githubusercontent.com/u/79566582?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>阿尼什卡萨姆</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=Anish%20Kacham" title="Code" rel="nofollow noopener noreferrer">💻</a></td><td align="center"><a href="https://github.com/aeworxet" rel="nofollow noopener noreferrer"><img alt="Viacheslav Turovskyi" src="https://avatars.githubusercontent.com/u/16149591?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>维亚切斯拉夫·图罗夫斯基伊</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=aeworxet" title="Code" rel="nofollow noopener noreferrer">💻</a></td><td align="center"><a href="https://github.com/amanbedi1" rel="nofollow noopener noreferrer"><img alt="Amanpreet Singh Bedi " src="https://avatars.githubusercontent.com/u/82234871?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>阿芒普雷特·辛格·贝迪</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=amanbedi1" title="Code" rel="nofollow noopener noreferrer">💻</a></td></tr><tr><td align="center"><a href="https://github.com/ron-debajyoti" rel="nofollow noopener noreferrer"><img alt="Debajyoti Halder" src="https://avatars.githubusercontent.com/u/22571664?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>德巴吉奥蒂·哈尔德</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=ron-debajyoti" title="Code" rel="nofollow noopener noreferrer">💻</a></td><td align="center"><a href="https://github.com/Savio629" rel="nofollow noopener noreferrer"><img alt="Savio Dias" src="https://avatars.githubusercontent.com/u/91362589?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>萨维奥·迪亚斯</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=Savio629" title="Code" rel="nofollow noopener noreferrer">💻</a></td><td align="center"><a href="https://github.com/jonaslagoni" rel="nofollow noopener noreferrer"><img alt="Jonas Lagoni" src="https://avatars.githubusercontent.com/u/13396189?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>乔纳斯·拉戈尼</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=jonaslagoni" title="Code" rel="nofollow noopener noreferrer">💻</a> <a href="https://npmcn.com/package/%40asyncapi/cli/#readme-ideas-jonaslagoni" title="Ideas, Planning, &amp; Feedback" rel="nofollow noopener noreferrer">🤔</a> <a href="https://github.com/asyncapi/cli/pulls?q=is%3Apr+reviewed-by%3Ajonaslagoni" title="Reviewed Pull Requests" rel="nofollow noopener noreferrer">👀</a> <a href="https://github.com/asyncapi/cli/commits?author=jonaslagoni" title="Tests" rel="nofollow noopener noreferrer">⚠️</a></td><td align="center"><a href="https://github.com/KhudaDad414" rel="nofollow noopener noreferrer"><img alt="Khuda Dad Nomani" src="https://avatars.githubusercontent.com/u/32505158?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>胡达爸爸诺马尼</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=KhudaDad414" title="Code" rel="nofollow noopener noreferrer">💻</a> <a href="https://github.com/asyncapi/cli/commits?author=KhudaDad414" title="Documentation" rel="nofollow noopener noreferrer">📖</a></td><td align="center"><a href="https://github.com/smoya" rel="nofollow noopener noreferrer"><img alt="Sergio Moya " src="https://avatars.githubusercontent.com/u/1083296?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>塞尔吉奥·莫亚</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=smoya" title="Code" rel="nofollow noopener noreferrer">💻</a></td><td align="center"><a href="https://github.com/Vishal2002" rel="nofollow noopener noreferrer"><img alt="Vishal Sharma" src="https://avatars.githubusercontent.com/u/35897449?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>维沙尔·夏尔马</b></sub></a><br><a href="https://github.com/asyncapi/cli/commits?author=Vishal2002" title="Code" rel="nofollow noopener noreferrer">💻</a></td></tr></tbody></table>

本项目遵循 [全部贡献者](https://github.com/all-contributors/all-contributors) 规格。 任何捐款都欢迎!

## 常见问题

### @asyncapi/cli 是什么？

所有 AsyncAPI 工具的 CLI

### 如何安装 @asyncapi/cli？

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

### @asyncapi/cli 支持 TypeScript 吗？

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

### @asyncapi/cli 支持 ESM 还是 CommonJS？

以 CommonJS 形式发布，可以直接 require\(\)；在 ES Module 项目中也可以用 import 引入（Node\.js 会把 module\.exports 作为默认导出）。

### @asyncapi/cli 需要什么版本的 Node\.js？

package\.json 的 engines 字段要求 Node\.js \>=24\.11\.0。版本不符时 npm 默认只给出警告，开启 engine-strict 后会拒绝安装。

### @asyncapi/cli 可以商用吗？

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

### @asyncapi/cli 的下载量有多少？

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

### @asyncapi/cli 还在维护吗？

最新版本 6\.3\.0 发布于 2026/11/07（今天）；至今共发布 451 个版本，其中过去 12 个月发布了 18 个；首次发布于 2021/06/18。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

