> ## Documentation Index
> [HTML page](https://blode.md/docs/cli/dev)
> [Documentation index](https://blode.md/docs/llms.txt)
> Use the index to discover all available pages before exploring further.

# edda dev

Start a local Edda preview server with hot reload so you can write MDX and see production-quality docs update as you save.

Run the full Edda rendering engine locally so you can preview your documentation as you write.

Start `edda dev` while editing MDX so you see the same components, navigation, and search behavior as production. The file watcher reloads content changes automatically, and updates to `docs.json` trigger a full reload so sidebar and branding changes show up immediately.

A common loop: run `edda validate` once after editing config, then `edda dev` and keep the preview open while you write. When pages look right locally, deploy with `edda push`. If the server fails to start, check that `docs.json` exists (run `edda new` if you are starting from scratch).

```bash
edda dev
```

## How it works

The dev server starts a local Next.js instance that renders your documentation with the same engine used in production. A file watcher monitors your docs directory and triggers automatic browser refreshes when content changes. Changes to `docs.json` trigger a full server reload.

## Options

- `--no-open` (type: boolean, default: false): Do not open the browser automatically when the server starts.

## Examples

```bash title="Start with defaults"
edda dev
```

```bash title="Custom port"
edda dev --port 4000
```

```bash title="Specific directory, no browser"
edda dev --dir ./my-docs --no-open
```

## File watching

The dev server watches all files in your docs directory for changes:

- **Content changes** (`.mdx`, `.md`, `.json` files) trigger a hot reload in the browser.
- **Config changes** (`docs.json`) trigger a full server reload to pick up navigation, branding, and API config updates.

> [!INFO]
> The dev server requires a valid `docs.json` in your docs directory. Run `edda
>   new` first if you are starting from scratch.

## Related pages

- [edda validate](/cli/validate) -- check docs.json before starting the dev server
- [edda push](/cli/push) -- publish after local preview looks correct
- [edda new](/cli/new) -- scaffold the docs directory dev expects