# SeedcordConfig

`interface` in `seedcord` · v0.22.0

<https://seedcord.org/docs/packages/seedcord/0.22.0/interfaces/seedcord-config>

The `seedcord.config.ts` of a bot that runs on Cloudflare Workers. A bot that runs on node or
bun uses [`SeedcordServerConfig`](/docs/packages/seedcord/0.22.0/interfaces/seedcord-server-config). Its `build` also takes `outDir` and `start`.

```ts
interface SeedcordConfig
```

## Properties

### build

```ts
build?: SeedcordBaseBuildConfig
```

Optional build configuration overrides.

### files

```ts
files?: string[]
```

Folders whose non-code files `seedcord build` bundles for `readFiles` to read, like `['./locales']`.
Each one includes its subfolders and resolves against `root`. A folder can sit beside `root`, like `'../assets'`
with `root: './src'`, as long as it is inside the folder that holds this config.

### hmr

```ts
hmr?: SeedcordHmrConfig
```

Optional HMR configuration.

### idleAnimation

```ts
idleAnimation?: boolean
```

Runs any always-on animations in `seedcord dev`.

### instance

```ts
instance: string;
```

Path to the module whose default export is a configured `Seedcord` instance.

### port

```ts
port?: number
```

The port `seedcord dev` serves the worker's interactions endpoint on. `0` picks a free port
on each run. A `tunnel` URL needs a fixed port.

### root

```ts
root?: string
```

Root directory used for resolving relative paths.

### tunnel

```ts
tunnel?: boolean | string
```

How `seedcord dev` exposes an http bot's interactions server. This has no effect on a gateway bot.

`true` opens a cloudflared quick tunnel and writes the interactions endpoint on every run,
since the hostname changes each time. An https URL is one you already serve, through a named
cloudflared tunnel, a tailscale funnel, or any reverse proxy. The CLI checks that URL reaches
this process, writes the endpoint when the stored value differs, and leaves it in place.

### vitePlugins

```ts
vitePlugins?: () => PluginOption[]
```

A function that returns the Vite plugins to run on your bot's code in every `seedcord` command
that loads it, like `() => [yaml()]`. They change what an import loads, like turning a `.yaml`
file into an object. seedcord calls it once for each Vite server and build.
