@cdkd/cli

中文文档
0.335.0发布于 2026/11/09Apache-2.0TypeScriptES Module构建来源已验证近 30 天下载 4410

Drop-in CDK CLI for existing CDK apps - up to 15x faster deploys via direct AWS SDK calls instead of CloudFormation

原始使用文档
文档目录12 节
  1. The fastest way to deploy AWS CDK.
  2. Installation
  3. Quick Start
  4. Use with AI Coding Agents
  5. Claude Code
  6. Other agents (Codex, Cursor, and more)
  7. Contributors
  8. Documentation
  9. Benchmark
  10. vs CloudFormation Express mode: up to 9x faster
  11. vs Terraform: cdkd deploys faster
  12. License

cdkd logo

cdkd (CDK Direct)

npm version Downloads License: Apache-2.0

The fastest way to deploy AWS CDK.

Drop-in CDK CLI for existing CDK apps — up to 15x faster deploys via direct AWS SDK calls instead of CloudFormation.

📚 Documentation: cdkd.dev


  • Drop-in CDK compatible: your existing CDK app code runs as-is; just replace cdk deploy with cdkd deploy.
  • Up to 15x faster deploys: direct SDK calls, aggressive parallelization, and --no-wait to skip slow stabilization waits; faster than Terraform and CloudFormation Express mode too (see Benchmark).

cdk deploy vs cdkd deploy — side-by-side, 35s recording, real AWS deploy. cdkd finishes while cdk is still creating its CloudFormation changeset.

cdkd complements the AWS CDK CLI rather than replacing it. Use cdkd in dev/test for rapid iteration; use the AWS CDK CLI in production for full CloudFormation tooling. Install cdkd alongside an existing cdk deploy workflow: no migration needed. You can also import existing stacks into cdkd or export back to CloudFormation anytime.

A natural fit for AI-driven development. AI coding agents iterate in tight spin-up / tear-down loops — and cdkd keeps each turn short, with fast deploys and an equally fast cdkd destroy that deletes via direct SDK calls instead of polling a CloudFormation stack-delete.

Local execution from your deployed stack. cdkd local runs your functions, APIs, and ECS tasks on your machine. It can resolve env vars, secrets, and resource references from your real deployed stack: no hand-written .env files, no hand-seeded test data (see Local execution).

[!IMPORTANT] cdkd is for dev/test workflows only — early in development, not yet production-ready.

Installation

npm i -g @cdkd/cli            # latest release
npm i -g @cdkd/cli@<version>  # pin to a specific version

The installed binary is cdkd. It requires Node.js 22.12 or later.

cdkd was formerly published as @go-to-k/cdkd; that package is deprecated and receives no further releases. Both packages install the same cdkd binary, so remove the old one before installing the new one:

npm rm -g @go-to-k/cdkd && npm i -g @cdkd/cli

Quick Start

First-time setup: run cdkd bootstrap once per AWS account before any other command; it replaces cdk bootstrap, which cdkd does not require (details in Getting Started).

# Bootstrap (creates S3 state bucket + asset storage — one-time setup per AWS account)
cdkd bootstrap

# List stacks in the CDK app
cdkd list

# Deploy your CDK app
cdkd deploy

# Deploy at maximum speed: skip slow stabilization waits
cdkd deploy --no-wait

# Check what would change
cdkd diff

# Tear down
cdkd destroy

Use with AI Coding Agents

This repository ships a cdkd skill that teaches AI coding agents to use cdkd safely (AI agents guide).

Claude Code

Install it as a plugin (one-time setup) by running these inside a Claude Code session:

/plugin marketplace add go-to-k/cdkd
/plugin install cdkd-skills@cdkd

Then ask Claude to deploy a dev/test CDK stack with cdkd — the skill triggers automatically — or invoke it directly with /cdkd.

Other agents (Codex, Cursor, and more)

Any agent that supports the SKILL.md format can use the skill. Install it with the GitHub CLI (v2.90+) or npx skills:

