The CLI
Nine commands, and this page is generated from the one that prints them — so it cannot describe a flag that does not exist.
This page is the --help text, parsed, so what you read is what the command takes.
Nothing is scaffolded or built on a typo.
In plain terms
Ten commands, and each one answers a question you would otherwise have to guess at: what routes exist, what plan a route got, what a render costs, what every region is serving, and what the build turned into files.
weft — a folder is an application. Everything below is parsed from the help text the CLI itself prints, so a flag that is not here does not exist, and one that exists cannot be missing from here: the test asserts every implemented command appears on this page.
Commands
| Command | What it does |
|---|---|
weft dev [dir] | serve it, and rebuild what changes |
weft build [dir] | sealed templates, the generated plan, the intent manifest, revved assets |
weft start [dir] | serve the build. No compiler runs |
weft create <name> | a new application, with a page you can open |
weft routes [dir] | the route table, as the file tree produced it |
weft why <route> [dir] | what the generated plan says about a route, and where each fact came from |
weft profile [dir] | what a recording decided about delivery, and what it refuses to decide |
weft verify [dir] | what this deployment's registry says about every region a route composes |
weft upload [dir] | PUT the build to an object store. --to is where, --header is who |
weft site [dir] | write the build as a folder a static host can serve. --out is where |
Options
| Option | Only for | What it does |
|---|---|---|
--port <n> | any command | default 3000, or PORT |
--host <name> | any command | default localhost |
--devtools | weft dev | this application's routes, effect sets, keys and bytes |
--profile | any command | record what every render costs, and plan the next build from it |
--probe | weft verify | ask each remote region what it is serving right now |
--out <dir> | weft site | where the servable folder is written |
--to <url> | weft upload | the base URL every object is PUT under |
--header <k=v> | weft upload | sent on every request. Repeatable, and where auth goes |
--concurrency <n> | weft upload | parallel requests, default 8 |
--dry-run | weft upload | say what would happen and send nothing |
--template <name> | weft create | minimal | app (default app) |
--no-types | any command | skip the type checker. Escape elision falls back to escaping |
The four you will actually type
weft dev while writing, weft build before shipping, and two that answer questions rather than doing work:
weft routes # the route table, as the file tree produced it
weft why /blog/:slug # the plan for one route, and where each fact came fromweft why is the one worth learning early. Every page on a weft site is the result of a generated plan, and when a page is not what you expected, the plan says which fragment fills which hole, what each one reads, what class that made it, and whether the answer came from a declaration, the compiler or a recording.