weft
ir 2.6.0 · warp 1.8.0

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.

$weft why /
shell app/layout.tsx → routes/index.tsx
wave 1 header (buffered) · feed (stream)
wave 2 prices needs feed
keys header: static · feed: shared route:page
This page is the --help text, parsed — so the flags you read here are exactly the flags the binary accepts.
✓ Valid A flag the binary accepts

This page is the --help text, parsed, so what you read is what the command takes.

✕ Refused an unknown flag or template
what you wrote→the argument is checked before anything runs→usage, and a non-zero exit

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

CommandWhat 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

OptionOnly forWhat it does
--port <n>any commanddefault 3000, or PORT
--host <name>any commanddefault localhost
--devtoolsweft devthis application's routes, effect sets, keys and bytes
--profileany commandrecord what every render costs, and plan the next build from it
--probeweft verifyask each remote region what it is serving right now
--out <dir>weft sitewhere the servable folder is written
--to <url>weft uploadthe base URL every object is PUT under
--header <k=v>weft uploadsent on every request. Repeatable, and where auth goes
--concurrency <n>weft uploadparallel requests, default 8
--dry-runweft uploadsay what would happen and send nothing
--template <name>weft createminimal | app (default app)
--no-typesany commandskip 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:

sketch — not compiled
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 from

weft 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.