Output the commands for the user to copy-paste. Use the absolute path.
Option A: Global install via pnpm link (recommended — use cdkd as a global command)
First-time setup (run once in the cdkd repo root):
pnpm setup
source ~/.zshrc
pnpm link --global
After linking, cdkd is available as a global command from any directory.
Default (auto-resolves bucket: cdkd-state-{accountId}-{region})
cdkd bootstrap
cdkd synth
cdkd diff
cdkd deploy
cdkd deploy -c KEY=VALUE
cdkd deploy --verbose
cdkd deploy --no-wait
cdkd destroy --force
Custom state bucket
cdkd bootstrap --state-bucket my-custom-cdkd-state-bucket
cdkd deploy --state-bucket my-custom-cdkd-state-bucket
CDKD_STATE_BUCKET=my-custom-cdkd-state-bucket cdkd deploy
cdkd destroy --state-bucket my-custom-cdkd-state-bucket --force
To unlink later: pnpm unlink --global cdkd (from anywhere) or pnpm rm --global cdkd.
Note: pnpm link --global points to the current dist/cli.js, so re-running vp run build in the cdkd repo picks up changes automatically — no re-link needed.
Option B: Direct node invocation (no install needed)
Default (auto-resolves bucket: cdkd-state-{accountId}-{region})
# Bootstrap
node /path/to/cdkd/dist/cli.js bootstrap
# Synth
node /path/to/cdkd/dist/cli.js synth
# Diff
node /path/to/cdkd/dist/cli.js diff
# Deploy
node /path/to/cdkd/dist/cli.js deploy
# Deploy (with context)
node /path/to/cdkd/dist/cli.js deploy -c KEY=VALUE
# Deploy (verbose)
node /path/to/cdkd/dist/cli.js deploy --verbose
# Deploy (no wait - don't wait for resource stabilization)
node /path/to/cdkd/dist/cli.js deploy --no-wait
# Destroy
node /path/to/cdkd/dist/cli.js destroy --force
Custom state bucket
# Bootstrap
node /path/to/cdkd/dist/cli.js bootstrap --state-bucket my-custom-cdkd-state-bucket
# Deploy (--state-bucket flag)
node /path/to/cdkd/dist/cli.js deploy --state-bucket my-custom-cdkd-state-bucket
# Deploy (CDKD_STATE_BUCKET env var)
CDKD_STATE_BUCKET=my-custom-cdkd-state-bucket node /path/to/cdkd/dist/cli.js deploy
# Destroy
node /path/to/cdkd/dist/cli.js destroy --state-bucket my-custom-cdkd-state-bucket --force
(If globally linked via Option A, replace node /path/to/cdkd/dist/cli.js with cdkd in any of the above.)