Skip to main content

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 init writes a minimal flue.config.ts to a target directory. Run it once when setting up a new Flue project, or when you want to add an explicit config to an existing project.

Usage

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

Flags

--target
string
required
Build target. Accepted values: node or cloudflare. This value is written directly into the generated config file as target: '...'.
--root
string
default:"cwd"
Directory where flue.config.ts will be written. Defaults to the current working directory.
--force
boolean
default:"false"
Overwrite an existing flue.config.* file. Without this flag, flue init exits with an error if any flue.config.* variant already exists in the target directory.

Output

flue init writes a single file — flue.config.ts — to the target directory:
import { defineConfig } from '@flue/cli/config';

export default defineConfig({
  target: 'node', // or 'cloudflare'
});
After writing the file, it prints the next step:
Next step:

  fetch https://flueframework.com/start.md to create a new agent

Existing config files

If a flue.config.* file already exists in the target directory (in any supported extension — .ts, .mts, .mjs, .js, .cjs, .cts), flue init will refuse to overwrite it unless --force is passed.
If you run flue init --force and the existing config uses a different extension (e.g. flue.config.mjs), the new flue.config.ts will take precedence over the old file — but the old file stays on disk. flue init will warn you and print its path so you can delete it manually.

Examples

# Scaffold a Node.js config in the current directory
flue init --target node

# Scaffold a Cloudflare config in a subdirectory
flue init --target cloudflare --root ./my-agent

# Overwrite an existing config
flue init --target node --force

Build docs developers (and LLMs) love