terminalColdBox CLI

The ColdBox CLI is a powerful command-line interface tool that helps you create, manage, and scaffold ColdBox applications and components with ease.

Welcome to the ColdBox CLI - your ultimate command-line companion for rapid ColdBox development! πŸš€ This powerful tool streamlines the creation, management, and scaffolding of ColdBox applications and components for both CFML and BoxLang projects.

🎯 BoxLang First: BoxLang is now the default language for all new applications, reflecting the modern direction of ColdBox development.

πŸ“¦ CLI Versions & Compatibility

The CLI follows semantic versioning aligned with ColdBox major releases:

ColdBox Version
CLI Version
Status
Installation Command

ColdBox 8

@8

βœ… Current

box install coldbox-cli@8

ColdBox 7

@7.8.0

🟑 Legacy

box install [email protected]

ColdBox 6

@6

πŸ”Ά Legacy

box install coldbox-cli@6

πŸ’‘ Pro Tip: Always use the CLI version that matches your ColdBox framework version for the best compatibility and latest features.

⚑ Quick Installation

Get started in seconds with CommandBox:

# Install the latest ColdBox CLI (v8)
box install coldbox-cli

# Get help anytime
coldbox --help

πŸ”— Source Code: Explore the CLI on GitHub at coldbox/coldbox-cliarrow-up-right - contributions welcome!

🎯 Getting Started

The ColdBox CLI supercharges your development workflow with intelligent scaffolding and modern development tools. Whether you're building BoxLang or CFML applications, the CLI has you covered!

πŸ“š Help is Always Available: Every command supports the --help flag for detailed usage information.

πŸ₯Š Application Creation

Create stunning ColdBox applications from professionally crafted templates. BoxLang leads the way as the default language for modern development:

πŸ—οΈ Application Templates & Features

Choose from various templates and enhance with powerful features:

πŸ€– AI-Ready Apps: The --ai flag triggers coldbox ai install automatically after app creation, setting up guidelines, skills, and agent configurations for your preferred AI assistant. The aiAgent parameter accepts a comma-separated list: claude, copilot, cursor, codex, gemini, opencode.

πŸ§™β€β™‚οΈ Interactive App Wizard - Perfect for Beginners!

New to ColdBox? The App Wizard is your friendly guide to creating the perfect application setup:

The wizard walks you through every decision with helpful prompts:

Step
What It Asks
Why It Matters

πŸ“ Location

Create in current folder or new directory?

Project organization

πŸ”₯ Language

BoxLang (default) or CFML?

Development preference

🎯 Type

API/REST service or full web app?

Architecture choice

🎨 Frontend

Include Vite for modern UI?

Asset management

🐳 Environment

Docker containerization?

Deployment strategy

πŸ—ƒοΈ Database

Need migration support?

Data management

Example Wizard Session:

πŸ’‘ Pro Tip: The wizard is perfect for exploring all available options and learning about ColdBox features as you create your app!

πŸ“‹ Application Templates - Choose Your Foundation

Select from professionally crafted templates or bring your own via ForgeBox ID, GitHub repo, local path, ZIP file, or URL. Our modern templates prioritize BoxLang for cutting-edge development:

These can be used for BoxLang PRIME projects or CFML projects with the bx-cfml-compat module for compatibility.

Template
Description
Best For

boxlang ⭐

Default - Modern ColdBox with latest BoxLang features

New projects, modern architecture

modern

Contemporary app supporting BoxLang + CFML

Hybrid projects, gradual migration

πŸ“œ FLAT CFML Templates (Traditional Development)

Can also be used for BoxLang projects but using the bx-cfml-compat modules to ensure compatibility.

Template
Description
Best For

flat

Classic flat-structure ColdBox app

Traditional CFML projects

rest

BoxLang-optimized REST API template

Microservices, API development

rest-hmvc

RESTful app with HMVC architecture

Complex API systems

supersimple

Bare-bones minimal setup

Learning, prototyping

vite

CFML app with Vite integration (legacy)

Legacy frontend modernization

πŸš€ Enhanced Template Features

Modern templates (boxlang, modern) unlock powerful development features through simple flags:

Feature Flag
What It Does
Perfect For

