docmd-io/docmd

Documentation compiler for humans and machines. One Markdown source to website, search, AI context, and knowledge formats together.

docmd – Documentation for humans and machines

What it is

  • An open‑source compiler that turns a folder of plain Markdown files into a full‑featured static documentation site and a set of machine‑readable artefacts.
  • The same source is emitted as:
    • HTML website (SPA‑style, light/dark mode)
    • Offline search index (keyword + optional vector search)
    • llms.txt / llms-full.txt – plain‑text dumps designed for feeding Large Language Models
    • Open Knowledge Format (OKF) bundles for RAG pipelines
    • MCP server interface for coding agents
    • SEO assets (sitemap, Open Graph, robots.txt)

Why it matters for AI / LLM workflows

  • Modern docs need to serve three audiences at once: people, search engines, and AI agents that perform Retrieval‑Augmented Generation (RAG).
  • docmd builds all those outputs in a single pass, keeping the Markdown source as the single source of truth.
  • It ships a RAG‑powered AI Assistant that can answer questions using the generated llms.txt context, and a Cloud Relay service that lets the assistant talk to any LLM provider without exposing credentials to the browser.

Key features (human‑focused)

  • Zero‑config start: npx @docmd/core dev serves a live preview instantly.
  • Static‑site generation (docmd build) works with any static host (Vercel, Netlify, Cloudflare Pages, S3, etc.).
  • Built‑in SEO, Open Graph, sitemap, versioning, i18n, and OpenAPI rendering.
  • Optional plugins for PWA support, threaded discussions, KaTeX, etc.

Key features (machine‑focused)

  • AI Assistant – chat UI that queries your docs via RAG.
  • MCP server – a simple protocol (run with docmd mcp) that lets external coding agents search, read, and validate documentation.
  • llms.txt / llms-full.txt – ready‑to‑paste context files for LLM prompting.
  • OKF bundles – structured knowledge packages consumable by downstream RAG pipelines.
  • Semantic search – optional vector‑based retrieval alongside classic keyword search.

How to use it

  1. Install globally (npm i -g @docmd/core) or run via npx/Docker.
  2. Point it at a folder of .md files:
    npx @docmd/core dev   # dev server
    npx @docmd/core build # static output
    
  3. Add plugins with docmd add <plugin> (e.g., pwa, threads).
  4. For AI integration, install the ai core plugin (included) and configure Cloud Relay or your own LLM endpoint.

Extensibility

  • Plugin system: core plugins cover most needs; optional plugins can be added from npm or built locally.
  • Programmatic API: import { build } from '@docmd/core' lets CI pipelines invoke the compiler.
  • Configuration is optional; a simple docmd.config.json can set title, site URL, source/out directories, etc.

Community & licensing

  • MIT‑licensed core and plugins – free to use, modify, and self‑host.
  • Active community on GitHub Discussions, a public roadmap, and a sponsor option.
  • Documentation, migration guides (from Docusaurus, VitePress, MkDocs, Starlight), and a live editor are all hosted at docmd.io.

Bottom line docmd is a developer‑friendly tool that bridges traditional documentation sites with the emerging needs of AI‑augmented workflows, letting you serve both readers and LLMs from the same Markdown source.

Related

  • Project
  • Project
  • Project
  • Project
  • Project