---
description: Reference for starting a watch-mode local Flue development server.
---

# flue dev

Last updated May 30, 2026 [ View as Markdown](https://flueframework.com/docs/cli/dev/index.md) 

## Synopsis

```
flue dev [--target <node|cloudflare>] [--root <path>] [--output <path>] [--config <path>] [--port <number>] [--env <path>]
```

## Description

`flue dev` builds the selected project, starts a local server, watches project files, and reloads after relevant changes. Restart the command after changing `flue.config.*`; running servers do not re-resolve configuration fields.

## Options

| Option                       | Default                                                    | Description                                                                                                                      |
| ---------------------------- | ---------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| \--target <node\|cloudflare> | Configuration value                                        | Select the development target. Required unless supplied by configuration.                                                        |
| \--root <path>               | Selected config-file directory, or config search directory | Select the project root.                                                                                                         |
| \--output <path>             | <root>/dist                                                | Select the build output directory.                                                                                               |
| \--config <path>             | Auto-discovered flue.config.\*                             | Select a configuration file.                                                                                                     |
| \--port <number>             | 3583                                                       | Select the local server port.                                                                                                    |
| \--env <path>                | <config-base>/.env, when present                           | Select one alternate .env\-format file loaded before configuration. Relative paths resolve from <config-base>. Shell values win. |

## Target-specific behavior

### Node.js

Builds the Node artifact, starts the generated server, and rebuilds and respawns it after relevant file changes.

### Cloudflare

Starts Vite with the official Workers integration. Cloudflare runtime bindings continue to use the official `.dev.vars`, `.env`, and `CLOUDFLARE_ENV` conventions.

## Examples

```
flue dev
flue dev --target node
flue dev --target cloudflare --port 8787
flue dev --env .env.staging
```

See [Develop & Build](https://flueframework.com/docs/guide/develop-and-build/) for the local development workflow.

## Docs Navigation

Current page: [flue dev](https://flueframework.com/docs/cli/dev/)

### Sections

* [Guide](https://flueframework.com/docs/getting-started/quickstart/)
* [Reference](https://flueframework.com/docs/api/agent-api/)
* [CLI](https://flueframework.com/docs/cli/overview/)
* [SDK](https://flueframework.com/docs/sdk/overview/)
* [Ecosystem](https://flueframework.com/docs/ecosystem/overview/)

### CLI

* [ Overview ](https://flueframework.com/docs/cli/overview/)
* [ init ](https://flueframework.com/docs/cli/init/)
* [ dev ](https://flueframework.com/docs/cli/dev/)
* [ connect ](https://flueframework.com/docs/cli/connect/)
* [ run ](https://flueframework.com/docs/cli/run/)
* [ build ](https://flueframework.com/docs/cli/build/)
* [ logs ](https://flueframework.com/docs/cli/logs/)
* [ add ](https://flueframework.com/docs/cli/add/)