> ## Documentation Index
> Fetch the complete documentation index at: https://wsignal.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# init

> Generate a starter wsignal config file.

## Synopsis

```bash theme={null}
wsignal init [--config ./wsignal.config.ts] [--yes] [--force]
```

## What It Does

`wsignal init` writes a starter config file to disk.

The default starter config is:

```ts theme={null}
export default {
  port: 8787,
  endpoints: [
    {
      name: "default",
      path: "/webhook",
      method: "POST",
    },
  ],
}
```

## Options

### `--config <path>`

Write the generated config to a custom path instead of `wsignal.config.ts`.

### `--yes`

Skip prompts and use the starter defaults immediately.

`wsignal init` also behaves non-interactively when standard output is not a TTY.

### `--force`

Overwrite an existing config file at the target path.

Without `--force`, `wsignal init` fails if the target file already exists.

## Interactive Mode

Without `--yes`, `wsignal init` prompts for:

* Port
* Endpoint name
* Endpoint path
* Method
* Whether the endpoint should use its own log file
* Optional log file name

## Examples

Generate the default config:

```bash theme={null}
wsignal init --yes
```

Write a config to a custom file:

```bash theme={null}
wsignal init --config ./config/local-webhooks.ts --yes
```

Replace an existing config:

```bash theme={null}
wsignal init --force
```
