@aws/nx-plugin

中文文档
1.3.3发布于 2026/11/04Apache-2.0TypeScriptES Module构建来源已验证近 30 天下载 3.9万
原始使用文档
文档目录9 节
  1. Build full-stack AWS apps in minutes
  2. Quick Start
  3. Build with AI
  4. Build with the CLI
  5. Available Generators
  6. Community
  7. Contributing
  8. Code of Conduct
  9. License

Nx Plugin for AWS

Build full-stack AWS apps in minutes

Apache 2.0 License Release badge Commit activity

Documentation Site


@aws/nx-plugin is a collection of code generators that scaffold full-stack AWS applications inside an Nx monorepo. Every generator produces best-practice application code and the infrastructure to deploy it — type-safe, locally runnable, and deployable from the start, getting you closer to production.

Scaffolding, running and deploying a full-stack AWS application with the Nx Plugin for AWS

Quick Start

Build with AI

1. Create a workspace

pnpm create @aws/nx-workspace my-project
cd my-project

2. Open your AI assistant in the created workspace and prompt it

"Use the Nx Plugin for AWS to build a full-stack application consisting of a React website with shadcn and Cognito authentication, connected to a TypeScript Strands agent via the AG-UI protocol, and infrastructure to deploy it."

Your AI assistant will use the Nx Plugin for AWS MCP server, which is preconfigured in every workspace you create with the command above, to scaffold, connect, and configure everything. See the Building with AI guide for more details.

Build with the CLI

Create a workspace and start adding components — zero configuration required:

# Create a new workspace
pnpm create @aws/nx-workspace my-project
cd my-project

# Add a tRPC API
pnpm nx g @aws/nx-plugin:ts#api --framework=trpc

# Add a Strands AI agent (Python)
pnpm nx g @aws/nx-plugin:py#agent

# Add a React website
pnpm nx g @aws/nx-plugin:ts#website --framework=react

# Add authentication to your website
pnpm nx g @aws/nx-plugin:ts#website#auth

# Connect your website to your API and agent
pnpm nx g @aws/nx-plugin:connection

# Add CDK infrastructure to deploy it all (or choose Terraform)
pnpm nx g @aws/nx-plugin:ts#infra

See the full Quick Start guide and Dungeon Adventure tutorial for a deeper walkthrough.

Available Generators

GeneratorDescription
initConfigure an existing Nx workspace to use the plugin
ts#projectTypeScript library
ts#apiTypeScript API (tRPC or Smithy) with API Gateway + Lambda + Powertools
ts#rdbRelational databases with Aurora RDS
ts#dynamodbType-safe DynamoDB single-table design (TypeScript, ElectroDB)
ts#websiteReact app (Vite)
ts#website#authAdd Cognito auth to a website
ts#infraAWS CDK infrastructure project
ts#lambda-functionTypeScript Lambda with type-safe event sources
ts#mcp-serverMCP server (TypeScript)
ts#dcr-proxyOAuth DCR proxy construct for Cognito-authenticated MCP servers
ts#agentStrands Agent (TypeScript)
ts#agent#guardrailsAmazon Bedrock Guardrail for a TypeScript Agent (experimental)
ts#nx-generatorNx generator scaffold
ts#docsDocumentation site (Astro + Starlight)
smithy#projectSmithy model project — a service model, or a shape library shared between Smithy projects
py#projectPython project (uv)
py#apiPython API (FastAPI) with API Gateway + Lambda + Powertools
py#rdbRelational databases with Aurora RDS (Python)
py#dynamodbPython DynamoDB project
py#lambda-functionPython Lambda with type-safe event sources
py#mcp-serverMCP server (Python)
py#agentStrands Agent (Python)
py#agent#guardrailsAmazon Bedrock Guardrail for a Python Agent (experimental)
agentcore-gatewayAgentCore Gateway project
greengrass#componentAWS IoT Greengrass v2 component for Python or TypeScript (experimental)
agentcore-harnessAgentCore Harness agent loop (experimental)
connectionConnect projects together (e.g. frontend to API)
terraform#projectTerraform project
licenseManage LICENSE files and source headers

Community

Join us on Slack in the #nx-plugin-for-aws channel to ask questions, share feedback, and connect with other users and contributors.

Contributing

Read our Contributing Guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes.

Code of Conduct

This project has adopted a Code of Conduct that we expect project participants to adhere to. Please read the Code of Conduct so that you can understand what actions will and will not be tolerated.

License

@aws/nx-plugin is Apache 2.0 licensed.

版本与发布记录

@aws/nx-plugin 共发布 329 个版本,首次发布于 2024/12/12;过去 12 个月发布了 223 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.3.3latest2026/11/043 天前
1.3.22026/10/299 天前
1.3.12026/10/2711 天前
1.3.02026/10/2513 天前
1.2.02026/10/2414 天前
1.1.12026/10/2315 天前

其他发布通道:next → 1.0.0-rc.24。

关于 @aws/nx-plugin 的常见问题

如何安装 @aws/nx-plugin?

在项目目录运行 npm install @aws/nx-plugin,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:nx(23.3.1)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@aws/nx-plugin 支持 TypeScript 吗?

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

@aws/nx-plugin 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@aws/nx-plugin 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js ^22.13.0 || ^24.0.0 || >=26.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@aws/nx-plugin 可以商用吗?

@aws/nx-plugin 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@aws/nx-plugin 的下载量有多少?

根据 npm 官方下载统计,@aws/nx-plugin 在 2026/10/08 – 2026/11/06 这 30 天内被下载 38,721 次,日均约 1,291 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@aws/nx-plugin 还在维护吗?

最新版本 1.3.3 发布于 2026/11/04(3 天前);至今共发布 329 个版本,其中过去 12 个月发布了 223 个;首次发布于 2024/12/12。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。