CLI
AFW projects use esdev with @opentf/esdev-plugin-afw. The plugin compiles JSX/TSX/MDX and discovers routes; esdev bundles JavaScript, processes CSS, runs tests and manages the development loop. The historical afw executable is retired.
| Command | Purpose |
|---|---|
esdev start | Build and watch the targets configured in esdev.json. |
esdev build --minify | Build release output. |
esdev preview | Serve the existing static release output. |
esdev test --config=esdev.test.json --dom | Run tests in the native DOM realm. |
esdev test --config=esdev.test.json --browser | Run tests in a real browser with its matching driver. |
esdev typecheck | Run the project's TypeScript checker. |
Scaffolding
esdev create my-app
Choose a template, language and package manager at the prompts. See Installation for setup, non-interactive options and the current template migration limitation.
Project configuration
Configure plugins and build targets in esdev.json. A browser app needs an HTML entry whose module script imports @afw/routes and calls mountApp. SSG adds a prerender target with then: run; a fullstack app supplies a server entry. See Production Build and Server.
Development uses esdev's rebuild/reload behavior. The old /__hmr and /__route contracts belong to the retired CLI; refer to the official development loop for current behavior.