Skip to main content

doom dev

Start the development server with hot module replacement and live reload. This is the default command when running doom without arguments.

Usage

doom dev [root] [options]

Arguments

root
string
Root directory of the documentation. Defaults to current working directory.

Options

-H, --host
string
Dev server host nameExample:
doom dev --host 0.0.0.0
-P, --port
string
Dev server port numberExample:
doom dev --port 3000
-l, --lazy
boolean
default:"true"
Enable lazy compilation to improve compilation performance. Only compiles modules when they are requested.Example:
doom dev --lazy
--no-lazy
boolean
Disable lazy compilation and compile all modules upfront.Example:
doom dev --no-lazy
-n, --no-open
boolean
Do not automatically open the browser after starting the server.Example:
doom dev --no-open
See Global Options for additional options available to all commands.

Behavior

The dev server includes the following features:

Hot Reload

The server automatically restarts when detecting changes to:
  • Configuration files (doom.config.*)
  • Sites configuration (sites.yaml)
  • Meta files (_meta.json)
  • Source i18n path files
  • Documentation directory structure changes (add/unlink files)

File Watching

The watcher ignores:
  • **/node_modules/**
  • **/.git/**
  • **/.DS_Store/**

Auto Browser Opening

By default, the dev server opens your default browser. Use --no-open to disable this behavior.

Examples

Basic usage

doom dev
# or simply
doom

Custom port and host

doom dev --host localhost --port 8080

Specify documentation root

doom dev ./my-docs

Development with custom config

doom dev --config ./custom-config.yaml --port 3000

Disable lazy compilation

doom dev --no-lazy

Don’t open browser

doom dev --no-open

Ignore internal routes

doom dev --ignore

Development with specific language

doom dev --lang zh

Output

When starting the dev server, you’ll see output similar to:
  Local:   http://localhost:5173/
  Network: http://192.168.1.100:5173/

Troubleshooting

Port already in use

If the default port is in use, specify a different port:
doom dev --port 3001

Server not accessible from network

Bind to all network interfaces:
doom dev --host 0.0.0.0

Changes not reflecting

For configuration changes, the server automatically restarts. For other issues, try:
  1. Stop the server (Ctrl+C)
  2. Clear any caches
  3. Restart with doom dev

Build docs developers (and LLMs) love