Skip to main content

Introduction to doc-kit

@nodejs/doc-kit is a CLI tool designed to generate API documentation for Node.js. Created by the Node.js core team, it transforms markdown files into various documentation formats including HTML, JSON, man pages, and more.
Originally developed to modernize the Node.js documentation tooling, doc-kit provides a flexible, generator-based architecture that supports multiple output formats from a single source.

Key Features

Multiple Output Formats

Generate documentation in various formats: HTML, JSON, man pages, LLM-optimized text, and search databases

Parallel Processing

Built-in multi-threading support processes documentation files in parallel for fast generation

Flexible Pipeline

Generator-based architecture with automatic dependency resolution and streaming support

Modern Tooling

Uses modern parsing with unified/remark, syntax highlighting with Shiki, and search with Orama

What Can You Build?

doc-kit is versatile enough to generate:
  • Legacy-compatible HTML - 1:1 match with existing Node.js documentation
  • Modern web documentation - Redesigned documentation pages with search functionality
  • Man pages - Unix manual pages for command-line reference
  • JSON API references - Structured data for custom tools and integrations
  • LLM-optimized documentation - Text format optimized for language models
  • Search databases - Orama-powered search indices

Get Started

Installation

Install doc-kit using npm, yarn, or pnpm

Quick Start

Generate your first documentation in minutes

Configuration

Learn about configuration options and customization

Generators

Explore available generators and create custom ones

How It Works

doc-kit uses a generator pipeline to transform your markdown documentation:
Markdown Files → AST Parser → Metadata Extractor → Target Generators → Output
Each generator in the pipeline:
  1. Takes input from a previous generator or raw files
  2. Processes the data into a different format
  3. Yields output for the next generator or final output
Generators automatically handle dependencies, so you can focus on choosing the output format you need without worrying about the pipeline setup.

Community

doc-kit is an open-source project maintained by the Node.js core team:

Build docs developers (and LLMs) love