Quick Start
Default Behavior
Runningmint-tsdocs without arguments defaults to generate for the current directory:
generate will prompt you to run init automatically.
Commands
init
Initialize mint-tsdocs configuration in your project. Usage:--yes,-y- Skip prompts and use auto-detected defaults--skip-mintlify- Skip Mintlify initialization--project-dir PATH- Project directory (default: current directory)
- Auto-detects TypeScript entry point from package.json
- Searches for existing docs.json (Mintlify config)
- Creates
mint-tsdocs.config.jsonwith detected settings - Optionally initializes Mintlify if not already set up
- Adds
"mint-tsdocs"script to package.json
generate
Generate Mintlify-compatible MDX documentation from TypeScript source. Usage:--skip-extractor- Skip extraction step (use cached data)--project-dir PATH- Project directory (alternative to positional argument)
-v,--verbose- Show verbose output (info level logging)--debug- Show debug output (implies —verbose)-q,--quiet- Suppress all output except errors
- Loads configuration from
mint-tsdocs.config.json - Prompts to run init if config not found
- Validates and compiles your TypeScript
- Extracts API information from your types
- Generates MDX files with Mintlify components
- Updates navigation in
docs.json
customize
Copy default templates to a directory for customization. Usage:-t,--template-dir PATH- Template directory path (if omitted, you will be prompted)-f,--force- Overwrite existing templates
- Copies default Liquid templates from mint-tsdocs package
- Creates directory structure for customization
- Templates can be edited to customize MDX output
layout.liquid- Base layout for all pagesclass.liquid- Class documentation templateinterface.liquid- Interface documentation templatemethod.liquid- Method documentation templateproperty.liquid- Property documentation templateconstructor.liquid- Constructor documentation template
show
[DEPRECATED] This command is deprecated and will be removed in a future version. Usage:- Use
mint-tsdocs configinstead ofmint-tsdocs show config - Use
mint-tsdocs coverageinstead ofmint-tsdocs show stats
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:- Undocumented public APIs - Classes, interfaces, and functions without documentation
- Missing parameter descriptions - Function/method parameters without
@paramdocumentation - Missing return descriptions - Non-void functions without
@returnsdocumentation - Missing examples - Complex APIs (classes/interfaces) without usage examples
- TSDoc syntax - Invalid TSDoc comment syntax (requires
@typescript-eslint/parserandeslint-plugin-tsdoc)
- Issue severity (error, warning, info)
- Issue description
- Location (API item path or file:line:column)
- Summary with counts by severity
0- No issues found or only warnings/info1- One or more errors found
mint-tsdocs generate first.
coverage
Calculate TSDocs coverage for the project. Usage:--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 byfile,folder, ornone(default:none)--json- Output report in JSON format--skip-extractor- Skip running api-extractor (use existing .api.json files)
0- Coverage meets or exceeds threshold1- Coverage is below threshold
help
Display comprehensive help information. Usage:- Tool description
- Usage patterns
- Available commands
- Global options
- Examples
- Documentation links
version
Display version and package information. Usage:- Package name and version
- Description
- Homepage URL
- License information
- Issue tracker URL
Global Options
Available for all commands:| Option | Short | Description |
|---|---|---|
--verbose | -v | Show verbose output (info level logging) |
--debug | Show debug output (includes verbose) | |
--quiet | -q | Suppress all output except errors |
--help | -h | Show help for command |
Monorepo Support
mint-tsdocs fully supports monorepos through positional directory arguments:Using with npx
No installation required when using npx:Configuration File
Configuration is stored inmint-tsdocs.config.json at your project root.
Minimal Example:
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.jsonmintlifyTsdocsfield inpackage.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:mint-tsdocs:*:error- Errors onlymint-tsdocs:*:warn- Warnings and errorsmint-tsdocs:*:info- Info, warnings, and errors (same as —verbose)mint-tsdocs:*:debug- All output (same as —debug)
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Error occurred |
Resources
- Documentation: https://mint-tsdocs.saulo.engineer/
- GitHub: https://github.com/mintlify/tsdocs
- Issues: https://github.com/mintlify/tsdocs/issues
- Mintlify Docs: https://mintlify.com/docs
- API Extractor: https://api-extractor.com/

