Skip to main content

Quick Start

Default Behavior

Running mint-tsdocs without arguments defaults to generate for the current directory:
If you provide a path that isn’t a known command, it’s treated as the project directory:
Smart initialization: If no configuration exists, generate will prompt you to run init automatically.

Commands

init

Initialize mint-tsdocs configuration in your project. Usage:
Options:
  • --yes, -y - Skip prompts and use auto-detected defaults
  • --skip-mintlify - Skip Mintlify initialization
  • --project-dir PATH - Project directory (default: current directory)
Examples:
What it does:
  1. Auto-detects TypeScript entry point from package.json
  2. Searches for existing docs.json (Mintlify config)
  3. Creates mint-tsdocs.config.json with detected settings
  4. Optionally initializes Mintlify if not already set up
  5. Adds "mint-tsdocs" script to package.json

generate

Generate Mintlify-compatible MDX documentation from TypeScript source. Usage:
Options:
  • --skip-extractor - Skip extraction step (use cached data)
  • --project-dir PATH - Project directory (alternative to positional argument)
Global Options:
  • -v, --verbose - Show verbose output (info level logging)
  • --debug - Show debug output (implies —verbose)
  • -q, --quiet - Suppress all output except errors
Examples:
What it does:
  1. Loads configuration from mint-tsdocs.config.json
  2. Prompts to run init if config not found
  3. Validates and compiles your TypeScript
  4. Extracts API information from your types
  5. Generates MDX files with Mintlify components
  6. Updates navigation in docs.json

customize

Copy default templates to a directory for customization. Usage:
Options:
  • -t, --template-dir PATH - Template directory path (if omitted, you will be prompted)
  • -f, --force - Overwrite existing templates
Examples:
What it does:
  1. Copies default Liquid templates from mint-tsdocs package
  2. Creates directory structure for customization
  3. Templates can be edited to customize MDX output
Template Files:
  • layout.liquid - Base layout for all pages
  • class.liquid - Class documentation template
  • interface.liquid - Interface documentation template
  • method.liquid - Method documentation template
  • property.liquid - Property documentation template
  • constructor.liquid - Constructor documentation template

show

[DEPRECATED] This command is deprecated and will be removed in a future version. Usage:
Migration:
  • Use mint-tsdocs config instead of mint-tsdocs show config
  • Use mint-tsdocs coverage instead of mint-tsdocs show stats
The show command currently redirects to the new commands automatically, but you should update your scripts to use the new commands directly.

lint

Check documentation quality and find issues in your API documentation. Usage:
Options:
  • --verbose, -v - Show detailed output including API Extractor and ESLint progress
What it checks:
  • Undocumented public APIs - Classes, interfaces, and functions without documentation
  • Missing parameter descriptions - Function/method parameters without @param documentation
  • Missing return descriptions - Non-void functions without @returns documentation
  • Missing examples - Complex APIs (classes/interfaces) without usage examples
  • TSDoc syntax (via API Extractor) - Invalid TSDoc comment syntax in compiled declarations
  • TSDoc syntax (via ESLint, optional) - Deeper source-level linting with eslint-plugin-tsdoc
ESLint Integration (optional): The lint command can optionally run ESLint with eslint-plugin-tsdoc for deeper source-level TSDoc validation. This catches issues in .ts source files that may get stripped during compilation to .d.ts. Configure via lint.eslint.enabled in mint-tsdocs.config.json:
  • true - Force enable (shows error if eslint not installed)
  • false - Force disable (no hints shown)
  • Not set (default) - Auto-detect: runs eslint if installed, shows install hint if not
To enable, install the required packages:
Examples:
Exit Codes:
  • 0 - No issues found or only warnings/info
  • 1 - One or more errors found
Note: The lint command requires that documentation has been generated at least once. Run mint-tsdocs generate first.

coverage

Calculate TSDocs coverage for the project. Usage:
Options:
  • --threshold NUMBER - Minimum coverage percentage required to pass (overrides config)
  • --include GLOB - Glob pattern for files to include (can be repeated)
  • --exclude GLOB - Glob pattern for files to exclude (can be repeated)
  • --group-by TYPE - Group results by file, folder, or none (default: none)
  • --json - Output report in JSON format
  • --skip-extractor - Skip running api-extractor (use existing .api.json files)
Examples:
Exit Codes:
  • 0 - Coverage meets or exceeds threshold
  • 1 - Coverage is below threshold

help

Display comprehensive help information. Usage:
Shows:
  • Tool description
  • Usage patterns
  • Available commands
  • Global options
  • Examples
  • Documentation links

version

Display version and package information. Usage:
Shows:
  • Package name and version
  • Description
  • Homepage URL
  • License information
  • Issue tracker URL

Global Options

Available for all commands: Examples:

Monorepo Support

mint-tsdocs fully supports monorepos through positional directory arguments:
Monorepo Example Workflow:

Using with npx

No installation required when using npx:
package.json Scripts:
Then run:

Configuration File

Configuration is stored in mint-tsdocs.config.json at your project root. Minimal Example:
Full Example:
Note: TSDoc configuration is stored in a separate tsdoc.json file at your project root. This file is created automatically by mint-tsdocs init and is NOT part of mint-tsdocs.config.json. Alternative Locations:
  • mint-tsdocs.config.json (recommended)
  • .mint-tsdocsrc
  • .mint-tsdocsrc.json
  • mintlifyTsdocs field in package.json

Common Workflows

First-Time Setup

Development Workflow

Debugging Issues

Template Customization


Troubleshooting

Config Not Found

TypeScript Compilation Errors

API Extractor Errors

Documentation Issues


Environment Variables

DEBUG

Control debug output using the DEBUG environment variable:
Debug Levels:
  • mint-tsdocs:*:error - Errors only
  • mint-tsdocs:*:warn - Warnings and errors
  • mint-tsdocs:*:info - Info, warnings, and errors (same as —verbose)
  • mint-tsdocs:*:debug - All output (same as —debug)

Exit Codes

Check exit code in scripts:

Resources