CmdocsCmdocs

Installation

Install the cmdocs CLI and learn the project layout.

Installation

cmdocs ships as a single CLI for scaffolding, developing, and validating documentation sites. Production builds are handled automatically by the cmdocs Dashboard.

Requirements

  • Node.js 20+ (or Bun 1.0+)
  • Git (optional, used by cmdocs init to clone the starter template)

Install the CLI

Pick whichever package manager you already use. For most projects, running through npx (no install) is enough.

Run cmdocs without installing it. Recommended for most users:

npx @cmdoss/cmdocs init my-docs
npx @cmdoss/cmdocs dev
npx @cmdoss/cmdocs check

If you use Bun:

bunx @cmdoss/cmdocs init my-docs
bunx @cmdoss/cmdocs dev
bunx @cmdoss/cmdocs check

Install once, use the cmdocs binary directly:

npm install -g @cmdoss/cmdocs
bun install -g @cmdoss/cmdocs
pnpm install -g @cmdoss/cmdocs

Then:

cmdocs init my-docs
cmdocs dev
cmdocs check

CLI commands

CommandWhat it does
cmdocs init [name]Scaffold a new docs project in [name]/
cmdocs devStart the local dev server with hot reload (default port 3000)
cmdocs checkValidate docs.json, navigation, MDX frontmatter, assets, and internal links
cmdocs --helpShow help for any command

Common options

# Run dev server on a custom port
cmdocs dev --port 4000

# Check from a specific source directory
cmdocs check --source ./my-docs

# Point dev at a different docs directory
cmdocs dev --source ./my-docs

Project layout

A typical cmdocs project looks like this:

docs.json
index.mdx
quickstart.mdx
installation.mdx
setup.mdx
advanced.mdx
theme.mdx
navigation.mdx
favicon.svg
light.svg
dark.svg
architecture.png
PathPurpose
docs.jsonThe single source of truth — name, theme, navigation, navbar, footer, SEO
*.mdxA documentation page. The file path becomes its URL
public/Static assets. Anything here is served at the matching URL (public/logo/light.svg/logo/light.svg)

Page slugs in docs.json are file paths without the .mdx extension. For example, guides/setup.mdx is referenced as "guides/setup".

Troubleshooting

Next step

How is this guide?

On this page