CommandBox Output
Generate CommandBox CLI command documentation with namespace organization
π― The CommandBox Strategy is a specialized output format designed specifically for documenting CommandBox CLI commands and namespaces. It extends the HTML API Strategy with CLI-focused terminology and navigation.
π Overview
The CommandBox Strategy transforms CommandBox command components into searchable, navigable HTML documentation with command-specific features:
Command-Centric Navigation - Organizes by command namespaces (not packages)
CLI Terminology - Uses "commands" and "namespaces" instead of "classes" and "packages"
Qualified Names - Displays full command paths (e.g.,
server start,package show)Namespace Hierarchy - Visualizes command organization and nesting
Frames Theme - Uses traditional frameset layout for CLI documentation
π¦ Properties
The CommandBox Strategy accepts the following configuration properties:
outputDir
string
Yes
Output directory absolute path
projectTitle
string
No
HTML title for documentation (default: "Untitled")
π― Basic Usage
Using Strategy Alias
Using Full Class Path
π Generated Structure
The CommandBox Strategy generates the following file structure:
π¨ Features
Command Path Display
Unlike standard class documentation, CommandBox Strategy shows the full command path:
Namespace Organization
Commands are grouped by their namespace hierarchy:
servernamespacestartcommandstopcommandrestartcommand
packagenamespaceshowcommandsetcommandinstallcommand
CLI-Focused Templates
The strategy uses specialized templates that:
Display command syntax and usage
Show command examples in CLI format
Highlight command parameters and flags
Use CLI-appropriate terminology
π Real-World Examples
Documenting CommandBox Core
Generate documentation for CommandBox's built-in commands:
Custom CommandBox Module
Document your own CommandBox module commands:
Multiple Command Modules
Document multiple CommandBox modules together:
π§ Technical Details
Strategy Implementation
The CommandBox Strategy:
Extends:
docbox.strategy.api.HTMLAPIStrategyTemplate Path:
/docbox/strategy/CommandBox/resources/templatesAssets Path:
/docbox/strategy/api/themes/frames/resources/static
Metadata Augmentation
The strategy augments the standard metadata query with additional columns:
command- The command name extracted from the componentnamespace- The namespace path for the command
Template Overrides
CommandBox Strategy overrides specific templates:
class.cfm- Modified to show command syntaxpackage-summary.cfm- Shows namespace commandsoverview-summary.cfm- Lists all namespaces
β οΈ Important Notes
Theme Locked: CommandBox Strategy always uses the frames theme for consistency
Command Components: Expects CommandBox command component structure
Namespace Detection: Automatically extracts namespace from component metadata
Asset Sharing: Reuses frames theme assets for stability
π Related Documentation
HTML Output - Parent strategy documentation
Custom Output Strategy - Creating your own strategies
Configuration - Strategy configuration options
π‘ Tips
Use consistent naming conventions for command components
Add comprehensive JavaDoc comments to commands
Document command parameters with
@hintattributesInclude usage examples in command descriptions
Group related commands under the same namespace
Last updated
Was this helpful?