Jamdesk Documentation logo

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 jamdesk

Verify the install:

jamdesk --version

Requirements

  • Node.js v20.0.0 or higher
  • npm v8 or higher (recommended)

Quick Start

1
Create a Project

Create a new documentation project:

jamdesk init my-docs
cd my-docs
2
Start Development Server

Run the local development server with hot reload:

jamdesk dev

Your docs run at http://localhost:3000/docs

3
Validate Before Deploying

Check for configuration errors, broken links, and spelling:

jamdesk validate
jamdesk broken-links
jamdesk fix --dry-run
jamdesk fix
jamdesk spellcheck

Commands

Run jamdesk <command> --help for details on any command.

Development

Start the local development server with hot reload.

jamdesk dev
jamdesk dev --port 3001

Features:

  • Automatic validation on startup (docs.json schema, MDX syntax, and referenced OpenAPI specs. An invalid spec stops the server.)
  • Hot reload on MDX file changes
  • Automatic navigation rebuild on docs.json changes
  • Custom CSS (style.css) reloaded on browser refresh
  • Search
  • Every theme and component

Options:

FlagDescription
-p, --port <port>Port to run on (default: 3000)
-v, --verboseEnable verbose output

Create a new documentation project.

jamdesk init              # Interactive mode
jamdesk init my-docs      # Create in new directory

This creates a new project with:

  • docs.json configuration file
  • Sample MDX pages
  • Recommended folder structure

Authentication

Log in to Jamdesk via your browser. Required before deploying.

jamdesk login

Opens the Jamdesk dashboard in your browser. The CLI stores credentials in ~/.jamdeskrc.

Authentication Guide

Browser-based auth flow, session management, and troubleshooting

Clear stored credentials.

jamdesk logout

Show the logged-in user and verify the session.

jamdesk whoami

Validation

Validate your docs.json configuration, MDX syntax, and OpenAPI specs.

jamdesk validate
jamdesk validate --skip-mdx

Checks 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:

FlagDescription
--skip-mdxSkip MDX syntax validation
-v, --verboseShow detailed validation output

Run this before deploying to catch errors early.

Scan your documentation for broken internal links.

jamdesk broken-links

Example 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. It fixes two kinds:

  • Typo'd anchors: a fragment like #instalation that 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 fix

Example 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)

jamdesk fix writes a fix only when the corrected anchor resolves to a real heading on the target page. It leaves ambiguous cases for manual review.

Options:

FlagDescription
--dry-runPreview planned fixes without writing any files
-y, --yesApply fixes without a confirmation prompt
--types <list>Comma-separated warning types to fix (default: all supported)
Fix Broken Links Guide

Step-by-step walkthrough: preview, apply, review, and commit

Check your documentation for spelling errors.

jamdesk spellcheck

Example 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.). Skips code blocks, inline code, frontmatter, JSX, URLs, and file paths. English only for now. Multi-language dictionaries are planned.

Options:

FlagDescription
--fixInteractively fix misspellings or add to ignore list
--jsonOutput as JSON (for CI pipelines)
-v, --verboseShow 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 in every file. It never changes code blocks or JSX attributes. The prompt shows up to 3 suggestions and marks the best match as recommended.
  • Ignore adds the word to spellcheck.ignore in your docs.json. The word won't be flagged again.
  • Skip does nothing for this run

You preview and confirm changes before they apply.

Custom ignore list: Add project-specific terms to your docs.json:

docs.json
{
  "spellcheck": {
    "ignore": ["YourProduct", "kubectl", "Terraform"]
  }
}

Spellcheck ignores your project name from docs.json.

Validate a single OpenAPI specification file.

jamdesk openapi-check openapi.yaml
jamdesk openapi-check api/spec.json

Validates:

  • Valid YAML/JSON syntax
  • OpenAPI 3.x schema compliance
  • Endpoint definitions
  • $ref references resolve correctly

Jamdesk validates OpenAPI specs in three places. jamdesk dev stops on startup if a referenced spec is invalid. jamdesk validate and jamdesk openapi-check check specs on demand. The cloud build checks referenced specs on deploy, where an invalid spec is a non-fatal warning. The rest of your docs still publish. The email and the dashboard's build list name the problem: a parse error with line and column, an unresolved $ref, or a duplicate operationId. Fix the spec and push again to clear it.

File Management

Rename a page and update every reference to it.

jamdesk rename docs/old-name.mdx docs/new-name.mdx

This will:

  • Rename the file
  • Update docs.json navigation
  • Update links in all other MDX files
  • Update snippet references

Use this instead of renaming by hand. References stay in sync.

Migration