--vite 🎨

Modern frontend with hot reload & optimized builds

Interactive UIs, SPAs

--rest 🌐

REST API configuration with OpenAPI docs

Microservices, APIs

--docker 🐳

Complete containerization setup

Cloud deployment, consistency

--migrations πŸ—ƒοΈ

Database migration system

Data-driven apps

--ai πŸ€–

AI integration (guidelines, skills, agents)

AI-assisted development

Power Combinations:

⚑ Vite Integration - Modern Frontend Made Easy

Transform your frontend development with Vite's lightning-fast build system and hot module replacement:

🎁 What You Get Out of the Box:

Feature
Benefit
Developer Experience

πŸ”§ Pre-configured Setup

vite.config.mjs ready to go

Zero configuration needed

πŸ”₯ Hot Module Replacement

Instant updates without refresh

Ultra-fast development

πŸ“¦ Optimized Builds

Code splitting & tree shaking

Production-ready performance

🎨 Asset Processing

CSS, SCSS, JS, TS support

Modern toolchain

πŸ”— Dev Server + Proxy

Seamless ColdBox integration

Unified development experience

πŸš€ Development Workflow:

πŸ’‘ Pro Tip: Vite's dev server automatically proxies to your ColdBox application, giving you the best of both worlds!

🐳 Docker Integration - Deploy Anywhere, Run Everywhere

Containerize your ColdBox applications for consistent development and bulletproof deployments:

🎁 Complete Container Solution:

Component
What's Included
Benefit

πŸ“¦ Multi-stage Dockerfile

Optimized for ColdBox apps

Minimal production images

πŸ”§ docker-compose.yml

Complete dev environment

One-command setup

πŸ—ƒοΈ Database Services

PostgreSQL/MySQL ready

Consistent data layer

⚑ Redis Caching

High-performance caching

Speed & scalability

🌐 Environment Config

Secure variable management

Production-ready security

πŸ’š Health Checks

Built-in monitoring

Reliable deployments

πŸš€ Container Commands:

🎯 Production Ready: The Docker setup includes production optimizations like multi-stage builds, security best practices, and health monitoring!

🎯 Handlers (Controllers) - Your Application Logic

Generate powerful MVC controllers with intelligent scaffolding for actions, views, and tests:

🎁 Handler Generation Options:

Flag
What It Creates
Perfect For

--rest

RESTful endpoints (GET, POST, PUT, DELETE)

API development

--resource

Full CRUD operations

Data management

--views

Corresponding view templates

Full-stack apps

--integrationTests

Test files for actions

Quality assurance

πŸ’‘ Smart Generation: The CLI creates handlers in the correct directory structure and generates appropriate code for your project language (BoxLang/CFML)!

πŸ—οΈ Automatic Layout Detection (v8.10.0): The CLI detects whether your project uses a modern layout (app/ + public/) or a flat layout and places files in the correct location automatically. In a modern layout, coldbox create handler Users places the handler in app/handlers/Users.bx rather than handlers/Users.cfc. No flags needed - it just works!

πŸ“Š Models & Services - Your Business Logic Powerhouse

Create robust domain models and business services that form the backbone of your application:

πŸ—οΈ Smart File Placement: Model files are automatically placed in app/models (modern layout) or models (flat layout) based on your project structure. See Automatic App Layout Detection for details.

🎁 Model Generation Features:

Option
What You Get
Use Case

--accessors

Getter/setter methods

Clean property access

--migration

Database table creation

Data persistence

--service

Business logic layer

Complex operations

--all

Complete MVC stack

Full feature development

πŸ’‘ Smart Property Generation:

πŸš€ Pro Tip: Use --all when you need a complete feature with model, service, handler, database migration, and test seeders!

🎨 Views & Layouts - Beautiful User Interfaces

Craft stunning user interfaces with intelligent view and layout generation:

πŸ—οΈ Smart File Placement: View files are automatically placed in app/views (modern layout) or views (flat layout) based on your project structure.

🎁 View Generation Options:

Component
Purpose
Best Practice

Views

Page content & UI components

Keep focused & reusable

Layouts

Page structure & common elements

Master templates

Helpers

