Local Preview

Preview your documentation locally with hot reload

The Jamdesk CLI lets you preview your documentation on your machine before pushing to production. Changes appear instantly as you edit.

Prerequisites

Before you start, make sure you have:

  • Node.js 20+ - Check with node --version
  • A docs project - With a docs.json configuration file

Starting the Dev Server

Install the CLI globally, then run from your docs directory:

npm install -g jamdesk
cd your-docs
jamdesk dev

Run directly without installing:

cd your-docs
npx jamdesk dev

Your docs will be available at http://localhost:3000

What You Get

Hot Reload

Edit MDX files and see changes instantly - no refresh needed

Full Search

Test Cmd+K search with your actual content

All Components

Every component works exactly like production

Theme Switching

Test both light and dark modes

Custom Port

The default port is 3000. If it's in use, specify a different one:

jamdesk dev --port 3001

Or set a permanent default in ~/.jamdeskrc:

{
  "defaultPort": 3001
}

Verbose Mode

See detailed build information with the --verbose flag:

jamdesk dev --verbose

This shows:

  • File change detection
  • Build timing
  • Navigation parsing
  • Any warnings or errors

First Run Performance

The first time you run jamdesk dev, it installs dependencies to ~/.jamdesk. This takes 30-60 seconds. Subsequent runs start in under 5 seconds.

To clear the cache and force a fresh install:

jamdesk clean
jamdesk dev

Troubleshooting

Another process is using port 3000.

Option 1: Use a different port

jamdesk dev --port 3001

Option 2: Find and stop the process

lsof -i :3000
kill -9 <PID>

Make sure you're in the directory containing your docs.json file:

ls docs.json  # Should show the file
jamdesk dev

Try these steps:

  1. Check the terminal for errors
  2. Hard refresh the browser (Cmd+Shift+R)
  3. Restart the dev server
  4. Run jamdesk clean and try again

Run diagnostics:

jamdesk doctor

This checks your environment and identifies issues.

What's Next?

Was this page helpful?