BoxLang ๐ A New JVM Dynamic Language Learn More...
Copyright Since 2005 ColdBox Platform by Luis Majano
and Ortus Solutions, Corp
coldbox.org ยป boxlang.io ยป ortussolutions.com
This is the official ColdBox CLI for CommandBox. It is a collection of commands to help you work with ColdBox and its ecosystem for building, testing, and deploying BoxLang and CFML applications. It provides commands for scaffolding applications, creating tests, modules, models, views, and much more.
Apache License, Version 2.0.
The CLI matches the major version of ColdBox. Current version: 8
@8 (recommended)@7.8.0 (recommended)This versioning ensures you get the correct commands and features for your version of ColdBox.
Install the commands via CommandBox like so:
box install coldbox-cli
The ColdBox CLI provides powerful scaffolding and development tools
for both CFML and BoxLang
applications. All commands support the --help flag for
detailed information.
Create new ColdBox applications from various templates. BoxLang is now the default language for new applications:
# Create a basic ColdBox app (BoxLang by default)
coldbox create app myApp
coldbox create app myApp --boxlang # Force BoxLang (default)
# Create a CFML app explicitly
coldbox create app myApp --cfml
# Create with specific templates
coldbox create app myApp skeleton=modern
coldbox create app myApp skeleton=rest
coldbox create app myApp skeleton=flat
# Create with additional features
coldbox create app myApp --migrations # Database migrations support
coldbox create app myApp --docker # Docker environment setup
coldbox create app myApp --vite # Vite frontend asset building
coldbox create app myApp --rest # REST API configuration
# Combine multiple features
coldbox create app myApp --migrations --docker --vite
# Interactive app wizard (recommended for beginners)
coldbox create app-wizard
The app-wizard command provides an interactive,
step-by-step process for creating new applications. It's perfect for
beginners or when you want to explore all available options:
coldbox create app-wizard
The wizard will guide you through:
Example Wizard Flow:
Are you currently inside the "myapp" folder? [y/n]: n
Is this a BoxLang project? [y/n]: y
Are you creating an API? [y/n]: n
Would you like to configure Vite as your Front End UI pipeline? [y/n]: y
Would you like to setup a Docker environment? [y/n]: y
Are you going to require Database Migrations? [y/n]: y
The CLI supports multiple application templates (skeletons), or you can use your own via any FORGEBOX ID, GitHub repo, local path, zip or URL. BoxLang templates are now the primary focus for modern development:
boxlang (default) - A modern ColdBox app using BoxLang
as the primary language with latest featuresmodern - A modern ColdBox app supporting both BoxLang
and CFML with contemporary architecturerest - A ColdBox REST API template optimized for
BoxLang developmentflat - A classic ColdBox app with a flat structure for
traditional CFML developmentrest-hmvc - A RESTful ColdBox app using HMVC architecturesupersimple - A bare-bones template for minimal setupsvite - A ColdBox app integrated with Vite for frontend
development (legacy)Modern templates (boxlang, modern) support
additional features via flags:
--vite - Integrates Vite for modern frontend asset
building and hot reloading--rest - Configures the application as a REST API service--docker - Includes Docker configuration for
containerized development--migrations - Sets up database migrations supportThe CLI now supports Vite integration for modern frontend development with hot module replacement and optimized builds:
# Create app with Vite support
coldbox create app myApp --vite
# Available for BoxLang and Modern templates
coldbox create app myApp skeleton=modern --vite
Vite Features Included:
vite.config.mjs with ColdBox/BoxLang integrationpackage.json
Development Workflow:
# Start development server with hot reloading
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
The CLI provides Docker integration to containerize your ColdBox applications for consistent development and deployment environments:
# Create app with Docker support
coldbox create app myApp --docker
# Combine with other features
coldbox create app myApp --docker --vite --migrations
Docker Features Included:
Dockerfile optimized for ColdBox applicationsdocker-compose.yml for local development with servicesDocker Commands:
# Build and start development environment
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down
# Rebuild containers
docker-compose up --build
Generate MVC handlers with actions and optional views:
# Basic handler
coldbox create handler myHandler
# Handler with specific actions
coldbox create handler users index,show,edit,delete
# REST handler
coldbox create handler api/users --rest
# Resourceful handler (full CRUD)
coldbox create handler photos --resource
# Generate with views and tests
coldbox create handler users --views --integrationTests
Create domain models and business services:
# Basic model
coldbox create model User
# Model with properties and accessors
coldbox create model User properties=fname,lname,email --accessors
# Model with migration
coldbox create model User --migration
# Model with service
coldbox create model User --service
# Model with everything (service, handler, migration, seeder)
coldbox create model User --all
# Standalone service
coldbox create service UserService
Generate view templates and layouts:
# Create a view
coldbox create view users/index
# View with helper file
coldbox create view users/show --helper
# View with content
coldbox create view welcome content="<h1>Welcome!</h1>"
# Create layout
coldbox create layout main
# Layout with content
coldbox create layout admin content="<cfoutput>#view()#</cfoutput>"
Generate complete resourceful components:
# Single resource (handler, model, views, routes)
coldbox create resource photos
# Multiple resources
coldbox create resource photos,users,categories
# Custom handler name
coldbox create resource photos PhotoGallery
# With specific features
coldbox create resource users --tests --migration
Create reusable ColdBox modules:
# Create module
coldbox create module myModule
# Module with specific features
coldbox create module myModule --models --handlers --views
Generate various types of tests:
# Unit tests
coldbox create unit models.UserTest
# BDD specs
coldbox create bdd UserServiceTest
# Integration tests
coldbox create integration-test handlers.UsersTest
# Model tests
coldbox create model-test User
# Interceptor tests
coldbox create interceptor-test Security --actions=preProcess,postProcess
Work with ORM entities and database operations:
# ORM Entity
coldbox create orm-entity User table=users
# ORM Service
coldbox create orm-service UserService entity=User
# Virtual Entity Service
coldbox create orm-virtual-service UserService
# ORM Event Handler
coldbox create orm-event-handler
# CRUD operations
coldbox create orm-crud User
Create AOP interceptors:
# Basic interceptor
coldbox create interceptor Security
# Interceptor with specific interception points
coldbox create interceptor Logger points=preProcess,postProcess
# With tests
coldbox create interceptor Security --tests
Manage your development environment:
# Reinitialize ColdBox framework
coldbox reinit
# Auto-reinit on file changes
coldbox watch-reinit
# Open documentation
coldbox docs
coldbox docs search="event handlers"
# Open API documentation
coldbox apidocs
Most commands support these common options:
--force - Overwrite existing files without prompting--open - Open generated files in your default editor--boxlang - Force BoxLang code generation (usually not
needed as it's the default)--cfml - Force CFML code generation (overrides BoxLang default)--help - Show detailed help for any commandFor application creation commands:
--migrations - Include database migrations support--docker - Include Docker configuration and containerization--vite - Include Vite frontend asset building
(modern/BoxLang templates)--rest - Configure as REST API application (BoxLang templates)The CLI supports both automatic detection and manual override of the target language. BoxLang is now the default language for all new applications and generated code:
box.json settings) for existing projects--cfml flag to
generate CFML code regardless of detection--boxlang flag to
explicitly generate BoxLang code (usually not needed as it's the default)The CLI automatically detects BoxLang projects and generates
appropriate code. You can also force BoxLang mode using the
--boxlang flag.
The CLI detects BoxLang projects using three methods (in order of precedence):
testbox.runner is set to
"boxlang" in box.json
language is
set to "boxlang" in box.json
{
"name": "My BoxLang App",
"language": "boxlang",
"testbox": {
"runner": "/tests/runner.bxm"
}
}
{
"name": "My App",
"testbox": {
"runner": "boxlang"
}
}
# Default behavior (creates BoxLang code)
coldbox create handler users
coldbox create model User
# Explicit BoxLang generation (usually not needed)
coldbox create handler users --boxlang
# Force CFML generation for legacy projects
coldbox create handler users --cfml
coldbox create app myApp --cfml
When BoxLang mode is detected or forced:
.bx file extensions instead of .cfc
class syntax instead of component
.bxm extensions)The ColdBox CLI provides a comprehensive AI integration system that enhances your development workflow with intelligent coding assistance. This includes guidelines, skills, agent configurations, and MCP (Model Context Protocol) servers.
# Install AI integration
coldbox ai install # Interactive setup
coldbox ai install --agents=claude # Setup with specific agent
# View current configuration
coldbox ai info # Show configuration summary
coldbox ai tree # Visual hierarchy of AI components
coldbox ai stats # Context usage and statistics
coldbox ai stats --verbose # Detailed breakdown with model utilization
# Sync with installed modules
coldbox ai refresh # Update guidelines and skills
# Diagnose issues
coldbox ai doctor # Check AI integration health
Configure AI assistants for your project (Claude, GitHub Copilot, Cursor, etc.):
# Manage agents
coldbox ai agents list # List available agents
coldbox ai agents add claude copilot # Add multiple agents
coldbox ai agents remove cursor # Remove an agent
coldbox ai agents refresh # Regenerate all configurations
Supported Agents: Claude (CLAUDE.md), GitHub Copilot (.github/copilot-instructions.md), Cursor (.cursorrules), Codex (AGENTS.md), Gemini (GEMINI.md), OpenCode (AGENTS.md)
Framework documentation and best practices for AI assistants:
# View guidelines
coldbox ai guidelines list # List all installed guidelines
coldbox ai guidelines list --verbose # Show details and descriptions
# Manage guidelines
coldbox ai guidelines install coldbox testbox # Install by name
coldbox ai guidelines install https://example.com/ # Install from URL
coldbox ai guidelines uninstall testbox # Remove guideline
coldbox ai guidelines refresh # Update from modules
Guideline Types: Core (framework), Module (from installed modules), Custom (project-specific), Override (custom versions of core)
AI coding cookbooks with practical how-to examples:
# View skills
coldbox ai skills list # List all installed skills
coldbox ai skills list --verbose # Show details
# Manage skills
coldbox ai skills install creating-handlers async-programming
coldbox ai skills uninstall async-programming
coldbox ai skills refresh # Update from modules
Skill Categories: Scaffolding, Testing, Configuration, Database, REST APIs, Security, Performance, and more
Model Context Protocol documentation servers:
# View MCP configuration
coldbox ai mcp list # List available servers
coldbox ai mcp info # Show configuration
# Manage servers
coldbox ai mcp add github filesystem # Add MCP servers
coldbox ai mcp remove filesystem # Remove a server
coldbox ai mcp config # Generate agent-specific configs
MCP Server Types: Core (30+ built-in), Module (from packages), Custom (project-specific)
Subagent Pattern: ColdBox CLI uses an optimized architecture that reduces context by 58% while maintaining full capability:
The CLI tracks and analyzes your AI context usage:
coldbox ai stats # Quick overview
coldbox ai stats --verbose # Full analysis with model breakdowns
coldbox ai stats --json # Machine-readable output
Every command provides detailed help:
# General help
coldbox help
# AI integration help
coldbox ai help
# Specific command help
coldbox create handler --help
coldbox ai agents --help
coldbox ai stats --help
I THANK GOD FOR HIS WISDOM IN THIS PROJECT
"I am the way, and the truth, and the life; no one comes to the Father, but by me (JESUS)" Jn 14:1-12
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.
bx-compat-cfml when doing --rest due to needing some CFML compatibilityComplete AI-powered development assistant for ColdBox with 41 guidelines, 62 skills, 30+ MCP documentation servers, and support for 6 AI agents (Claude, Copilot, Cursor, Codex, Gemini, OpenCode).
coldbox ai install - Set up AI integration with agent selection and language detectioncoldbox ai refresh - Sync guidelines, skills, and MCP servers with installed modulescoldbox ai info - Display current AI configurationcoldbox ai doctor - Diagnose AI integration health with detailed reportinglist, add, remove, create, override, refresh, helplist, create, override, refresh, remove, helplist, add, remove, helpCLAUDE.md), GitHub Copilot (.github/copilot-instructions.md), Cursor (.cursorrules), Codex (AGENTS.md), Gemini (GEMINI.md), OpenCode (AGENTS.md)list, add, remove, active, opencoldbox ai guidelines override <name> - Customize any guideline with project-specific conventionscoldbox ai skills override <name> - Override core/module skills with project-specific patterns.ai/guidelines/overrides/ and .ai/skills/overrides/--override flag for targeted removal--ai flag creates .ai/guidelines and .ai/skills directories.ai/ convention (not resources/)commandbox-boxlang is a dependency to detect BoxLang projectsbx classes when --boxlang is used was missing from handler creation.babelrc for vite support, which is ignored by default by git ignores.boxlang templatedocker argument to create app was supposed to be false by default, not truetrue nowvite to create a Vite enabled app: coldbox create app name="myApp" --viterest to create a REST enabled app: coldbox create app name="myApp" --restdocker to create a Docker enabled app: coldbox create app name="myApp" --dockermigrations to create a Migrations enabled app: coldbox create app name="myApp" --migrations--cfml argument to create a CFML app: coldbox create app name="myApp" --cfml instead of BoxLang (app is default)default and this is a BoxLang project, it will switch the skeleton to BoxLang.testbox-cli and commandbox-migrations to dependencies so we can use them in the CLI commandsboxlang argumentsmodern template for creating modern apps with the latest featuresboxlang template for creating apps with the latest boxlang features--boxlang argument to create content for BoxLanglanguage argument detection for BoxLangcoldbox watch commandtemplatesPathopen paramtestbox-cli, commandbox-migrations only when used.coldbox create layout failing due to unescpaed #view()# commandtestbox-cli as a dependencyBaseCommand hierarchy for all commands to inherit fromcoldbox create service command to create services easilycoldbox create model --service to create a model with a servicecoldbox create model --all to create a model with a service and all the things7coldbox create app command to finalize the create app jobforgeboxStorage for new apps, this was missingcoldbox create handler was not creating the viewsisLoaded() was actually wrongresources to ColdBox 7 standard code--force command to several commands for overwriting filesmigrations to init the migrations on the project: coldbox create app name="myApp" --migrationscreate view command now has an open attribute to open the created views in the editorcreate layout name="myLayout" content="my content"create view name="myView" content="my content"create handler name="myHandler" --resourcecreate handler name="myHandler" --resource --restcreate model name="myModel" --migrationcreate model name="myModel" --seedercreate model name="myModel" --handler or create model name="myModel" --handler --restcreate model name="myModel" --resourcecreate model name="myModel" --allcoldbox docs command to open the ColdBox docs in your browser and search as well: coldbox docs search="event handlers"coldbox apidocs command to open the ColdBox API Docs in your browser.scripts in the templates, which is not needed
$
box install coldbox-cli