Skip to content

Commit 43eb6c6

Browse files
committed
readme finalized
1 parent a39bbe7 commit 43eb6c6

File tree

1 file changed

+186
-26
lines changed

1 file changed

+186
-26
lines changed

README.md

Lines changed: 186 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@ Apache License, Version 2.0.
3232

3333
## ColdBox CLI Versions
3434

35-
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.
3641

3742
## System Requirements
3843

@@ -52,38 +57,159 @@ The ColdBox CLI provides powerful scaffolding and development tools for both **C
5257

5358
### 📱 Application Creation
5459

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:
5661

5762
```bash
58-
# Create a basic ColdBox app
63+
# Create a basic ColdBox app (BoxLang by default)
5964
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
6069

6170
# Create with specific templates
6271
coldbox create app myApp skeleton=modern
63-
coldbox create app myApp skeleton=boxlang
6472
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
77+
coldbox create app myApp --docker # Docker environment setup
78+
coldbox create app myApp --vite # Vite frontend asset building
79+
coldbox create app myApp --rest # REST API configuration
80+
81+
# Combine multiple features
82+
coldbox create app myApp --migrations --docker --vite
83+
84+
# Interactive app wizard (recommended for beginners)
85+
coldbox create app-wizard
86+
```
6687

67-
# Create with migrations support
68-
coldbox create app myApp --migrations
88+
#### 🧙‍♂️ Interactive App Wizard
6989

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
7193
coldbox create app-wizard
7294
```
7395

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
102+
5. **Environment**: Optional Docker containerization
103+
6. **Database**: Optional migrations support
104+
105+
**Example Wizard Flow**:
106+
107+
```
108+
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+
74116
### Application Templates
75117

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:
77119

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)
80121

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
82125

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:
179+
180+
```bash
181+
# Create app with Docker support
182+
coldbox create app myApp --docker
183+
184+
# Combine with other features
185+
coldbox create app myApp --docker --vite --migrations
186+
```
187+
188+
**Docker Features Included**:
189+
190+
- 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+
```
87213

88214
### 🎯 Handlers (Controllers)
89215

@@ -263,17 +389,27 @@ Most commands support these common options:
263389

264390
- `--force` - Overwrite existing files without prompting
265391
- `--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)
268394
- `--help` - Show detailed help for any command
269395

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+
270405
#### Language Generation Control
271406

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:
273408

274-
- **Automatic**: Uses detection methods (server engine, `box.json` settings)
275-
- **Force BoxLang**: Use `--boxlang` flag to generate BoxLang code regardless of detection
276-
- **Force CFML**: Use `--!boxlang` flag to generate CFML code regardless of detection
409+
- **Default**: BoxLang code generation for new applications and components
410+
- **Automatic**: Uses detection methods (server engine, `box.json` settings) for existing projects
411+
- **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)
277413

278414
### 💡 BoxLang Support
279415

@@ -315,14 +451,16 @@ The CLI detects BoxLang projects using three methods (in order of precedence):
315451
#### 🚀 Usage Examples
316452

317453
```bash
318-
# Automatic detection (uses box.json settings)
454+
# Default behavior (creates BoxLang code)
319455
coldbox create handler users
456+
coldbox create model User
320457

321-
# Force BoxLang generation (overrides detection)
458+
# Explicit BoxLang generation (usually not needed)
322459
coldbox create handler users --boxlang
323460

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
326464
```
327465

328466
#### 📝 Generated Code Differences
@@ -334,6 +472,28 @@ When BoxLang mode is detected or forced:
334472
- Uses BoxLang-specific template variants
335473
- Creates BoxLang test files (`.bxm` extensions)
336474

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.
496+
337497
### 📖 Getting Help
338498

339499
Every command provides detailed help:

0 commit comments

Comments
 (0)