Migrate documentation from Mintlify to Jamdesk.

jamdesk migrate

Detects your Mintlify config and converts it to Jamdesk format. The same pass also:

  • Renames deprecated components (e.g. CardGroup → Columns)
  • Moves 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'
  • Fixes mechanical MDX syntax issues

The command is idempotent. Re-running it is safe.

Migration Guide

Full migration guide with step-by-step instructions for Mintlify and other platforms

Deployment

Download a project whose docs Jamdesk hosts (no GitHub) as a git repository, or merge new Jamdesk changes into a copy you already pulled.

jamdesk pull
jamdesk pull --project your-project
jamdesk pull --dir ./docs-copy

Edit the files, then run jamdesk deploy in that folder to publish them. Needs CLI 1.1.227 or later and git.

FlagDescription
--project <id-or-slug>Pull a specific project (skips interactive selection)
--dir <path>Target folder (default: ./<slug>)
--forceTurn a folder that already has files, such as an old read-only copy, into a git copy. Its files stay as uncommitted changes
Edit on your computer

Publishing, merging Jamdesk changes, conflicts, and files deploy refuses

Upload your docs and trigger a build from the terminal.

jamdesk deploy
jamdesk deploy --detach
jamdesk deploy --full-rebuild

The CLI shows each build phase as it completes. Also available as jamdesk push.

FlagDescription
--detachQueue and exit immediately
--full-rebuildForce full rebuild (no cache)
--project <id>Deploy to a specific project
--allow-emptyAllow deploying with zero .mdx content pages (refused by default)
-m, --message <text>Commit message in a folder made by jamdesk pull
--allow-secret-filesPublish secret-looking files from a folder made by jamdesk pull
CLI Deploy Guide

Full deployment pipeline, build phases, error reference, and troubleshooting

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 --yes

The command is interactive by default. It checks Wrangler, verifies your Cloudflare account, detects your slug from docs.json, generates the Worker files, and offers to deploy. --yes generates the files and stops. Deploy them with npx wrangler deploy from the output directory.

FlagDescription
--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-deploySkip the "deploy now?" prompt in an interactive run
--forceOverwrite the output directory if it already exists
--yesAnswer every prompt with its default (CI mode). Never deploys, and never overwrites an existing directory
Cloudflare Workers Guide

Worker setup, route patterns, and caching configuration

Maintenance

Check your environment and diagnose issues.

jamdesk doctor

Checks:

  • Node.js version (requires v20+)
  • npm version
  • docs.json exists and is valid
  • ~/.jamdesk cache status
  • Write permissions

Run this when the CLI misbehaves.

Clear the ~/.jamdesk cache directory.

jamdesk clean

This removes cached dependencies and build artifacts. Use it to:

  • Free up disk space
  • Fix a corrupted cache
  • Force fresh dependency installation

The next jamdesk dev reinstalls dependencies.

Update the CLI to the latest version.

jamdesk update

You can also update manually:

npm update -g jamdesk

Configuration

Create ~/.jamdeskrc to set default options:

{
  "defaultPort": 3001,
  "verbose": false,
  "checkUpdates": true
}
OptionTypeDefaultDescription
defaultPortnumber3000Default port for dev server
verbosebooleanfalseEnable verbose output by default
checkUpdatesbooleantrueCheck for CLI updates on startup

Troubleshooting

MDX parses as JSX. Some 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 &lt; or rewrite

Solutions:

  • Use &lt; for literal less-than: Values &lt;50% are low
  • Rewrite to avoid the character: "Below 50%" instead of "<50%"
  • Run jamdesk validate for detailed error messages with line numbers

Run the command from a directory with a docs.json file.

Solutions:

  • Run jamdesk init to create a new project
  • Check that you're in the correct directory
  • Verify the file is named exactly docs.json (not doc.json or similar)

Try these steps:

  1. Run jamdesk doctor to check your environment
  2. Run jamdesk clean to clear the cache
  3. Use jamdesk dev --verbose for detailed error output
  4. Check that Node.js v20+ is installed: node --version

The first run installs dependencies to ~/.jamdesk/node_modules.

This happens only once. Later runs are 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:

  1. Check permissions on ~/.jamdesk: ls -la ~/.jamdesk
  2. Fix ownership: sudo chown -R $(whoami) ~/.jamdesk
  3. Run jamdesk clean and try again

Still having issues? Check the CLI Troubleshooting guide or open an issue on GitHub.

What's Next?

Authentication

Login flow, sessions, and troubleshooting

CLI Deploy

Deploy from the terminal

Local Preview

Advanced local development options

Migration Guide

Migrate from Mintlify or other platforms