---
description: Reference for creating an initial Flue project configuration file.
---

# flue init

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

## Synopsis

```
flue init --target <node|cloudflare> [--root <path>] [--force]
```

## Description

`flue init` writes a starter `flue.config.ts`. It does not create agents, workflows, or an application entrypoint.

## Options

| Option                       | Default                   | Description                                                     |
| ---------------------------- | ------------------------- | --------------------------------------------------------------- |
| \--target <node\|cloudflare> | Required                  | Select the target written to flue.config.ts.                    |
| \--root <path>               | Current working directory | Select the existing directory in which to write flue.config.ts. |
| \--force                     | false                     | Write flue.config.ts when a flue.config.\* file already exists. |

Without `--force`, any existing `flue.config.*` file prevents generation. If `--force` writes `flue.config.ts` beside another supported variant, the new `.ts` file takes precedence and the existing file remains on disk.

## Output

The generated `target` value matches `--target`. For `flue init --target node`, the file is:

```
import { defineConfig } from '@flue/cli/config';

export default defineConfig({
  target: 'node',
});
```

## Examples

```
flue init --target node
flue init --target cloudflare --root ./apps/assistant
```

See [Configuration](https://flueframework.com/docs/reference/configuration/) for the complete `flue.config.ts` surface.

## Docs Navigation

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

### 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/)