BoxLang 🚀 A New JVM Dynamic Language Learn More...

DocBox BoxLang Module

v5.0.0 Projects

All Contributors Latest release

██████╗  ██████╗  ██████╗██████╗  ██████╗ ██╗  ██╗
██╔══██╗██╔═══██╗██╔════╝██╔══██╗██╔═══██╗╚██╗██╔╝
██║  ██║██║   ██║██║     ██████╔╝██║   ██║ ╚███╔╝
██║  ██║██║   ██║██║     ██╔══██╗██║   ██║ ██╔██╗
██████╔╝╚██████╔╝╚██████╗██████╔╝╚██████╔╝██╔╝ ██╗
╚═════╝  ╚═════╝  ╚═════╝╚═════╝  ╚═════╝ ╚═╝  ╚═╝

📚 DocBox - API Documentation Generator

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


âœĻ Features

  • ðŸŽĻ Modern HTML Documentation - Two professional themes with dark mode support
  • 🔍 Real-time Search - Live method filtering with keyboard navigation
  • 📋 Multiple Output Formats - HTML, JSON, and XMI/UML diagrams
  • ðŸĶĪ BoxLang Native - First-class BoxLang runtime and CLI support
  • 📝 JavaDoc Compatible - Standard JavaDoc comment block parsing
  • ⚡ Alpine.js SPA - Fast, modern single-page application interface
  • 🌓 Dark Mode - System preference detection with manual toggle

🚀 Quick Start

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"

CFML Library

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)"
    );

ðŸ“Ķ Installation Options

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

ðŸŽĻ Modern Themes

Default Theme (Alpine.js SPA)

  • ⚡ Client-side routing and dynamic filtering
  • 🌓 Dark mode with localStorage persistence
  • 🔍 Real-time method search
  • 📑 Method tabs (All/Public/Private/Static/Abstract)
  • 💜 Modern purple gradient design

Frames Theme (Traditional)

  • 🗂ïļ Classic frameset layout
  • 📚 jstree navigation sidebar
  • ðŸŽŊ Bootstrap 5 styling
  • ðŸ“ą Mobile-friendly design

ðŸ’ŧ System Requirements

  • BoxLang 1.0+ or CFML Engine (Lucee 5+, Adobe ColdFusion 2023+)
  • CommandBox (for installation and CLI usage)

📚 Output Formats

Format Description Use Case
HTML Modern browsable documentationDeveloper reference, public API docs
JSON Machine-readable structured dataIntegration with other tools, custom processing
XMI UML diagram generationArchitecture diagrams, visual documentation

🛠ïļ CLI Examples

BoxLang Module CLI

# 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

CommandBox Task Runner

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();
    }
}

📖 Documentation

Complete documentation is available at docbox.ortusbooks.com



🐛 Issues & Feature Requests

Found a bug or have an idea? Report it on our Jira issue tracker


💎 Community & Support


🙏 Credits

Thanks to Mark Mandel for the original project that inspired DocBox.


📄 License

Apache License, Version 2.0


✝ïļ The Daily Bread

"I am the way, and the truth, and the life; no one comes to the Father, but by me (JESUS)" - John 14:6


CHANGELOG

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.


Unreleased

Added

  • New bx-docbox artifact for BoxLang projects
  • New engine support: Adobe 2025
  • BoxLang support and BoxLang prime
  • Ability to do generation from BoxLang projects and source code
  • New themes and templates for API generation
  • New modern default theme for API generation
  • New dark mode for default theme
  • New search functionality for classes and methods in API theme
  • New filtering functionality for methods by visibility and type in API theme

4.2.1 - 2024-02-13

4.1.1 - 2024-02-13

Fixed

  • Using old http instead of https on download URL

4.1.1 - 2024-02-13

Fixed

  • Missed branch identifier in build process

4.1.0 - 2024-02-13

Added

  • Adobe 2023 Testing and Support
  • New Github Actions
  • New supporting files
  • New build/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.

Fixed

  • Build Versions and changelog
  • Removal of box.zip in root from old scripts

[4.0.0] - 2023-08-03

BREAKING

  • Dropped support for Adobe 2016. Adobe doesn't support ACF 16 anymore, so neither do we.

NEW

  • Added support for Adobe 2021
  • Added support for @myCustomTag custom docblock tags on methods. (Already supported on components and properties, but missing on methods).
  • Added GitHub Actions CI for automated testing, format checking, releases and more

FIX

  • Fixes support for Adobe 2018. (Mainly in the CommandBox strategy.)

[3.0.0]

Added

  • New json output strategy for machine-readable documentation
  • New addStrategy() method for multiple strategy support

Changed

  • Can configure strategy with "alias" name, like strategy="HTML".

Removed

  • Removed HTML as the default strategy. You will need to explicitly pass this to the constructor or to docbox.addStrategy( "HTML", props ) to set your desired output format.

Fixed

  • Fixed failing XMI strategy

[2.2.1]

Fixed

  • Bug on DocBox tracing errors, left over a couple of ()

[2.2.0]

Added

  • Better output of trace commands for CLI integration
  • Added @throws annotation to function definitions
  • Added @deprecated annotation to function definitions

[2.1.0]

Fixed

  • Varscoping issue to help with COMMANDBOX-399
  • BUGFIX: Missing pound sign in ExpandPath(), added better wording for custom strategy path
  • Fix cleanPath without a leading slash with regex updates

[2.0.7]

Fixed

  • Build process messed up folder structure. Basically 2.0.6 was unusable

[2.0.6]

Fixed

  • DOCBOX-1 - Extra slash breaks some links on S3-hosted docs

Improved

  • Updated build process

Added

  • Travis integration

[2.0.5]

Improved

  • Moved CommandBox command to its own repo

[2.0.4]

Improved

  • Update package directory and location for CommandBox command

[2.0.3]

Fixed

  • FireFox location bug

[2.0.2]

Fixed

  • Fixes on conversion to script

Improved

  • Updates on box.json for standalone installations

[2.0.1]

Fixed

  • Fixes for ACF

[2.0.0]

Improved

  • Updated to DocBox styles

$ box install bx-docbox

No collaborators yet.
     
  • {{ getFullDate("2025-12-15T22:38:37Z") }}
  • {{ getFullDate("2025-12-15T23:04:49Z") }}
  • 22
  • 1