# @appweaver/cli 中文文档

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

版本：2\.4\.1
npm 元数据更新时间：2026-11-01T13:27:33.596Z
中文译文更新时间：2026-11-06T12:48:36.783Z
软件包许可：MIT

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

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

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

- 包体积（解压后）：696 kB，108 个文件
- 模块格式：CommonJS
- TypeScript 类型：包内自带
- Node.js 要求：\>= 24\.7
- 运行依赖：11 个
- peer 依赖：prisma ^7\.9\.0，typescript ^5\.9\.0，@appweaver/web ^2\.4\.1，@appweaver/core ^2\.4\.1，@appweaver/data ^2\.4\.1，@appweaver/common ^2\.4\.1
- 首次发布：2026-05-18T15:56:45.930Z
- 最新版本发布：2026-11-01T13:27:33.401Z
- 近 30 天下载量：3345（2026-10-07 至 2026-11-05，npm 官方下载统计）
- 已发布版本数：71（近 12 个月 71 个）

## 中文简介

Appweaver - AI-First开发的后端框架 (@cli)

## 安装

```sh
npm install @appweaver/cli
```

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

## README

[![Appweaver Logo](https://raw.githubusercontent.com/lmatosevic/appweaver/refs/heads/main/resources/appweaver-logo.svg)](https://appweaver.co/)

这个 `weaver` 命令行工具 [上诉人](https://appweaver.co/)。 。 。 .

[![NPM Version](https://img.shields.io/npm/v/@appweaver/cli.svg)](https://www.npmjs.com/package/@appweaver/cli) [![Package License](https://img.shields.io/npm/l/@appweaver/cli.svg)](https://github.com/lmatosevic/appweaver/blob/main/LICENSE) [![NPM Downloads](https://img.shields.io/npm/dw/@appweaver/cli.svg)](https://www.npmjs.com/package/@appweaver/cli)

## 说明

`@appweaver/cli` 提供 `weaver` 二进制驱动 Appweaver 项目开发工作的二进制:, 开始、 代码生成、 迁移、 种子、 一发任务、 OpenAPI 导出、 测试数据库设置、 配置 检查、模块和软件包更新。 它运行 当为 Bun 运行时间配置工程时, 在 Bun 下自动 .

## 安装

```sh
npm install @appweaver/cli
```

正如脚手架项目一样,这是依赖性而不是依赖性,因为生产图像运行 `weaver start` 财务报告和审定财务报表 `weaver migrate`。 。 。 .

CLI只需要一个 `@appweaver/core`。 。 。 . `weaver generate`, (中文(简体) ), `weaver seed` 财务报告和审定财务报表 `weaver test setup` 使用该 `@appweaver/data` 一揽子项目, `weaver openapi` 联合国 `@appweaver/web`,然后在 它不见了.

## 使用量

```sh
weaver build                        # compile the TypeScript project
weaver start --watch                # start in watch mode, restarting on changes
weaver generate                     # generate types and the Prisma schema from the models
weaver migration new <name>         # create a database migration
weaver migrate                      # apply the pending migrations
weaver seed --build-project         # build the project, then run the seeders
weaver openapi --format yaml        # export the OpenAPI specification
weaver run src/tasks/report.ts      # run the default export of a file with the application, then exit
weaver test setup                   # create the temporary test database (NODE_ENV=test)
weaver config schema                # write the JSON Schema of appweaver.json from the enabled modules
weaver config print                 # print every config value with its source, the secrets hidden
weaver config check                 # validate the config, i.e. NODE_ENV=prod in CI (exit 1 on an error)
weaver module add redis docker      # add modules to the project, from the scaffold templates
weaver module add appweaver-gcs     # install a module package without its scripts, print its providers
weaver module new audit-log         # create the local module src/modules/audit-log/
weaver module remove docker         # remove a module, deleting its files
weaver upgrade --dry-run            # list the package upgrades without installing them
```

长旗是克巴布克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克 `--no-*` 否定`--no-skill`, (中文(简体) ), `--no-registry`, (中文(简体) ), `--no-prune`) (中文(简体) ). 运行 `weaver <command> --help` 对命令的选项,或 查看 [CLI 参考](https://github.com/lmatosevic/appweaver/blob/main/skill/references/cli.md)。 。 。 .

## 文档

-   [应用程序读取器](https://github.com/lmatosevic/appweaver#readme) - 开始、配置和每个软件包的概览
-   [代理技能](https://github.com/lmatosevic/appweaver/blob/main/skill/SKILL.md) - 向每个脚手架项目发送完整的框架参考

## 许可证

苍蝇是 [麻省理工学院执照](https://npmcn.com/package/%40appweaver/cli/LICENSE)。 。 。 .

## 常见问题

### @appweaver/cli 是什么？

Appweaver - AI-First开发的后端框架 \(@cli\)

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

在项目目录运行 npm install @appweaver/cli，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：typescript（^5\.9\.0）、@appweaver/core（^2\.4\.1）、@appweaver/common（^2\.4\.1）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。它还提供命令行工具 weaver，可以用 npx weaver 直接运行。

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

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

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

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

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

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

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

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

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

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

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

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

