@appweaver/create

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

Appweaver - the backend framework for AI-first development (@create)

原始使用文档
文档目录5 节
  1. Description
  2. Usage
  3. Module packages
  4. Documentation
  5. License

Appweaver Logo

Scaffold a new Appweaver application or module package in one command.

NPM Version Package License NPM Downloads

Description

@appweaver/create generates a ready-to-run Appweaver project for Node or Bun: the source layout, configuration files per environment, a seeded admin user, the test setup, the agent skill files for the chosen AI agent, and the optional modules (Redis, queue, scheduler, mailer, templates, locales, Docker files). It also creates module packages, the drivers and features published to npm.

Usage

npm create @appweaver <name> [description] -- [options]
npx @appweaver/create <name> [description] [options]
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 passes the options after -- to the create-appweaver binary, npx takes them directly.

FlagDescriptionDefault
--add <modules...>Modules to add to the default ones, separated by spaces or commasdata web
--allAdd every modulefalse
--exclude <modules...>Modules to leave out of the default ones or of --all, by spaces or commasnone
-o, --output-dir <dir>Output directory (use ./ for current working directory)project name
--database <type>sqlite, postgresql, mysql, sqlserver, the database of datasqlite
--host <host>Hostname or IP address the server of web binds to0.0.0.0
--port <port>Port number the server of web listens on5000
--bunUse Bun as the application runtimeNode
--agent <agent>claude, codex, junie, cursor, copilot, opencode, kiro, pi, noneclaude
--no-installSkip the installation of the dependenciesinstalls

The base project depends only on @appweaver/cli, @appweaver/common, @appweaver/core and TypeBox, a minimal application without a database or a server, and data and web are added to it by default, making a web API. --exclude leaves out any module, the default ones included and without --all: --exclude web keeps the database without a server, --exclude data web the core application alone (web requires data, so excluding data alone is refused). A module installs its packages, and a module required by an added one is added along with it:

ModuleAddsWithout it
data (default)@appweaver/data, @appweaver/sharp, Prisma, database/, the generated types, the test databaseno database
web (default)@appweaver/web, requires data, the server config, the User auth resource, its admin seeder and public/no HTTP server, no auth model
redis@appweaver/redis, the Redis connection, the Redis service of docker-compose.ymlmemory, cache and rate limit in the process
queue@appweaver/bullmq, requires redisin-memory queue
scheduler@appweaver/cronscheduler disabled
mailer@appweaver/nodemailer, the account email templates with templates, their texts with localesmailer disabled
templates@appweaver/handlebars and templates/no template engine
localeslocales/en.json, empty without the mailerEnglish texts written into the templates
dockerDockerfile, .dockerignore, docker-compose.yml, start.shno Docker files

The modules of an existing project are managed with the weaver CLI, from the same templates:

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

With data, create the first migration and seed the database:

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

Module packages

npm create @appweaver module <package> [description] -- [options]
npm create @appweaver module @acme/appweaver-gcs "Google Cloud Storage driver" -- --contract storage
npx @appweaver/create module @acme/appweaver-audit
FlagDescriptionDefault
-o, --output-dir <dir>Output directorypackage name without its scope
--contract <contract>The contract its driver implements: storage, mailer, none for a featurenone

The package is a module enabled by installing it: its package.json has the appweaver.module field and the appweaver-module keyword, with @appweaver/common and @appweaver/core as peer dependencies. It holds the manifest (src/module.ts), a config section (src/config.ts), and either a driver class (GcsStorage, <Name>Mailer) with a test running the contract suite of @appweaver/testing, or the startup code of a feature module (src/main.ts), with the TypeScript and Jest setup. The short name, without the scope and the appweaver- prefix (gcs), is the name of its provider and of its config section (storage.gcs for a storage driver).

cd appweaver-gcs
npm install
npm test
npm publish

An application then adds it with weaver module add @acme/appweaver-gcs.

Documentation

  • Appweaver README – getting started, configuration, and the overview of every package
  • Agent skill – the complete framework reference shipped to every scaffolded project

License

Appweaver is MIT licensed.

版本与发布记录

@appweaver/create 共发布 11 个版本,首次发布于 2026/10/24;过去 12 个月发布了 11 个版本。

版本发布日期距今
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/create 的常见问题

@appweaver/create 是什么?

Appweaver - the backend framework for AI-first development (@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 和提交记录判断。