BoxLang ð A New JVM Dynamic Language Learn More...
âââââââ âââââââ ââââââââââââââ âââââââ âââ âââ
ââââââââââââââââââââââââââââââââââââââââââââââââââ
âââ ââââââ ââââââ âââââââââââ âââ ââââââ
âââ ââââââ ââââââ âââââââââââ âââ ââââââ
ââââââââââââââââââââââââââââââââââââââââââââââ âââ
âââââââ âââââââ ââââââââââââââ âââââââ âââ âââ
DocBox is a JavaDoc-style documentation generator for BoxLang and CFML codebases, featuring modern HTML themes, JSON output, and UML diagram generation.
ð Documentation | ðŧ GitHub | ðŽ Ortus Community
Install DocBox as a BoxLang module for CLI access:
# CommandBox web runtimes
box install bx-docbox
# BoxLang OS runtime
install-bx-module bx-docbox
Generate documentation from the command line:
boxlang module:docbox --source=/path/to/code \
--mapping=myapp \
--output-dir=/docs \
--project-title="My API"
Install as a development dependency:
box install docbox --saveDev
Use programmatically in your build scripts:
new docbox.DocBox()
.addStrategy( "HTML", {
projectTitle : "My API Docs",
outputDir : expandPath( "./docs" ),
theme : "default" // or "frames"
})
.generate(
source = expandPath( "./models" ),
mapping = "models",
excludes = "(tests|build)"
);
| Method | Command | Use Case |
|---|---|---|
| BoxLang Module | box install bx-docbox
| CLI usage, BoxLang projects |
| CFML Library | box install docbox --saveDev
| Programmatic use, build scripts |
| CommandBox Module | box install commandbox-docbox
| Task runner, automated builds |
| Format | Description | Use Case |
|---|---|---|
| HTML | Modern browsable documentation | Developer reference, public API docs |
| JSON | Machine-readable structured data | Integration with other tools, custom processing |
| XMI | UML diagram generation | Architecture diagrams, visual documentation |
# Basic usage
boxlang module:docbox --source=/src --mapping=app --output-dir=/docs
# Multiple source mappings
boxlang module:docbox --mappings:v1=/src/v1 --mappings:v2=/src/v2 -o=/docs
# With theme selection
boxlang module:docbox --source=/src --mapping=app --theme=frames -o=/docs
# Show help
boxlang module:docbox --help
Install the commandbox-docbox module:
box install commandbox-docbox
Generate documentation using CommandBox commands:
# Generate HTML docs
box docbox generate source=/path/to/code mapping=myapp outputDir=/docs
# Generate with excludes
box docbox generate source=/src mapping=app outputDir=/docs excludes=(tests|build)
# Generate JSON docs
box docbox generate source=/src mapping=app outputDir=/docs strategy=JSON
# Show help
box docbox generate help
Use in a task.cfc for automated builds:
component {
function run() {
command( "docbox generate" )
.params(
source = getCWD() & "/models",
mapping = "models",
outputDir = getCWD() & "/docs",
excludes = "tests"
)
.run();
}
}
Complete documentation is available at docbox.ortusbooks.com
Found a bug or have an idea? Report it on our Jira issue tracker
Thanks to Mark Mandel for the original project that inspired DocBox.
Apache License, Version 2.0
"I am the way, and the truth, and the life; no one comes to the Father, but by me (JESUS)" - John 14:6
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
http instead of https on download URLbuild/Docs.cfc task for building the documentation using itself, before we where getting away with it because there was a previous DocBox version. Now we need to build the docs with the current version of DocBox.box.zip in root from old scripts@myCustomTag custom docblock tags on methods. (Already supported on components and properties, but missing on methods).json output strategy for machine-readable documentationaddStrategy() method for multiple strategy supportstrategy="HTML".docbox.addStrategy( "HTML", props ) to set your desired output format.()@throws annotation to function definitions@deprecated annotation to function definitions
$
box install bx-docbox