| name | commandbox-boxlang |
|---|---|
| description | Use this skill when configuring CommandBox to run BoxLang server instances, using the BoxLang REPL, running BoxLang task runners, and managing BoxLang modules via CommandBox. Covers server.json BoxLang configuration, CLI commands, module installation, and the BoxLang-specific CommandBox workflow. |
| applyTo | **/*.{bx,cfc,cfm,bxm,json} |
Load this skill when:
- Starting a BoxLang server with CommandBox
- Configuring
server.jsonfor BoxLang engine settings - Using the BoxLang REPL for interactive development
- Running BoxLang task runners or scripts from the CLI
- Installing BoxLang modules via CommandBox
box install commandbox-boxlang# Start with BoxLang engine
box server start cfengine=boxlang
# Or configure via server.json (recommended)
box server start{
"name": "myapp",
"cfengine": "boxlang",
"port": 8080,
"webroot": ".",
"boxlang": {
"version": "1.0.0",
"debug": false,
"modules": [
"bx-compat-cfml",
"bx-web-support"
],
"jvmArgs": "-Xmx512m -Xms256m",
"configFile": "boxlang.json"
},
"web": {
"rewrites": {
"enable": true,
"config": "urlrewrite.xml"
}
}
}{
"debugMode": false,
"defaultTimezone": "UTC",
"defaultLocale": "en_US",
"modules": {
"bx-compat-cfml": {},
"bx-web-support": {}
},
"executors": {
"defaultTimeout": 30
}
}# Start interactive REPL
box boxlang repl
# Run a single expression
box boxlang execute "now()"
# Run a .bx file
box boxlang run path/to/script.bx
# Run with variables
box boxlang run script.bx --arg1=value1# Install a BoxLang module
box install bx-compat-cfml
box install bx-orm
box install bx-async
# List installed BoxLang modules
box list --boxlang
# Update all BoxLang modules
box update --boxlang// tasks/BuildTask.bx
class {
function run( args = {} ) {
print.line( "Building application..." )
// Compile / minify / etc.
command( "npm run build" ).run()
print.greenLine( "Build complete!" )
}
function test( args = {} ) {
command( "box testbox run" ).run()
}
}# Run a BoxLang task
box boxlang task BuildTask run
box boxlang task BuildTask test# Check BoxLang version
box boxlang version
# Clear BoxLang module cache
box boxlang modulecache clear
# Compile a .bx file to bytecode
box boxlang compile path/to/file.bx
# Run tests with BoxLang engine
box testbox run runner=http://localhost:8080/tests/runner.cfm- Use
server.jsonfor all server configuration — avoids repeated CLI arguments - Pin BoxLang version in
server.json— prevents unexpected upgrades breaking the app - Install
bx-compat-cfmlwhen migrating CFML code — enables legacy function/tag compatibility - Set JVM args in
server.jsonappropriate for the workload — avoid default heap limits in production - Use the REPL for quick prototyping and debugging BoxLang expressions
- Configure
debugMode: falseinboxlang.jsonfor production — avoids detailed error output
- commandbox-boxlang: https://github.com/Ortus-Solutions/commandbox-boxlang
- BoxLang docs: https://boxlang.ortusbooks.com
- CommandBox docs: https://commandbox.ortusbooks.com