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.jsonconfiguration file
Starting the Dev Server
Install the CLI globally, then run from your docs directory:
npm install -g jamdesk
cd your-docs
jamdesk devRun directly without installing:
cd your-docs
npx jamdesk devYour docs will be available at http://localhost:3000
What You Get
Edit MDX files and see changes instantly - no refresh needed
Test Cmd+K search with your actual content
Every component works exactly like production
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 3001Option 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 devTry these steps:
- Check the terminal for errors
- Hard refresh the browser (Cmd+Shift+R)
- Restart the dev server
- Run
jamdesk cleanand try again
Run diagnostics:
jamdesk doctorThis checks your environment and identifies issues.