Skip to main content

CLI Overview

Doom provides a powerful command-line interface for building, developing, and managing documentation projects. Built on top of Rspress, Doom extends the core functionality with additional features for translation, export, scaffolding, and linting.

Installation

Install Doom globally or as a project dependency:
npm install -g @alauda/doom
# or
yarn add @alauda/doom

Basic Usage

doom [command] [options]

Available Commands

Core Commands

  • dev - Start the development server (default command)
  • build - Build the documentation for production
  • serve - Preview the built documentation

Content Commands

  • new - Generate scaffolding from templates
  • translate - Translate documentation to other languages
  • lint - Lint documentation files

Export Commands

  • export - Export documentation as PDF

Global Options

All commands support the following global options. See Global Options for detailed information.
-c, --config
string
Specify the path to the config file
-v
string
Specify the version of the documentation (e.g., unversioned, unversioned-x.y)
-b, --base
string
Override the base of the documentation
-p, --prefix
string
Specify the prefix of the documentation base
-f, --force
boolean
default:"false"
Force operations:
  1. Fetch latest reference remotes or scaffolding templates (ignore cache)
  2. Translate without hash equality check
-i, --ignore
boolean
default:"false"
Ignore internal routes
-d, --download
boolean
default:"false"
Display download PDF link on nav bar
-e, --export
boolean
default:"false"
Run or build in exporting PDF mode (automatically ignores apis/** routes)
--lang
string
Specify the language of the documentation

Configuration

Doom looks for configuration files in the following order:
  1. doom.config.yaml / doom.config.yml
  2. doom.config.js / doom.config.ts
  3. doom.config.mjs / doom.config.mts
  4. doom.config.cjs / doom.config.cts
See Config Reference for detailed configuration options.

Examples

Start development server

doom dev
# or simply
doom

Build for production

doom build

Build with custom config

doom build --config ./custom-config.yaml

Translate documentation

doom translate --source en --target zh --glob "guides/**"

Export to PDF

doom export

Getting Help

Display help information for any command:
doom --help
doom [command] --help

Environment Variables

Doom respects the following environment variables:
  • AZURE_OPENAI_ENDPOINT - Azure OpenAI endpoint for translation
  • AZURE_OPENAI_API_KEY - Azure OpenAI API key
  • AZURE_OPENAI_MODEL - Model to use (default: gpt-4.1-mini)
  • OPENAI_API_VERSION - OpenAI API version (default: 2025-04-01-preview)
  • RAW_TERMS_URL - URL to fetch translation terms

Build docs developers (and LLMs) love