You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CLI also matches the major version of ColdBox. If you are using ColdBox 7, then you should use CLI `@7`. This is to ensure that you are using the correct commands for your version of ColdBox.
35
+
The CLI matches the major version of ColdBox. **Current version: 7.10.0**
36
+
37
+
- If you are using **ColdBox 7**, use CLI `@7` (recommended)
38
+
- If you are using **ColdBox 6**, use CLI `@6` (legacy support)
39
+
40
+
This versioning ensures you get the correct commands and features for your version of ColdBox.
36
41
37
42
## System Requirements
38
43
@@ -52,38 +57,159 @@ The ColdBox CLI provides powerful scaffolding and development tools for both **C
52
57
53
58
### 📱 Application Creation
54
59
55
-
Create new ColdBox applications from various templates:
60
+
Create new ColdBox applications from various templates. **BoxLang is now the default language** for new applications:
56
61
57
62
```bash
58
-
# Create a basic ColdBox app
63
+
# Create a basic ColdBox app (BoxLang by default)
59
64
coldbox create app myApp
65
+
coldbox create app myApp --boxlang # Force BoxLang (default)
66
+
67
+
# Create a CFML app explicitly
68
+
coldbox create app myApp --cfml
60
69
61
70
# Create with specific templates
62
71
coldbox create app myApp skeleton=modern
63
-
coldbox create app myApp skeleton=boxlang
64
72
coldbox create app myApp skeleton=rest
65
-
coldbox create app myApp skeleton=elixir
73
+
coldbox create app myApp skeleton=flat
74
+
75
+
# Create with additional features
76
+
coldbox create app myApp --migrations # Database migrations support
# Interactive app wizard (recommended for beginners)
85
+
coldbox create app-wizard
86
+
```
66
87
67
-
# Create with migrations support
68
-
coldbox create app myApp --migrations
88
+
#### 🧙♂️ Interactive App Wizard
69
89
70
-
# Interactive app wizard
90
+
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:
91
+
92
+
```bash
71
93
coldbox create app-wizard
72
94
```
73
95
96
+
The wizard will guide you through:
97
+
98
+
1.**Project Location**: Whether to create in current directory or a new folder
99
+
2.**Language Selection**: Choose between BoxLang (default) or CFML
100
+
3.**Project Type**: API/REST service or full web application
101
+
4.**Frontend Setup**: Optional Vite integration for web applications
Are you currently inside the "myapp" folder? [y/n]: n
109
+
Is this a BoxLang project? [y/n]: y
110
+
Are you creating an API? [y/n]: n
111
+
Would you like to configure Vite as your Front End UI pipeline? [y/n]: y
112
+
Would you like to setup a Docker environment? [y/n]: y
113
+
Are you going to require Database Migrations? [y/n]: y
114
+
```
115
+
74
116
### Application Templates
75
117
76
-
The CLI supports multiple application templates (skeletons), or you can use your own via any FORGEBOX ID, GitHub repo, local path, zip or URL. The default templates for modern development are:
118
+
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:
77
119
78
-
-`boxlang` - A ColdBox app using BoxLang as the primary language.
79
-
-`modern` - A modern ColdBox app with the latest features and best practices for both BoxLang or Adobe ColdFusion
120
+
#### 🥊 BoxLang Templates (Recommended)
80
121
81
-
The older and flat style templates are:
122
+
-`boxlang` (default) - A modern ColdBox app using BoxLang as the primary language with latest features
123
+
-`modern` - A modern ColdBox app supporting both BoxLang and CFML with contemporary architecture
124
+
-`rest` - A ColdBox REST API template optimized for BoxLang development
82
125
83
-
-`flat` - A classic ColdBox app with a flat structure.
84
-
-`rest` - A ColdBox app pre-configured for RESTful APIs.
85
-
-`rest-hmvc` - A RESTful ColdBox app using HMVC architecture.
86
-
-`vite` - A ColdBox app integrated with Vite for frontend development.
126
+
#### 📜 Legacy CFML Templates
127
+
128
+
-`flat` - A classic ColdBox app with a flat structure for traditional CFML development
129
+
-`rest-hmvc` - A RESTful ColdBox app using HMVC architecture
130
+
-`supersimple` - A bare-bones template for minimal setups
131
+
-`vite` - A ColdBox app integrated with Vite for frontend development (legacy)
132
+
133
+
#### 🚀 Template Features
134
+
135
+
Modern templates (`boxlang`, `modern`) support additional features via flags:
136
+
137
+
-`--vite` - Integrates Vite for modern frontend asset building and hot reloading
138
+
-`--rest` - Configures the application as a REST API service
139
+
-`--docker` - Includes Docker configuration for containerized development
140
+
-`--migrations` - Sets up database migrations support
141
+
142
+
#### ⚡ Vite Integration
143
+
144
+
The CLI now supports Vite integration for modern frontend development with hot module replacement and optimized builds:
145
+
146
+
```bash
147
+
# Create app with Vite support
148
+
coldbox create app myApp --vite
149
+
150
+
# Available for BoxLang and Modern templates
151
+
coldbox create app myApp skeleton=modern --vite
152
+
```
153
+
154
+
**Vite Features Included**:
155
+
156
+
- Pre-configured `vite.config.mjs` with ColdBox/BoxLang integration
157
+
- Hot module replacement (HMR) for development
158
+
- Optimized production builds with code splitting
159
+
- Asset preprocessing for CSS, SCSS, JavaScript, and TypeScript
160
+
- Development server with proxy configuration
161
+
- Build scripts in `package.json`
162
+
163
+
**Development Workflow**:
164
+
165
+
```bash
166
+
# Start development server with hot reloading
167
+
npm run dev
168
+
169
+
# Build for production
170
+
npm run build
171
+
172
+
# Preview production build
173
+
npm run preview
174
+
```
175
+
176
+
#### 🐳 Docker Integration
177
+
178
+
The CLI provides Docker integration to containerize your ColdBox applications for consistent development and deployment environments:
- Multi-stage `Dockerfile` optimized for ColdBox applications
191
+
-`docker-compose.yml` for local development with services
192
+
- Database service configuration (PostgreSQL/MySQL)
193
+
- Redis caching service setup
194
+
- Environment variable configuration
195
+
- Production-ready container optimization
196
+
- Health checks and monitoring setup
197
+
198
+
**Docker Commands**:
199
+
200
+
```bash
201
+
# Build and start development environment
202
+
docker-compose up -d
203
+
204
+
# View logs
205
+
docker-compose logs -f
206
+
207
+
# Stop services
208
+
docker-compose down
209
+
210
+
# Rebuild containers
211
+
docker-compose up --build
212
+
```
87
213
88
214
### 🎯 Handlers (Controllers)
89
215
@@ -263,17 +389,27 @@ Most commands support these common options:
263
389
264
390
-`--force` - Overwrite existing files without prompting
265
391
-`--open` - Open generated files in your default editor
266
-
-`--boxlang` - Force BoxLang code generation (overrides auto-detection)
267
-
-`--!boxlang` - Force CFML code generation (overrides auto-detection)
392
+
-`--boxlang` - Force BoxLang code generation (usually not needed as it's the default)
393
+
-`--cfml` - Force CFML code generation (overrides BoxLang default)
268
394
-`--help` - Show detailed help for any command
269
395
396
+
#### Application-Specific Flags
397
+
398
+
For application creation commands:
399
+
400
+
-`--migrations` - Include database migrations support
401
+
-`--docker` - Include Docker configuration and containerization
402
+
-`--vite` - Include Vite frontend asset building (modern/BoxLang templates)
403
+
-`--rest` - Configure as REST API application (BoxLang templates)
404
+
270
405
#### Language Generation Control
271
406
272
-
The CLI supports both automatic detection and manual override of the target language:
407
+
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:
-**Force CFML**: Use `--cfml` flag to generate CFML code regardless of detection
412
+
-**Force BoxLang**: Use `--boxlang` flag to explicitly generate BoxLang code (usually not needed as it's the default)
277
413
278
414
### 💡 BoxLang Support
279
415
@@ -315,14 +451,16 @@ The CLI detects BoxLang projects using three methods (in order of precedence):
315
451
#### 🚀 Usage Examples
316
452
317
453
```bash
318
-
#Automatic detection (uses box.json settings)
454
+
#Default behavior (creates BoxLang code)
319
455
coldbox create handler users
456
+
coldbox create model User
320
457
321
-
#Force BoxLang generation (overrides detection)
458
+
#Explicit BoxLang generation (usually not needed)
322
459
coldbox create handler users --boxlang
323
460
324
-
# Force CFML generation (overrides detection)
325
-
coldbox create handler users --!boxlang
461
+
# Force CFML generation for legacy projects
462
+
coldbox create handler users --cfml
463
+
coldbox create app myApp --cfml
326
464
```
327
465
328
466
#### 📝 Generated Code Differences
@@ -334,6 +472,28 @@ When BoxLang mode is detected or forced:
334
472
- Uses BoxLang-specific template variants
335
473
- Creates BoxLang test files (`.bxm` extensions)
336
474
475
+
### 🤖 AI Coding Assistance
476
+
477
+
The CLI now includes **Copilot instructions** to enhance AI-powered development workflows. These instructions help AI assistants understand ColdBox project structure and generate appropriate code:
478
+
479
+
#### Features
480
+
481
+
-**Intelligent Code Generation**: AI assistants can better understand ColdBox conventions and patterns
482
+
-**Template-Aware Suggestions**: Context-aware code suggestions based on your project type
483
+
-**BoxLang & CFML Support**: Appropriate suggestions for both language targets
484
+
-**Framework Integration**: Deep understanding of ColdBox architecture and best practices
485
+
486
+
#### Copilot Instructions
487
+
488
+
The CLI includes specialized instruction sets:
489
+
490
+
-**Modern Apps**: Instructions optimized for contemporary ColdBox applications
491
+
-**Legacy Projects**: Support for traditional flat-structure applications
492
+
-**BoxLang Focus**: Enhanced support for BoxLang-specific patterns
493
+
-**Framework Patterns**: MVC, HMVC, and REST API architectural guidance
494
+
495
+
These instructions are automatically included in modern application templates to provide the best AI coding experience out of the box.
0 commit comments