A CommandBox module for generating API documentation from CFML/BoxLang codebases using DocBox. Generate beautiful JavaDoc-style reference documentation directly from the command line!
- ✅ Generate API documentation from CFML/BoxLang source code
- ✅ Support for multiple source directories and mappings
- ✅ Multiple output strategies (HTML, JSON, XMI)
- ✅ Customizable project titles and output locations
- ✅ Regex-based exclusion patterns
- ✅ JSON array format for complex mapping scenarios
- CommandBox 2.5+
Install the commands via CommandBox:
box install commandbox-docboxGenerate documentation with a single source directory:
docbox generate source=/path/to/coldbox \
mapping=coldbox \
excludes=tests \
strategy-outputDir=/output/path \
strategy-projectTitle="My Docs"Generate documentation for multiple source directories using dynamic parameters:
docbox generate mappings:v1.models=/path/to/modules_app/v1/models \
mappings:v2.models=/path/to/modules_app/v2/models \
strategy-outputDir=/output/path \
strategy-projectTitle="My API v1 & v2"For complex scenarios, use JSON array format:
docbox generate \
source="[{'dir':'../src/modules_app/v1/models', 'mapping':'v1.models'}, {'dir':'../src/modules_app/v2/models', 'mapping':'v2.models'}]" \
strategy-outputDir=docs \
strategy-projectTitle="My API"| Argument | Description |
|---|---|
strategy |
The strategy class to use for generating docs. Default: docbox.strategy.api.HTMLAPIStrategy |
source |
The directory containing the CFML/BoxLang source code |
mapping |
The base mapping for the source folder |
excludes |
A regex pattern to exclude files/folders from documentation |
mappings:* |
Dynamic parameters defining source and mapping pairs (overrides source and mapping) |
strategy-* |
Any strategy-specific options (e.g., strategy-outputDir, strategy-projectTitle) |
docbox.strategy.api.HTMLAPIStrategy- Generate HTML API documentation (default)docbox.strategy.json.JSONAPIStrategy- Generate JSON API documentationdocbox.strategy.uml2tools.XMIStrategy- Generate XMI for UML tools
# Format code
box run-script format
# Watch and auto-format on changes
box run-script format:watch
# Check formatting without changes
box run-script format:check
# Generate API docs
box run-script build:docs
# Full build (source + docs + checksums)
box run-script build:moduleApache License, Version 2.0 - See LICENSE
This project is maintained by Ortus Solutions. Support our open source work!
"I am the way, and the truth, and the life; no one comes to the Father, but by me (JESUS)" - John 14:6
Built with ❤️ by Ortus Solutions