Local Preview
Preview your documentation on your machine with the Jamdesk CLI before pushing to production. Changes appear as you edit.
Run jamdesk dev (or npx jamdesk dev) from a directory that contains a docs.json. It starts a local server with hot reload and search. Components render as they do in production.
Prerequisites
- 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 devYour docs will be available at http://localhost:3000
What You Get
Custom Port
The default port is 3000. Pass a different one with --port:
jamdesk dev --port 3001
Or set a permanent default in ~/.jamdeskrc:
{
"defaultPort": 3001
}
Verbose Mode
Show build details 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 jamdesk dev run installs dependencies to ~/.jamdesk. This takes 30-60 seconds. Later runs start in under 5 seconds.
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>Run the command from the directory containing your docs.json file:
ls docs.json # Should show the file
jamdesk dev- Check the terminal for errors
- Hard refresh the browser (Cmd+Shift+R)
- Restart the dev server
- Run
jamdesk cleanand try again
Run diagnostics:
jamdesk doctorIt checks your environment and reports problems.
