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:Basic Usage
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.Specify the path to the config file
Specify the version of the documentation (e.g.,
unversioned, unversioned-x.y)Override the base of the documentation
Specify the prefix of the documentation base
Force operations:
- Fetch latest reference remotes or scaffolding templates (ignore cache)
- Translate without hash equality check
Ignore internal routes
Display download PDF link on nav bar
Run or build in exporting PDF mode (automatically ignores
apis/** routes)Specify the language of the documentation
Configuration
Doom looks for configuration files in the following order:doom.config.yaml/doom.config.ymldoom.config.js/doom.config.tsdoom.config.mjs/doom.config.mtsdoom.config.cjs/doom.config.cts
Examples
Start development server
Build for production
Build with custom config
Translate documentation
Export to PDF
Getting Help
Display help information for any command:Environment Variables
Doom respects the following environment variables:AZURE_OPENAI_ENDPOINT- Azure OpenAI endpoint for translationAZURE_OPENAI_API_KEY- Azure OpenAI API keyAZURE_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