# @appweaver/create 中文文档

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

版本：2\.4\.1
npm 元数据更新时间：2026-11-01T13:28:39.236Z
中文译文更新时间：2026-11-07T02:05:47.685Z
软件包许可：MIT

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

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

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

- 包体积（解压后）：685 kB，130 个文件
- 模块格式：CommonJS
- TypeScript 类型：包内自带
- Node.js 要求：\>= 24\.7
- 运行依赖：2 个
- 首次发布：2026-10-24T13:35:04.444Z
- 最新版本发布：2026-11-01T13:28:39.072Z
- 近 30 天下载量：2084（2026-10-07 至 2026-11-05，npm 官方下载统计）
- 已发布版本数：11（近 12 个月 11 个）

## 中文简介

Appweaver - AI- first开发的后端框架 (@create)

## 安装

```sh
npm install @appweaver/create
```

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

## README

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

脚手架 新的 [上诉人](https://appweaver.co/) 一个命令中的应用程序或模块包.

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

## 说明

`@appweaver/create` 生成一个用于节点或 Bun 的准备运行的 Appweaver 项目: 源版式, 配置文件 每个环境、种子管理员用户、测试设置、选定AI代理的代理技能文件以及可选 模块(Redis、队列、调度器、邮件、模板、地方、多克文件)。 这也创造了 [模块软件包](https://npmcn.com/package/%40appweaver/create/#readme-module-packages),向 npm 发布的驱动器和特性.

## 使用量

```sh
npm create @appweaver <name> [description] -- [options]
npx @appweaver/create <name> [description] [options]
```

```sh
npm create @appweaver MyApp "My awesome API" -- --database postgresql --add redis queue docker
npx @appweaver/create MyApp "My awesome API" --all --exclude scheduler
npx @appweaver/create Reports "Nightly reports" --add scheduler --exclude web   # a database worker, no server
npx @appweaver/create Calculator "A calculator" --exclude data web              # the core application alone
```

npm 后通过选项 `--` 页:1 `create-appweaver` 二进制, `npx` 直接带走.

| 旗帜 | 说明 | 默认 |
| --- | --- | --- |
| `--add <modules...>` | 用空格或逗号分隔到默认的模块 | `data web` |
| `--all` | 添加每个模块 | 虚假 |
| `--exclude <modules...>` | 退出默认模块或 `--all`,按空格或逗号 | 无 |
| `-o, --output-dir <dir>` | 输出目录( 用于当前工作目录 ) | 项目名称 |
| `--database <type>` | `sqlite`, (中文(简体) ), `postgresql`, (中文(简体) ), `mysql`, (中文(简体) ), `sqlserver`数据库 `data` | `sqlite` |
| `--host <host>` | 服务器的主机名或 IP 地址 `web` 约束 | `0.0.0.0` |
| `--port <port>` | 服务器的端口编号 `web` 监听 | `5000` |
| `--bun` | 使用 Bun 作为程序运行时间 | 节点 |
| `--agent <agent>` | `claude`, (中文(简体) ), `codex`, (中文(简体) ), `junie`, (中文(简体) ), `cursor`, (中文(简体) ), `copilot`, (中文(简体) ), `opencode`, (中文(简体) ), `kiro`, (中文(简体) ), `pi`, (中文(简体) ), `none` | `claude` |
| `--no-install` | 跳过依赖关系的安装 | 安装 |

基础项目仅取决于 `@appweaver/cli`, (中文(简体) ), `@appweaver/common`, (中文(简体) ), `@appweaver/core` 和类型框,最小值 没有数据库或服务器的应用程序,以及 `data` 财务报告和审定财务报表 `web` 默认情况下将添加到其中,生成一个网页 API. `--exclude` 退出任何模块, 包括默认模块和不包含模块 `--all`数字 : `--exclude web` 保存数据库 没有服务器, `--exclude data web` 仅核心应用程序`web` 需求 `data`因此排除 `data` 独自一人 (拒绝)。 一个模块安装其软件包,同时添加一个新增软件包所需的模块:

| 模块 | 添加数 | 没有它 |
| --- | --- | --- |
| `data` (默认) | `@appweaver/data`, (中文(简体) ), `@appweaver/sharp`普丽斯玛, `database/`,生成的类型,测试数据库 | 没有数据库 |
| `web` (默认) | `@appweaver/web`时,需要 `data`,服务器配置 `User` 授权资源、其管理者 `public/` | 没有 HTTP 服务器, 没有认证模型 |
| `redis` | `@appweaver/redis`, Redis连接, Redis服务 `docker-compose.yml` | 内存、缓存和速率限制 |
| `queue` | `@appweaver/bullmq`时,需要 `redis` | 模拟队列 |
| `scheduler` | `@appweaver/cron` | 已禁用调度器 |
| `mailer` | `@appweaver/nodemailer`,账户电子邮件模板 `templates`,其文本与 `locales` | 邮件已禁用 |
| `templates` | `@appweaver/handlebars` 财务报告和审定财务报表 `templates/` | 无模板引擎 |
| `locales` | `locales/en.json`,没有邮件的空 | 编入模板的英文文本 |
| `docker` | `Dockerfile`, (中文(简体) ), `.dockerignore`, (中文(简体) ), `docker-compose.yml`, (中文(简体) ), `start.sh` | 无 Docker 文件 |

现有项目的模块与 `weaver` CLI,来自同一模板:

```sh
npx weaver module list
npx weaver module add templates locales
npx weaver module remove docker
```

与 `data`,创建第一个迁移并生成数据库:

```sh
cd my-app
npx weaver migration new init
npm run seed
npm run dev
```

## 模块软件包

```sh
npm create @appweaver module <package> [description] -- [options]
```

```sh
npm create @appweaver module @acme/appweaver-gcs "Google Cloud Storage driver" -- --contract storage
npx @appweaver/create module @acme/appweaver-audit
```

| 旗帜 | 说明 | 默认 |
| --- | --- | --- |
| `-o, --output-dir <dir>` | 输出目录 | 包名,不含其范围 |
| `--contract <contract>` | 其司机的合同规定: `storage`, (中文(简体) ), `mailer`, (中文(简体) ), `none` 特性 | `none` |

软件包是一个模块,通过安装它而启用: `package.json` 拥有 `appweaver.module` 区域 `appweaver-module` 关键词,与 `@appweaver/common` 财务报告和审定财务报表 `@appweaver/core` 作为同伴的依赖关系。 它拿着货单 (单位:千美元)`src/module.ts`),一个配置部分(`src/config.ts`),或是一个驾驶班(`GcsStorage`, (中文(简体) ), `<Name>Mailer`带有 测试运行合同套件 `@appweaver/testing`,或特性模块的启动代码(`src/main.ts`),与 typeScript 和 Jest 设置。 简称,没有范围和 `appweaver-` 前缀( e)`gcs`),名称是 提供方及其配置部分`storage.gcs` 用于存储驱动器).

```sh
cd appweaver-gcs
npm install
npm test
npm publish
```

申请后加入 `weaver module add @acme/appweaver-gcs`。 。 。 .

## 文档

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

## 许可证

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

## 常见问题

### @appweaver/create 是什么？

Appweaver - AI- first开发的后端框架 \(@create\)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

