← Back to Pull requests

Rewrite the CLI help #8577

Closed
unknown closed this pull request without merging on Nov 18, 2026 07:20 UTC
View on GitHub
unknown unknown commented on Nov 18, 2026 04:02 UTC
Author

workerd -h printed only the command names, so serving one Worker took several more --help calls. The help is now written by hand in cli/help.rs, one page per command, at most 80 columns, and a test checks every page against the parser. workerd serve --help shows a complete cluster setup: a fresh agent given only the binary and an S3 bucket started a two-instance cluster and checked failover in 11 commands.

The new workerd -h:


workerd runs Cloudflare Workers on your own machines: JavaScript,
TypeScript, Wasm and Python, from a wrangler.json, on one machine or many.
Durable Objects, KV, Queues, Cron Triggers, Workflows, D1 and static
assets are built in.

Usage:
  workerd serve <config>             Serve the Worker
  workerd test <config> [filter]     Run its test handlers
  workerd bench <config> [filter]    Run its bench handlers
  workerd compile <config> > app     Build a self-contained binary
  workerd <command> --help           Everything else about a command

Quick start:
  index.js       export default { fetch: () => new Response("hello") };
  wrangler.json  { "main": "index.js", "compatibility_date": "2026-11-01" }

  $ workerd serve wrangler.json --watch        # http://localhost:8787

Cluster (experimental):
  Machines that share an object store bucket serve as one: each Durable
  Object runs on one machine, and any machine routes to it. The cluster
  key and the bucket grant full control and peer traffic is unencrypted,
  so keep peers on a private network. Setup: workerd serve --help.

Config:
  A wrangler.json or wrangler.jsonc, as for wrangler dev, with fields:
    name, main, compatibility_date, compatibility_flags, vars,
    durable_objects, exports, migrations, no_bundle
    with --experimental: kv_namespaces, queues, triggers, workflows,
    d1_databases, assets
  Other fields are errors. esbuild (node_modules or PATH) bundles main
  unless no_bundle is set. State: .wrangler/state/workerd/. A .capnp
  config also works.

Options:
  -s, --socket-addr <name>=<addr>    Serve on addr, as in -s http=*:8080
  -i, --inspector-addr <addr>        Accept DevTools connections
  -w, --watch                        Reload when files change
      --experimental                 Allow experimental features
      --verbose                      Log to stderr
  -h, --help                         Print this help
  -V, --version                      Print the newest supported compat date

More, in each command's --help:
  serve          sockets, cluster, --debug-port, tracing, Python
  test           filters, --predictable, --compat-date
  bench          writing benchmarks, filters, JSON output
  compile        --config-only

workerd is not a hardened sandbox; run untrusted code in a VM.

Docs:
  workerd        https://github.com/cloudflare/workerd
  Workers APIs   https://developers.cloudflare.com/workers/runtime-apis/
  Bugs           https://github.com/cloudflare/workerd/issues

Diff: 368 lines (+276 / -92) across 4 files Reviewer: ryanking13 Review duration: 198m
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.43) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 368 lines diff across 4 files
0.43
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
56%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.354
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #8577"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 56.8% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 42.8% (MEDIUM) · Higher = larger blast radius
42.8%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 56.8% · Lower = rushed or shallow review
56.8%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 18.5% · Safe to merge
18.5%