@cdklabs/cdk-cicd-wrapper-cli

中文文档
1.4.2发布于 2026/11/09Apache-2.0TypeScriptCommonJS构建来源已验证近 30 天下载 3558

This repository contains the infrastructure as code to wrap your AWS CDK project with CI/CD around it.

原始使用文档
文档目录12 节
  1. Table of Contents
  2. Installation
  3. Usage
  4. Autopilot pipeline commands
  5. Compliance Bucket
  6. Security Scanning
  7. License Management
  8. License Management Configuration
  9. Check Dependencies
  10. Validate
  11. Contributing
  12. License

CDK CI/CD Wrapper CLI

License

The CDK CI/CD Wrapper CLI is a command-line interface (CLI) tool designed to streamline and automate various tasks related to AWS Cloud Development Kit (CDK) projects. It drives the Autopilot pipeline (exec, deploy-ci, synth, deploy, check, migrate) and provides a set of utilities to manage compliance, security, licensing, and dependency management, all within a single interface.

Table of Contents

Installation

To install the CDK CI/CD Wrapper, you'll need to have Node.js and npm (Node Package Manager) installed on your system. Once you have those prerequisites, you can install the CDK CI/CD Wrapper globally using the following command:

npm install -g @cdklabs/cdk-cicd-wrapper-cli

Alternatively, you can use the npx command to run the CDK CI/CD Wrapper CLI without installing it globally:

npx @cdklabs/cdk-cicd-wrapper-cli [command]

Usage

The CDK CI/CD Wrapper CLI provides several commands to help you manage various aspects of your CDK project. Here are the available commands and their descriptions:

Autopilot pipeline commands

These commands drive the Autopilot (1.x) config-driven pipeline defined in cicd.config.ts. Run any of them with --help for the full flag set (--help is authoritative and always current):

npx cdk-cicd <command> --help

Experimental. The Autopilot pipeline commands are pre-release and still evolving; flags and behaviour may change before the 1.0 release.

CommandDescription
execRun a CDK app under the wrapper — the single entry point that activates the pipeline for every engine, reading the engine and stages from cicd.config. Referenced from cdk.json as "app": "npx cdk-cicd exec bin/app.ts".
synthSynthesize the app per stage/region (--stage, or --all for full CI validation).
deploySynth, drift-check, and deploy a stage across its regions (--stage), or run the container-mode executor (--from-image).
deploy-ciProvision the pipeline itself into the hub account, from cicd.config.ts alone — the one command you run by hand; everything after it is the pipeline deploying the application. --disposable tears down the pipeline's artifact bucket and key with the stack.
checkRun the default-on CI checks (validate, audit, license, security) — the default build step.
migrateGenerate an Autopilot cicd.config.ts from an existing 0.x PipelineBlueprint entry file (--entry, --application, --dry-run).

See the CLI reference for the full command documentation.

Compliance Bucket

The npx @cdklabs/cdk-cicd-wrapper-cli compliance-bucket command creates S3 buckets to hold logs for compliance purposes.

Security Scanning

The npx @cdklabs/cdk-cicd-wrapper-cli security-scan command scans your codebase for security vulnerabilities. You can read more about the built-in security functionalities in the Security Developer Guide.

License Management

The npx @cdklabs/cdk-cicd-wrapper-cli license command can validate and generate a NOTICE file for your project. The NOTICE file consistency is tested by this command and is included in the CodePipeline Build step to ensure the file is always up-to-date.

To update the NOTICE file, run the following command:

npx @cdklabs/cdk-cicd-wrapper-cli license --fix

License Management Configuration

The license management script configuration can be specified in the licensecheck.json file. Here's an example configuration:

{
  "failOnLicenses": ["MIT License"],
  "npm": {
    "excluded": [],
    "excludedSubProjects": ["./example/package.json"]
  },
  "python": {
    "excluded": [],
    "excludedSubProjects": ["./example/Pipfile"]
  }
}
  • Banned licenses can be listed on the failOnLicenses attribute. The license name match is case-sensitive.
  • Subfolders whose Pipfile or package.json file should be excluded from the license check should be listed under the npm.excludedSubProjects or python.excludedSubProjects attributes.
  • For NPM packages, the subfolder also needs to contain a package-lock.json file to ensure the correct dependencies are installed and checked.
  • Dependencies can be excluded from the license verification for NPM and Python as well.

For more information on license management configuration options, refer to the License Management Configuration section.

Check Dependencies

The npx @cdklabs/cdk-cicd-wrapper-cli check-dependencies command audits your project's dependencies.

Validate

The npx @cdklabs/cdk-cicd-wrapper-cli validate command ensures that the package-lock.json file has not been tampered with.

Contributing

Contributions to the CDK CI/CD Wrapper are welcome! If you'd like to contribute, please follow the guidelines outlined in the CONTRIBUTING.md file.

License

The CDK CI/CD Wrapper CLI is licensed under the Apache 2.0 License.

版本与发布记录

@cdklabs/cdk-cicd-wrapper-cli 共发布 72 个版本,首次发布于 2024/05/07;过去 12 个月发布了 31 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.4.2latest2026/11/09今天
1.4.12026/11/09今天
1.4.02026/11/062 天前
1.3.62026/10/1921 天前
1.3.52026/10/051 个月前
1.3.42026/09/231 个月前

关于 @cdklabs/cdk-cicd-wrapper-cli 的常见问题

@cdklabs/cdk-cicd-wrapper-cli 是什么?

This repository contains the infrastructure as code to wrap your AWS CDK project with CI/CD around it.

如何安装 @cdklabs/cdk-cicd-wrapper-cli?

在项目目录运行 npm install @cdklabs/cdk-cicd-wrapper-cli,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 cdk-cicd,可以用 npx cdk-cicd 直接运行。

@cdklabs/cdk-cicd-wrapper-cli 支持 TypeScript 吗?

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

@cdklabs/cdk-cicd-wrapper-cli 支持 ESM 还是 CommonJS?

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

@cdklabs/cdk-cicd-wrapper-cli 需要什么版本的 Node.js?

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

@cdklabs/cdk-cicd-wrapper-cli 可以商用吗?

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

@cdklabs/cdk-cicd-wrapper-cli 的下载量有多少?

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

@cdklabs/cdk-cicd-wrapper-cli 还在维护吗?

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