create-pds CLI
create-pds scaffolds a new Cirrus PDS project. It is published as the create-pds npm package and invoked via the standard npm create (or equivalent for other package managers).
Invoke
Section titled “Invoke”npm create pds@latest [project-directory] [flags]Or with pnpm / yarn / bun:
pnpm create pds@latestyarn create pdsbun create pdsThe optional project-directory argument sets the folder name. If omitted, the scaffolder prompts.
What it does
Section titled “What it does”- Prompts for the project folder name, package manager, and whether to initialise a git repository.
- Copies the
pds-workertemplate into the folder. - Renames
gitignoreto.gitignoreand substitutes template variables ({{name}},{{pdsVersion}}). - Installs dependencies using the chosen package manager.
- Runs
pds initto start the setup wizard.
The generated project includes:
package.jsonwith scripts fordev,deploy, andpds.wrangler.jsoncwith the Durable Object binding, R2 bucket, and Vars pre-configured..env.exampletemplate for secrets.vite.config.tsfor local dev.src/index.tsthat re-exports the@getcirrus/pdsWorker.- A starter
README.md.
| Flag | Effect |
|---|---|
--package-manager <pm>, --pm <pm> | Choose pnpm, npm, yarn, or bun without prompting. |
--skip-install | Skip the dependency install step. |
--skip-git | Skip git init. |
--skip-init | Skip running pds init at the end. The project is scaffolded but not configured. |
--yes, -y | Accept all defaults. Non-interactive. |
Example for a fully unattended scaffold:
npm create pds@latest my-pds -- --yes --pm pnpm --skip-init--skip-init is useful in scripted setups that handle the wizard separately.
After scaffolding
Section titled “After scaffolding”The generated project is a regular Cloudflare Workers project that depends on @getcirrus/pds. All ongoing operations use the pds CLI from inside the generated project — see pds CLI.