Introduction to oxdoc
oxdoc is a native-speed TypeScript/JavaScript API documentation generator powered by the OXC parser.
Why oxdoc?
TypeDoc relies on the TypeScript Compiler (tsc), which causes serious performance issues in large projects:
- Requires 12GB of memory in a 110K LOC monorepo
- OOM (Out of Memory) crashes in large projects
- Search index initialization takes 35+ seconds
oxdoc uses OXC parser with Rust NAPI bindings to deliver 7-10x faster documentation generation compared to TypeDoc (measured on real projects).
Key Features
- JSDoc/TSDoc Extraction - Automatically generates API docs from source code
- Documentation Coverage - Measures the documentation ratio of exported symbols
- Doc Test - Executes and validates
@examplecode blocks - Multiple Output Formats - JSON, Markdown, HTML, llms.txt (AI-friendly)
- Plugin System - Extensible via Transform, Output, and Analyzer hooks
- Watch Mode - Auto-regenerates docs on file changes
- Configuration -
oxdoc.config.jsonorpackage.jsonoxdocfield
Quick Start
# Generate API docs
npx @jiji-hoon96/oxdoc generate ./src --format markdown
# Check documentation coverage
npx @jiji-hoon96/oxdoc coverage ./src --threshold 80
# Run doc tests
npx @jiji-hoon96/oxdoc doctest ./src