Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/jamdesk/jamdesk-cli/llms.txt

Use this file to discover all available pages before exploring further.

jamdesk dev starts a local preview server so you can see exactly what your documentation site looks like before deploying. It uses Turbopack by default for near-instant hot reload, runs jamdesk validate automatically on startup to catch errors early, and works with all themes, components, and search features that Jamdesk supports in production.

Usage

jamdesk dev [options]
Run this command from the root of your project — the directory that contains your docs.json file. jamdesk preview is an alias and behaves identically.

Flags

--webpack
flag
Use Webpack instead of Turbopack as the compiler. Turbopack is the default and compiles approximately 5× faster. Switch to Webpack if you encounter a compatibility issue specific to Turbopack.
--clean
flag
Clears the local compiler cache before starting the server. Useful when the cache has become corrupted (typically from a hard kill mid-build) and the dev server refuses to start or produces unexpected output.
--port
number
Start the server on a specific port instead of the default 3000. For example, --port 3001. If the requested port is already in use and --port is not set, the server auto-increments to find the next available port.
--verbose
flag
Print detailed output during startup, compilation, and hot-reload events. Helpful when diagnosing slow builds or unexpected behaviour.

Examples

# Start with Turbopack (default)
jamdesk dev

# Start with Webpack instead of Turbopack
jamdesk dev --webpack

# Clear the cache, then start
jamdesk dev --clean

# Start on a custom port
jamdesk dev --port 3001

Turbopack vs Webpack

Turbopack is the default compiler and is approximately 5× faster than Webpack for both cold starts and incremental hot-reload updates. It is the right choice for the vast majority of projects. Use --webpack only if you hit a specific Turbopack incompatibility. Webpack is slower but has a longer track record and broader plugin compatibility.
If the dev server fails to start after a hard kill, run jamdesk dev --clean to clear a potentially corrupted Turbopack cache. The CLI also attempts automatic cache recovery before surfacing an error.

Behaviour on startup

The dev server takes care of several things automatically so you don’t have to:
  • Auto-validation — runs jamdesk validate before serving, printing any docs.json, MDX, or navigation errors to the terminal.
  • Auto-recovery — detects and clears corrupted Turbopack cache without requiring a manual --clean.
  • Auto-increment port — if the target port is already occupied, the server tries the next port up and prints the actual URL it bound to.
  • Full feature parity — full-text search, all three themes (Jam, Nebula, Pulsar), and all 50+ MDX components work exactly as they do in production.

Port configuration

To avoid typing --port on every run, set a defaultPort in your global CLI config file at ~/.jamdeskrc:
{ "defaultPort": 3001 }
The full set of supported ~/.jamdeskrc fields is:
{
  "defaultPort": 3001,
  "verbose": false,
  "checkUpdates": true
}

Build docs developers (and LLMs) love