Skip to main content

Installation

doc-kit can be installed globally, added to your project, or run directly using npx. Choose the method that works best for your workflow. The fastest way to use doc-kit without installation:
npx @nodejs/doc-kit --help
Using npx is ideal for CI/CD pipelines or one-off documentation generation. No installation required!

Package Manager Installation

For regular use, install doc-kit using your preferred package manager:
1

Install the package

Choose your package manager and install @nodejs/doc-kit:
npm install -g @nodejs/doc-kit
2

Verify installation

Confirm doc-kit is installed correctly:
doc-kit --help
You should see the CLI help output:
Usage: @nodejs/doc-kit [options] [command]

CLI tool to generate the Node.js API documentation

Options:
  -h, --help          display help for command

Commands:
  generate [options]  Generate API docs
  help [command]      display help for command
3

Start generating docs

You’re ready to generate documentation! Try the generate command:
doc-kit generate --help

Project-Level Installation

For project-specific usage, install doc-kit as a dev dependency:
1

Add to your project

npm install --save-dev @nodejs/doc-kit
2

Add npm script (optional)

Add a script to your package.json for convenient access:
package.json
{
  "scripts": {
    "docs:build": "doc-kit generate -i 'docs/api/*.md' -o dist/docs -t web -t orama-db",
    "docs:legacy": "doc-kit generate -i 'docs/api/*.md' -o dist/docs -t legacy-html -t legacy-json"
  }
}
3

Run via npm scripts

Execute your documentation build:
npm run docs:build

Development Installation

If you want to contribute to doc-kit or run it from source:
1

Clone the repository

git clone https://github.com/nodejs/api-docs-tooling.git
cd api-docs-tooling
2

Install dependencies

npm install
3

Run from source

Use the local CLI script:
node bin/cli.mjs --help
Or use the npm script:
npm run run -- --help
4

Watch mode (development)

For active development, use watch mode:
npm run watch -- generate -i "docs/*.md" -o out

System Requirements

doc-kit requires Node.js version 18 or higher. The tool uses modern ES modules and features available in recent Node.js versions.

Next Steps

Now that doc-kit is installed:

Quick Start

Generate your first documentation

CLI Commands

Learn about available commands and options

Build docs developers (and LLMs) love