Wiring up Workers — manage your Cloudflare Workers from a single CLI
- Node.js (16+)
- pnpm (10.13.1+)
- GitHub CLI (
gh) installed and logged in (gh auth login)
pnpm ww:init(runs automatically afterpnpm install)pnpm ww:checkhealthpnpm ww:add (repourl) (ref?)pnpm ww:listpnpm typecheck
-
Instant Bootstrap: Clone your parent repo and run
pnpm install—Wireworksautomatically scaffolds, ignores the right folders, and clones every Worker in your manifest. -
No Submodules Required: You avoid the complexity of Git submodules (nested .git folders, detached‑HEAD, manual updates) while keeping each Worker in its own repository.
-
More Flexible than a Monorepo: Each Worker repo can have its own CI, versioning, and dependency graph, but you still gain a unified entry point for bulk operations.
-
Text‑based Manifest: The
wireworks.jsonfile is version‑controlled alongside your code. Changes are transparent, diff‑friendly, and merge conflicts are easy to resolve. -
Leverages Familiar Tools: Built on
ZX,Wireit, andGitHub CLI— no new languages or binaries to learn. You stay in the Node ecosystem with fast, cached, and parallelized tasks. -
Unified Type Safety: A single
pnpm typecheckenforces TypeScript correctness across all Workers, catching cross‑repo issues before they slip into production.
- Every worker must provide a
typecheckscript in its ownpackage.json, for example:
- All worker repositories are cloned into the workers/ directory and tracked in your
wireworks.jsonmanifest:
{
"workers": [
{
"name": "repo",
"url": "git@github.com:you/repo.git",
"ref": "main",
"path": "workers/repo"
},
{
"name": "repo-2",
"url": "git@github.com:you/repo-2.git",
"ref": "main",
"path": "workers/repo-2"
}
]
}
{ "scripts": { "typecheck": "tsc --noEmit" } }