gh skill install go-to-k/cdkd cdkd
# or
npx skills add go-to-k/cdkd --skill cdkd

Contributors

To test the current checkout against another CDK project, clone this repository and add it to a Claude Code session — the project-scoped /use-cdkd skill covers building and linking the checkout:

claude --add-dir /path/to/cdkd

Documentation

Full documentation lives at cdkd.dev:

Benchmark

cdkd deploys up to 15x faster than AWS CDK (CloudFormation) on SDK-Provider-handled stacks; the per-stack speedup widens with size and parallelism.

Deploy race on a VPC + CloudFront + Lambda stack: AWS CDK (CloudFormation) 599 s, cdkd 96 s (~6x faster), cdkd --no-wait 40 s (15.0x faster). Deploy phase only.

vs CloudFormation Express mode: up to 9x faster

CloudFormation's Express mode is a fast-deploy option that skips resource stabilization waits, similar in spirit to cdkd's --no-wait. Even so, cdkd is faster than Express on nearly every stack, and with --no-wait it pulls dramatically ahead on stacks dominated by async resources.

StackNormal (CFn)Expresscdkdcdkd --no-wait
VPC + Lambda + SQS + CloudFront5623669640
DynamoDB34341915
DynamoDB + KMS71552727
EC244312726
Lambda55342322
S339222324
SQS832299
SQS + CloudWatch87443031

Best of 3 runs, deploy-phase only, seconds, us-west-2.

vs Terraform: cdkd deploys faster

We also raced cdkd against Terraform: the same logical stacks expressed both as CDK apps and as Terraform HCL, deployed against real AWS. cdkd is clearly faster in four of six scenarios — 1.23x to 2.31x, with fully separated run distributions — and statistically tied in the rest.

ScenarioStackcdkdTerraformCloudFormationcdkd --no-wait
wide48 independent resources (S3 / DynamoDB / SQS / SNS / SSM / Logs, 8 each)20.046.189.121.1
serverlessLambda ×3 + HTTP API + DynamoDB + SNS / SQS + EventBridge25.957.5127.124.6
ec2VPC + subnet + SG + IAM role + EC2 instance ×329.135.9193.922.0
webappVPC + NAT + subnets + DynamoDB + SQS + S3 + Lambda ×2 + HTTP API109.7127.3166.123.4
ecs — steady stateVPC ×2 AZ + Fargate cluster / task / service + ALB176.2228.9 (wait_for_steady_state = true)276.734.5
cloudfront — created (fire and forget)S3 origin + CloudFront + OAC11.110.3 (wait_for_deployment = false)no such mode10.4
cloudfront — DeployedS3 origin + CloudFront + OAC174.0 (--full-wait)166.4232.3n/a

Cold end-to-end wall clock including synth / plan, median of 7 runs, seconds, us-east-1. The ecs cdkd and Terraform cells come from a later round than the rest of the table.

Full methodology, distribution analysis, per-run data, and the complete suite (SDK Provider path, Cloud Control fallback path, the 15x headline stack): cdkd.dev/benchmarks/.

License

Apache 2.0

版本与发布记录

@cdkd/cli 共发布 24 个版本,首次发布于 2026/11/03;过去 12 个月发布了 24 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.335.0latest2026/11/09今天
0.334.32026/11/081 天前
0.334.22026/11/081 天前
0.334.12026/11/081 天前
0.334.02026/11/071 天前
0.333.12026/11/072 天前

关于 @cdkd/cli 的常见问题

@cdkd/cli 是什么?

Drop-in CDK CLI for existing CDK apps - up to 15x faster deploys via direct AWS SDK calls instead of CloudFormation

如何安装 @cdkd/cli?

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

@cdkd/cli 支持 TypeScript 吗?

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

@cdkd/cli 支持 ESM 还是 CommonJS?

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

@cdkd/cli 需要什么版本的 Node.js?

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

@cdkd/cli 可以商用吗?

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

@cdkd/cli 的下载量有多少?

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

@cdkd/cli 还在维护吗?

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