@appweaver/cli

中文文档
2.4.1发布于 2026/11/01MITTypeScriptCommonJS近 30 天下载 3345

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

中文使用文档
文档目录5 节
  1. 说明
  2. 安装
  3. 使用量
  4. 文档
  5. 许可证

Appweaver Logo

这个 weaver 命令行工具 上诉人。 。 。 .

NPM Version Package License NPM Downloads

说明

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

安装

npm install @appweaver/cli

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

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

使用量

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 参考。 。 。 .

文档

许可证

苍蝇是 麻省理工学院执照。 。 。 .

版本与发布记录

@appweaver/cli 共发布 71 个版本,首次发布于 2026/05/18;过去 12 个月发布了 71 个版本。

版本发布日期距今
2.4.1latest2026/11/016 天前
2.4.02026/11/016 天前
2.3.02026/11/016 天前
2.2.02026/10/317 天前
2.1.22026/10/2513 天前
2.1.12026/10/2513 天前

关于 @appweaver/cli 的常见问题

@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 和提交记录判断。