View-specific utility functions

Clean separation of concerns

πŸ’‘ Smart Content Generation:

  • Views are placed in the correct directory structure

  • Layouts include proper view rendering calls

  • Helper files provide utility functions for complex views

  • All generated code follows your project's language (BoxLang/CFML)

🎨 Design Tip: Use layouts for common page structure (header, navigation, footer) and views for specific page content!

πŸ”§ Resources & CRUD - Complete Feature Development

Generate complete, production-ready resourceful components with full CRUD operations:

🎁 What Gets Generated:

Component
Purpose
Files Created

🎯 Handler

CRUD actions (index, show, create, edit, delete)

handlers/Photos.cfc

πŸ“Š Model

Data model with validation

models/Photo.cfc

🎨 Views

Complete UI for all actions

views/photos/*.cfm

πŸ›£οΈ Routes

RESTful URL patterns

Added to config/Router.cfc

πŸ§ͺ Tests

Unit & integration tests (optional)

tests/specs/

πŸ—ƒοΈ Migration

Database table creation (optional)

resources/database/migrations/

πŸš€ Generated CRUD Actions:

⚑ Instant Productivity: Resources give you a complete feature with working CRUD operations in seconds!

πŸ“¦ Modules - Reusable Application Components

Create powerful, self-contained modules that can be shared across applications or published to ForgeBox:

🎁 Module Architecture:

Modules are mini-applications within your ColdBox app, complete with their own:

  • πŸ“ Directory Structure - Organized, self-contained file layout

  • βš™οΈ ModuleConfig - Independent configuration and settings

  • πŸ›£οΈ Routing - Module-specific URL patterns

  • πŸ“¦ Dependencies - Isolated dependency management

  • πŸ”§ Models & Handlers - Complete MVC architecture (optional)

  • 🎨 Views & Layouts - Independent UI components (optional)

  • πŸ€– AI Integration - Optional .agents/ directory with guidelines and skill templates for AI assistants (with --ai flag)

πŸš€ Modular Power: Modules enable microservice architecture, code reuse, and team collaboration on large applications!

πŸ€– AI-Ready Modules: The --ai flag creates a .agents/guidelines/ and .agents/skills/ directory structure inside your module with starter templates. This lets your module's consumers automatically receive relevant AI context when they run coldbox ai refresh. See the AI Integration section for details.

πŸ§ͺ Testing - Quality Assurance Made Easy

Generate comprehensive test suites to ensure your application works flawlessly:

🎁 Testing Types & Their Purpose:

Test Type
What It Tests
Best For

🎯 Unit

Individual methods & functions

Business logic, utilities

πŸ“‹ BDD

Behavior & requirements

User stories, acceptance criteria

🌐 Integration

Component interactions

Workflows, API endpoints

πŸ“Š Model

Data models & validation

Domain logic, persistence

πŸŽͺ Interceptor

AOP & cross-cutting concerns

Security, logging, caching

πŸ’‘ Testing Best Practices:

  • Fast Feedback - Unit tests run quickly for immediate validation

  • Behavior Focus - BDD tests document how features should work

  • Real Scenarios - Integration tests verify complete user workflows

  • Data Integrity - Model tests ensure business rules are enforced

πŸš€ Quality First: Well-tested applications deploy with confidence and maintain themselves over time!

πŸ—„οΈ ORM & Database

Work with ORM entities and database operations:

πŸ”— Interceptors

Create AOP interceptors:

πŸ”„ Development Workflow

Manage your development environment:

πŸŽ›οΈ Global Options - Command Superpowers

Enhance any CLI command with these powerful options for a customized experience:

🌟 Universal Command Options

Option
What It Does
Example Usage

--force ⚑

Overwrite existing files without prompting

coldbox create handler Users --force

--open πŸ“‚

Auto-open generated files in your editor

coldbox create model User --open

--help ❓

Show detailed command help

coldbox create app --help

πŸ—οΈ Application Creation Flags

Feature Flag
Adds To Your App
Perfect For

--migrations πŸ—ƒοΈ

Database migration system

Data-driven applications

--docker 🐳

Complete containerization

Cloud deployments, consistency

--vite ⚑

Modern frontend asset pipeline

Interactive UIs, SPAs

--rest 🌐

REST API configuration

Microservices, API development

--ai πŸ€–

AI integration (guidelines, skills, agents)

AI-assisted development

--wizard πŸ§™

Alias to launch the interactive creation wizard

Beginners, exploring options

πŸ”₯ Language Control

The CLI automatically detects your project language but you can override when needed:

Setting
Behavior
When To Use

Default 🎯

BoxLang for new apps, auto-detect for existing

Most scenarios

--boxlang πŸ₯Š

Force BoxLang generation

Override detection

--cfml πŸ“œ

Force CFML generation

Legacy projects, specific requirements

πŸŽͺ Power Combinations:

πŸ’‘ BoxLang Support

The CLI automatically detects BoxLang projects and generates appropriate code. You can also force BoxLang mode using the --boxlang flag.

πŸ” Automatic Detection

The CLI detects BoxLang projects using three methods (in order of precedence):

  1. Server Engine Detection: Running on a BoxLang server

  2. TestBox Runner Setting: When testbox.runner is set to "boxlang" in box.json

  3. Language Property: When language is set to "boxlang" in box.json

βš™οΈ Configuration Examples

Method 1: Language Property (Recommended)

Method 2: TestBox Runner Setting

πŸš€ Usage Examples

πŸ“ Generated Code Differences

When BoxLang mode is detected or forced:

  • Uses .bx file extensions instead of .cfc

  • Generates class syntax instead of component

  • Uses BoxLang-specific template variants

  • Creates BoxLang test files (.bxm extensions)

πŸ—οΈ Automatic App Layout Detection

New in v8.10.0: The CLI now automatically detects your project's directory layout and places generated files in the correct location without any manual configuration.

How Detection Works

The CLI checks for two directories in your project root:

Condition
Detected Layout
File Placement

Both app/ and public/ exist

Modern Layout

Files go into app/handlers/, app/models/, app/views/, etc.

One or neither exists

Flat Layout

Files go into handlers/, models/, views/, etc.

In Practice

This applies to all scaffolding commands:

Command
Modern Layout Path
Flat Layout Path

coldbox create handler

app/handlers/

handlers/

coldbox create model

app/models/

models/

coldbox create view

app/views/

views/

πŸ’‘ Zero Configuration: There are no flags to set and no configuration required. The CLI detects your layout on every command invocation by checking for the presence of app/ and public/ directories in your current working directory.

πŸ€– AI Integration

ColdBox CLI includes a comprehensive AI integration system that gives AI coding assistants - Claude, GitHub Copilot, Cursor, Codex, Gemini, and OpenCode - deep knowledge of your ColdBox project, its installed modules, and the entire BoxLang/CFML ecosystem.

πŸ“š Deep Dive: For full documentation including module authoring, custom skills, override system, and team collaboration workflows, see the Agentic ColdBoxarrow-up-right guide.

🧠 Four Core Components

Component
What It Is
Count

πŸ“š Guidelines

Core framework documentation (ColdBox, BoxLang, CFML) + module-provided

3 core built-in

🎯 Skills

On-demand coding cookbooks from registry

200+ available via registry

πŸ€– Agents

Configuration files for AI assistants

6 supported agents

🌐 MCP Servers

Model Context Protocol documentation servers

Auto-detected from installed modules

All four components live in a .agents/ directory at your project root.

⚑ Quick Setup

The installation wizard prompts you to:

  1. Choose which AI agents you use (Claude, Copilot, Cursor, etc.)

  2. Select your project language (BoxLang, CFML, or Hybrid)

  3. Configure guidelines, skills, and MCP servers

After installation, the .agents/ directory is created:

Agent configuration files are generated at your project root:

Agent
Config File
Notes

Claude

CLAUDE.md

References @AGENTS.md for shared content

GitHub Copilot

AGENTS.md (shared)

Also used by Codex and OpenCode

Cursor

.cursorrules

Recognized automatically by Cursor IDE

Codex

AGENTS.md (shared)

Gemini

GEMINI.md

Gemini CLI integration

OpenCode

AGENTS.md (shared)

πŸ”§ Core Commands

πŸ“š Managing Guidelines

Guidelines teach AI agents about framework conventions and architectural patterns. ColdBox CLI ships with 3 core guidelines (boxlang.md, cfml.md, coldbox.md) which are stored on-disk in .agents/guidelines/core/. Additional guidelines are auto-discovered from installed modules via the registry.

Core Guidelines (3):

The CLI ships with these 3 core guidelines stored in .agents/guidelines/core/:

  • boxlang - BoxLang language syntax and features

  • cfml - CFML language fundamentals

  • coldbox - ColdBox framework architecture and conventions

Additional module-provided guidelines are auto-discovered when you install modules that include AI guidelines.

🎯 Managing Skills (200+)

Skills are on-demand coding cookbooks - step-by-step guides for specific tasks sourced from skills.boxlang.ioarrow-up-right. They use an inventory system so agents can request them when needed without bloating the base context.

Available Skills (200+ in registry):

Skills are available from skills.boxlang.ioarrow-up-right and cover topics like:

  • BoxLang Development - Language syntax, classes, functions, streams, futures, etc.

  • ColdBox Development - Handler creation, REST APIs, routing, event models, modules, etc.

  • Testing - BDD testing, unit tests, integration tests, mocking, fixtures, etc.

  • Security - Authentication, authorization, JWT, passkeys, CSRF protection, etc.

  • ORM & Database - cborm, query builders, database migrations, transactions, etc.

  • Modern Development - CBWire, real-time features, performance optimization, etc.

Use coldbox ai skills install --list to browse and install skills from the registry.

πŸ€– Managing Agents

πŸ’‘ Multi-Agent Teams: You can configure multiple agents simultaneously. Each developer uses their preferred tool while all agents follow the same guidelines and skills for consistent code quality.

🌐 MCP Servers (30+)

MCP (Model Context Protocol) servers give AI agents live access to your application, documentation servers, databases, cloud services, and more.

cbMCP - Live App Introspection:

Built-in MCP Server Categories:

Category
Examples

ColdBox Core (7)

boxlang, coldbox, commandbox, testbox, wirebox, cachebox, logbox

Database (5)

postgres, mysql, sqlite, mssql, mongodb

Dev Tools (10)

filesystem, github, gitlab, git, brave-search, fetch, memory, sequential-thinking

Cloud & Infra (7)

aws, cloudflare, google-drive, google-maps, kubernetes, docker

Productivity (8)

puppeteer, playwright, sentry, linear, slack, time

πŸ”„ Auto-Detection: When you run coldbox ai refresh, MCP servers for your installed modules are automatically detected and registered in .mcp.json at your project root.

πŸ“Š Diagnostics and Analytics

πŸ”„ Staying in Sync

After installing or updating CommandBox modules, run refresh to automatically:

  • Discover and install new module guidelines and skills

  • Auto-recover any missing core skills (boxlang, coldbox, testbox, commandbox)

  • Detect and register MCP documentation servers from newly installed modules

  • Regenerate agent configuration files

Automate this with CommandBox scripts in box.json:

🧩 Module Authors: Bundle AI Resources

When creating a module with --ai, a starter .agents/ structure is scaffolded:

When users install your module and run coldbox ai refresh, your guidelines and skills are automatically discovered and added to their AI context.

πŸ“– Getting Help - Never Get Stuck

The ColdBox CLI has your back with comprehensive help at every level:

🎯 Quick Help Commands

πŸ†˜ When You Need Help

Situation
Command
What You Get

πŸ€” What can I do?

coldbox help

Full command list

πŸ“‹ How do I use this command?

coldbox create app --help

Detailed usage & examples

πŸ› Something's not working

coldbox --version

Version info for troubleshooting

πŸ“š I want to learn more

Source code & documentation

πŸ’‘ Pro Help Tips

  • Every command has --help - never hesitate to use it!

  • Help shows examples, options, and flags for each command

  • When reporting issues, always include your CLI version

  • The GitHub repository has extensive documentation and examples

πŸŽ“ Learning Path: Start with coldbox create app-wizard to explore all options interactively, then use specific commands as you become more comfortable!

Last updated

Was this helpful?