CmdocsCmdocs

Quickstart

Build, edit, and ship a documentation site in under 5 minutes.

Quickstart

By the end of this page you'll have a running cmdocs site, edited a page, added a new page, and validated it for deployment.

Prerequisites

  • Node.js 20+ or Bun 1.0+
  • A terminal

Install the CLI

The fastest way is npx — no install required, always the latest version. Every command in this guide is prefixed with npx, but if you install cmdocs globally once (npm install -g @cmdoss/cmdocs) you can drop the prefix. See Installation for all options.

1. Create a project

Initialize

npx @cmdoss/cmdocs init my-docs
cd my-docs

cmdocs scaffolds a starter project for you:

docs.json
index.mdx
quickstart.mdx
setup.mdx
light.svg
dark.svg
File / FolderPurpose
docs.jsonSite configuration — name, theme, navigation, navbar
*.mdxYour documentation pages, written in MDX
public/Static assets — logos, images, favicons

Start the dev server

npx @cmdoss/cmdocs dev

Open http://localhost:3000. You'll see your starter site, with hot reload enabled — every save updates the browser automatically.

2. Edit a page

Open index.mdx and change the title:

index.mdx
---
title: My First Docs
description: Documentation for my project.
---

# Hello from my docs

Welcome to my new documentation site.

<Callout type="info">
  Anything inside an MDX file is rendered as a page.
</Callout>

Save the file. The browser updates instantly.

3. Add a new page

Create the MDX file

Add a new file at guides/setup.mdx:

guides/setup.mdx
---
title: Setup Guide
description: How to set up the project.
---

# Setup

Follow these steps to get started.

<Steps>
  <Step>Install dependencies</Step>
  <Step>Configure environment variables</Step>
  <Step>Run the dev server</Step>
</Steps>

Register it in docs.json

Add the new page to the pages array under your navigation group:

docs.json
{
  "name": "My Docs",
  "navigation": {
    "tabs": [
      {
        "label": "Documentation",
        "path": "documentation",
        "groups": [
          {
            "label": "Getting Started",
            "pages": [
              { "file": "index" },
              { "file": "quickstart" },
              { "file": "guides/setup" }
            ]
          }
        ]
      }
    ]
  }
}

Every page is an object with a file field — the MDX path without .mdx. Add path to override the URL, label to override the sidebar display.

Verify

Your project now looks like this:

docs.json
index.mdx
quickstart.mdx
setup.mdx

The new page appears in your sidebar at /guides/setup.

4. Validate before deploying

Run cmdocs check to validate your project before pushing:

npx @cmdoss/cmdocs check

This verifies:

  • docs.json schema is valid
  • All pages referenced in navigation exist
  • MDX frontmatter has required fields (title)
  • Assets (favicon, logos) exist

If everything passes, you're ready to deploy.

5. Deploy

The fastest way to go live is the cmdocs Dashboard — connect your GitHub repo and every push triggers a build automatically.

Sign in at cmdocs.sh with GitHub.

Create a project and select your docs repository.

Push to deploy. Every commit to your tracked branch produces a new deployment at <slug>.cmdocs.app.

For the full walkthrough, see Deployment.

What's next

How is this guide?

On this page