@durable-streams-cloudflare/cli
v0.7.0
Published
CLI for scaffolding, deploying, and managing Durable Streams on Cloudflare
Readme
@durable-streams-cloudflare/cli
Setup wizard and project management CLI for Durable Streams on Cloudflare.
Usage
npx @durable-streams-cloudflare/cli <command>setup
Scaffolds a new project, creates Cloudflare resources, and deploys.
npx @durable-streams-cloudflare/cli setupThe wizard walks you through:
- Preflight — checks for wrangler and Cloudflare auth
- Component selection — choose which workers to deploy (core, subscription, admin dashboards)
- Cloudflare resources — creates an R2 bucket and KV namespace
- pnpm workspace scaffolding — generates a workspace with per-worker packages:
my-project/
├── package.json # root workspace (dev/deploy scripts, wrangler)
├── pnpm-workspace.yaml # declares workers/*
├── pnpm-lock.yaml # single lockfile
└── workers/
├── streams/
│ ├── package.json # depends on @durable-streams-cloudflare/core
│ ├── wrangler.toml
│ └── src/worker.ts
├── subscriptions/
│ ├── package.json # depends on @durable-streams-cloudflare/subscription
│ ├── wrangler.toml
│ └── src/worker.ts
├── admin-core/
│ ├── package.json # depends on @durable-streams-cloudflare/admin-core
│ └── wrangler.toml
└── admin-subscription/
├── package.json # depends on @durable-streams-cloudflare/admin-subscription
└── wrangler.toml- Install — single
pnpm installat root resolves all workspace dependencies - Deploy — deploys each worker to Cloudflare
- First project — optionally creates a project with a JWT signing secret
- Git + GitHub — optionally initializes a repo and pushes to GitHub
After setup, you can run all workers locally with:
pnpm devOr deploy everything with:
pnpm deploycreate-project
Creates a new project with a JWT signing secret in the REGISTRY KV namespace.
npx @durable-streams-cloudflare/cli create-projectThis generates (or accepts) a signing secret and writes it to KV. You use this secret to mint JWTs for authenticating API requests.
Prerequisites
License
MIT
