CLI Overview
Preview docs locally, validate configuration, check for broken links, and migrate platforms using the open-source Jamdesk CLI.
The Jamdesk CLI lets you preview docs locally, validate configuration, check for broken links, and migrate from other platforms. It's open-source under the Apache License 2.0.
Installation
Install globally from npm to use jamdesk from anywhere:
npm install -g jamdeskAfter installing, verify it works:
jamdesk --version
Requirements
- Node.js v20.0.0 or higher
- npm v8 or higher (recommended)
Quick Start
Create a new documentation project:
jamdesk init my-docs
cd my-docsRun the local development server with hot reload:
jamdesk devYour docs will be available at http://localhost:3000/docs
Check for configuration errors, broken links, and spelling:
jamdesk validate
jamdesk broken-links
jamdesk fix --dry-run
jamdesk fix
jamdesk spellcheckCommands
Run jamdesk <command> --help for detailed information about any command.
Development
Start the local development server with hot reload.
jamdesk dev
jamdesk dev --port 3001Features:
- Automatic validation on startup (docs.json schema, MDX syntax, and referenced OpenAPI specs; an invalid spec stops the server so you catch it before deploying)
- Hot reload on MDX file changes
- Automatic navigation rebuild on docs.json changes
- Custom CSS (
style.css) reloaded on browser refresh - Full search functionality
- All themes and components available
Options:
| Flag | Description |
|---|---|
-p, --port <port> | Port to run on (default: 3000) |
-v, --verbose | Enable verbose output |
Create a new documentation project.
jamdesk init # Interactive mode
jamdesk init my-docs # Create in new directoryThis creates a new project with:
docs.jsonconfiguration file- Sample MDX pages
- Recommended folder structure
Authentication
Log in to Jamdesk via your browser. Required before deploying.
jamdesk loginOpens the Jamdesk dashboard in your browser for authentication. Credentials are stored locally in ~/.jamdeskrc.
Clear stored credentials.
jamdesk logoutShow the current authenticated user and verify your session is valid.
jamdesk whoamiValidation
Validate your docs.json configuration, MDX syntax, and OpenAPI specs.
jamdesk validate
jamdesk validate --skip-mdxChecks for:
- Valid JSON syntax in docs.json
- Required fields (name, navigation)
- Valid theme values
- MDX syntax errors (e.g., unescaped
<characters) - OpenAPI spec validation (if configured)
- Schema compliance
Options:
| Flag | Description |
|---|---|
--skip-mdx | Skip MDX syntax validation |
-v, --verbose | Show detailed validation output |
Run this before deploying to catch errors early.
Scan your documentation for broken internal links.
jamdesk broken-linksExample output:
docs/getting-started.mdx:15 - /docs/quikstart
Did you mean: /docs/quickstart
Found 1 broken link in 45 files.Detects links to missing pages and typos. See Links & Navigation for details.
Auto-fix broken internal-link warnings that have an unambiguous target. Handles two categories:
- Typo'd anchors: a fragment like
#instalationthat clearly should be#installation - Cross-locale anchor drift: a translated page renamed its headings, but links in that locale still point at the old English fragment
# Preview what would change without touching any files
jamdesk fix --dry-run
# Apply fixes (prompts for confirmation)
jamdesk fixExample dry-run output:
Planned fixes:
fr/ai/overview.mdx:9
/fr/ai/selectors#ai-strategies → /fr/ai/selectors#stratégies-ia
(dry run — no files written)A fix is only written when the corrected anchor resolves to a real heading in the target page. Ambiguous cases are left for manual review.
Options:
| Flag | Description |
|---|---|
--dry-run | Preview planned fixes without writing any files |
-y, --yes | Apply fixes without a confirmation prompt |
--types <list> | Comma-separated warning types to fix (default: all supported) |
Check your documentation for spelling errors.
jamdesk spellcheckExample output:
getting-started.mdx:14 - "recieve"
└─ Did you mean: receive
Found 3 misspellings across 24 pages.
Tip: Run "jamdesk spellcheck --fix" to interactively fix or ignore words.Uses an English dictionary with 150+ built-in tech terms (API, GraphQL, Kubernetes, React, etc.) so common jargon doesn't flag. Skips code blocks, inline code, frontmatter, JSX, URLs, and file paths. Currently English only; multi-language dictionary support is planned.
Options:
| Flag | Description |
|---|---|
--fix | Interactively fix misspellings or add to ignore list |
--json | Output as JSON (for CI pipelines) |
-v, --verbose | Show each file as it's checked |
Interactive fix mode (--fix) steps through each unique misspelled word:
1/10 "recieve" — found in 3 files
intro.mdx:14, setup.mdx:7, guide.mdx:22
? What do you want to do?
❯ Fix → receive (recommended)
Fix → relieve
Ignore in the future (add to docs.json)
Skip- Fix replaces the word with a suggestion across all files (prose-safe, so it won't modify code blocks or JSX attributes). Up to 3 suggestions are shown, with the best match marked as recommended.
- Ignore adds the word to
spellcheck.ignorein your docs.json so it won't be flagged again - Skip does nothing for this run
Changes are previewed and confirmed before applying.
Custom ignore list: Add project-specific terms to your docs.json:
{
"spellcheck": {
"ignore": ["YourProduct", "kubectl", "Terraform"]
}
}Your project name from docs.json is automatically ignored.
Validate a single OpenAPI specification file.
jamdesk openapi-check openapi.yaml
jamdesk openapi-check api/spec.jsonValidates:
- Valid YAML/JSON syntax
- OpenAPI 3.x schema compliance
- Endpoint definitions
$refreferences resolve correctly
Your OpenAPI specs are validated in three places. jamdesk dev stops on startup if a referenced spec is invalid, and jamdesk validate / jamdesk openapi-check check specs on demand. When you deploy, the cloud build validates your referenced specs too, but there it's a non-fatal warning: the rest of your docs still publish, and you're told exactly what's wrong (a parse error with line and column, an unresolved $ref, or a duplicate operationId) by email and in the dashboard's build list. Fix the spec and push again to clear it.
File Management
Rename a page and automatically update all references.
jamdesk rename docs/old-name.mdx docs/new-name.mdxThis will:
- Rename the file
- Update docs.json navigation
- Update links in all other MDX files
- Update snippet references
Use this instead of manual renaming to keep all references in sync.
Migration
Migrate documentation from Mintlify to Jamdesk.
jamdesk migrateDetects your Mintlify config and converts it to Jamdesk format. In the same pass it renames deprecated components (e.g. CardGroup → Columns), relocates orphan snippet MDX files into /snippets/ and rewrites parent-relative imports, extracts inline components that use React hooks into /snippets/<name>.tsx with 'use client', and auto-fixes mechanical MDX syntax issues. Idempotent, so you can re-run it safely.
Deployment
Upload your docs and trigger a build directly from the terminal.
jamdesk deploy
jamdesk deploy --detach
jamdesk deploy --full-rebuildProgress is shown live as each build phase completes. Also available as jamdesk push.
| Flag | Description |
|---|---|
--detach | Queue and exit immediately |
--full-rebuild | Force full rebuild (no cache) |
--project <id> | Deploy to a specific project |
--allow-empty | Allow deploying with zero .mdx content pages (refused by default) |
Scaffold and deploy a Cloudflare Worker that proxies /docs on your own domain to your Jamdesk site.
jamdesk deploy-proxy cloudflare
jamdesk deploy-proxy cloudflare --slug myproject --domain example.com --skip-deploy --yesInteractive by default: it checks Wrangler, verifies your Cloudflare account, auto-detects your slug from docs.json, generates the Worker files, and optionally deploys.
| Flag | Description |
|---|---|
--slug <slug> | Jamdesk project slug |
--domain <domain> | Target domain (e.g., example.com) |
--path <path> | Path prefix (default: /docs) |
--output-dir <dir> | Output directory (default: cloudflare-worker/) |
--skip-deploy | Generate files only, don't deploy |
--force | Overwrite existing directory without prompting |
--yes | Skip all confirmation prompts (CI mode) |
Maintenance
Check your environment and diagnose issues.
jamdesk doctorChecks:
- Node.js version (requires v20+)
- npm version
- docs.json exists and is valid
- ~/.jamdesk cache status
- Write permissions
Run this if you're experiencing issues with the CLI.
Clear the ~/.jamdesk cache directory.
jamdesk cleanThis removes cached dependencies and build artifacts. Use it to:
- Free up disk space
- Fix corrupted cache issues
- Force fresh dependency installation
Dependencies will be reinstalled on the next jamdesk dev.
Update the CLI to the latest version.
jamdesk updateYou can also update manually:
npm update -g jamdeskConfiguration
Create ~/.jamdeskrc to set default options:
{
"defaultPort": 3001,
"verbose": false,
"checkUpdates": true
}
| Option | Type | Default | Description |
|---|---|---|---|
defaultPort | number | 3000 | Default port for dev server |
verbose | boolean | false | Enable verbose output by default |
checkUpdates | boolean | true | Check for CLI updates on startup |
Troubleshooting
MDX files are parsed as JSX, so certain characters have special meaning.
Common issue: The < character is interpreted as the start of a JSX tag.
✗ Found 1 MDX syntax error(s)
getting-started.mdx:42
Unexpected character `5` (U+0035) before name
Fix: A < character is being parsed as JSX. Use < or rewriteSolutions:
- Use
<for literal less-than:Values <50% are low - Rewrite to avoid the character:
"Below 50%"instead of"<50%" - Run
jamdesk validatefor detailed error messages with line numbers
Make sure you're in a directory with a docs.json file.
Solutions:
- Run
jamdesk initto create a new project - Check that you're in the correct directory
- Verify the file is named exactly
docs.json(notdoc.jsonor similar)
The development server may fail to start for several reasons.
Try these steps:
- Run
jamdesk doctorto check your environment - Run
jamdesk cleanto clear the cache - Use
jamdesk dev --verbosefor detailed error output - Check that Node.js v20+ is installed:
node --version
The first run installs dependencies to ~/.jamdesk/node_modules.
This is normal and only happens once. Subsequent runs will be much faster.
Another process is using the default port.
Solutions:
# Use a different port
jamdesk dev --port 3001
# Or set a default in ~/.jamdeskrc
{ "defaultPort": 3001 }You may not have write permissions to the cache directory.
Solutions:
- Check permissions on
~/.jamdesk:ls -la ~/.jamdesk - Fix ownership:
sudo chown -R $(whoami) ~/.jamdesk - Run
jamdesk cleanand try again
Still having issues? Check the CLI Troubleshooting guide or open an issue on GitHub.
