Documentation Index
Fetch the complete documentation index at: https://mintlify.com/withastro/flue/llms.txt
Use this file to discover all available pages before exploring further.
flue dev starts a long-running dev server that watches your project root for changes, rebuilds on every edit, and reloads the running server automatically. It is the primary command for iterative local development.
Usage
Flags
Build and serve target. Accepted values:
node or cloudflare. Required if not set in flue.config.*.node— Builds a single bundled.mjsand spawns a Node.js child process. Every file change triggers a full rebuild and child respawn.cloudflare— Builds an unbundled TypeScript entry and hands it to Wrangler (unstable_startWorker). Wrangler watches the source graph itself and hot-reloads workerd on agent body edits; Flue only rebuilds when something structural changes (new or removed agent, changed triggers,wrangler.jsoncedit).
Project root directory. Source files (
agents/, roles/) live at <root>/.flue/ if that directory exists, otherwise at <root>/ directly. Defaults to the current working directory.Where build artifacts are written. Defaults to
<root>/dist.Explicit path to a
flue.config.{ts,mts,mjs,js,cjs,cts} file (relative to cwd). Defaults to auto-discovery from the root directory. CLI flags always override values set in the config file.Port for the dev server. Default is
3583 — “FLUE” on a phone keypad.Path to a
.env-format file to load before starting the server. Repeatable; later files override earlier ones on key collision. Shell-set environment variables win over file values.Edits to a watched env file trigger a reload (Node: child respawn; Cloudflare: worker restart).Works for both node and cloudflare targets.Cloudflare target
The
cloudflare target requires wrangler as a peer dependency in your project.--target cloudflare is set, flue dev delegates bundling and hot-reloading to Wrangler. Flue manages the structural rebuild cycle (new agents, changed triggers, wrangler.jsonc edits) while Wrangler handles source-level hot-reload for agent body changes — so plain edits to an agent’s logic appear instantly without a full restart.
Dev vs. production
flue dev | flue run | |
|---|---|---|
| Lifecycle | Long-running; blocks until Ctrl+C | One-shot; exits after the run |
| Rebuilds | On every file change | Once, before invocation |
| Target | node or cloudflare | node only |
| Use case | Interactive development | CI, scripts, automation |
Examples
curl POST: