A modern, feature-rich command line interface for Lucee CFML that brings the power of CFML to your terminal. LuCLI integrates the Lucee CFML engine with advanced features like server management, JMX monitoring, module management, and intelligent output processing.
- CFML Script Execution: Run .cfs, .cfm, and .cfc files with full Lucee support
- Server Management: Start, stop, monitor, and manage Lucee server instances
- Module System: Create and manage reusable CFML modules
# Download the latest JAR release
wget https://github.com/cybersonic/LuCLI/releases/latest/download/lucli.jar
# Start using LuCLI
java -jar lucli.jar
# Execute CFML scripts directly
java -jar lucli.jar myscript.cfs arg1 arg2Visit the Releases Page to download:
- lucli.jar - Universal JAR file (requires Java 17+)
- lucli - Self-executing binary for Linux/macOS
- lucli.bat - Windows batch file
- install.sh - Automated installation script
# Build self-executing binary
mvn clean package -Pbinary
# Use directly without Java command
./target/lucli --version
./target/luclidocker run markdrew/lucli:latest --version# Start interactive CFML session
java -jar lucli.jar
# Execute CFML expressions directly
lucli> cfml now()
2025-01-04T13:22:25.123Z
lucli> cfml dateFormat(now(), 'yyyy-mm-dd')
2025-01-04
# Navigate and work with files
lucli> ls -la
lucli> cd myproject
lucli> pwd# Start Lucee server for current directory
lucli server start
# Start with specific version and port
lucli server start --version 6.2.2.91 --port 8080
# Start with custom name and force replacement
lucli server start --name myapp --port 8888 --force
# Monitor server with real-time JMX dashboard
lucli server monitor
# View server logs
lucli server log --follow# Get general help
lucli --help
# Get help for specific commands
lucli server --help
lucli server start --help
lucli modules --help
# Get help for CFML commands
lucli cfml --helpFramework-Style URL Routing:
LuCLI servers include built-in support for framework-style URL routing (extension-less URLs). Enable it in your lucee.json:
{
"urlRewrite": {
"enabled": true,
"routerFile": "index.cfm"
}
}This routes all requests through your router file (default: index.cfm) with PATH_INFO set correctly:
/helloโ/index.cfm/hello(PATH_INFO =/hello)/api/users/123โ/index.cfm/api/users/123(PATH_INFO =/api/users/123)
Compatible with ColdBox, FW/1, CFWheels, ContentBox, and custom frameworks.
๐ Complete URL Rewriting Guide โ
LuCLI features a comprehensive, hierarchical help system built on Picocli that provides context-sensitive assistance at every level:
# Any command supports --help
lucli --help # Root application help
lucli server --help # Server command overview
lucli server start --help # Specific subcommand help
lucli modules run --help # Module execution help
lucli cfml --help # CFML expression help- Hierarchical Structure: From general overview to specific command details
- Consistent Interface:
--helpworks on every command and subcommand - Rich Examples: Practical usage examples in every help screen
- Error Guidance: Smart error messages with helpful suggestions
- Interactive Discovery: Built-in
helpcommand and tab completion for easy exploration
๐ Complete Help System Guide โ
# List available modules
lucli modules list
# Create new module
lucli modules init my-awesome-module
# Run a module
lucli my-module arg1 arg2# Execute CFML scripts
lucli script.cfs
lucli component.cfc
lucli template.cfm
# With arguments
lucli script.cfs --verbose --output=/tmp/results.jsonLuCLI features an advanced output processing system with intelligent emoji handling and placeholder substitution:
- Automatic Detection: Detects terminal emoji capabilities
- Graceful Fallback: Text symbols on unsupported terminals
- Windows Optimized: Special handling for Windows Terminal, VS Code, ConEmu, etc.
# On emoji-capable terminals
โ
Server started successfully on port 8080
# On legacy terminals
[OK] Server started successfully on port 8080LuCLI includes an intelligent placeholder system that enhances internal messages and error handling:
Available Placeholders:
- Time Variables:
${NOW},${DATE},${TIME},${TIMESTAMP} - System Info:
${USER_NAME},${WORKING_DIR},${USER_HOME},${OS_NAME},${JAVA_VERSION} - LuCLI Info:
${LUCLI_VERSION},${LUCLI_HOME} - Environment:
${ENV_PATH},${ENV_USERNAME}, etc. - Smart Emojis:
${EMOJI_SUCCESS},${EMOJI_ERROR},${EMOJI_WARNING},${EMOJI_INFO}
Note: These placeholders work in LuCLI's internal templates and error messages, not in user CFML script output.
LuCLI stores configuration in ~/.lucli/:
~/.lucli/
โโโ settings.json # User preferences
โโโ history # Command history
โโโ prompts/ # Custom prompt templates
โโโ modules/ # User modules
โโโ servers/ # Server instances
โโโ express/ # Lucee Express downloads
{
"name": "my-project",
"version": "7.0.0.123",
"port": 8080,
"webroot": "./",
"urlRewrite": {
"enabled": true,
"routerFile": "index.cfm"
},
"monitoring": {
"enabled": true,
"jmx": { "port": 8999 }
},
"jvm": {
"maxMemory": "1024m",
"minMemory": "256m"
},
"agents": {
"luceedebug": {
"enabled": false,
"jvmArgs": [
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=localhost:9999",
"-javaagent:${LUCLI_HOME}/dependencies/luceedebug.jar=jdwpHost=localhost,jdwpPort=9999,debugHost=0.0.0.0,debugPort=10000,jarPath=${LUCLI_HOME}/dependencies/luceedebug.jar"
],
"description": "Lucee step debugger agent"
}
}
}URL Rewrite Configuration:
enabled(boolean, default:true) - Enable/disable framework-style URL routingrouterFile(string, default:"index.cfm") - Central router file for handling all routes
Agent Configuration:
agents(object, optional) - Named Java agents withenabledandjvmArgsfields.- See
documentation/SERVER_AGENTS.mdfor detailed examples and startup flags.
CFConfig Integration:
configurationFile(string, optional) - Path (relative to the project directory or absolute) to a base CFConfig JSON file. This is loaded first as the foundation for your server's Lucee configuration.configuration(object, optional) - Inline.CFConfig.jsoncontent that overrides/extends the base fromconfigurationFile. The merged result is written tolucee-server/context/.CFConfig.jsononlucli server start. Allows per-project customization of shared base configurations.
# View available prompts
prompt
# Switch prompt style
prompt zsh
prompt colorful
prompt minimal
# Manage emoji settings
prompt emoji on
prompt emoji test
prompt terminal # Show terminal capabilities- StringOutput: Centralized output post-processor with emoji and placeholder support
- LuceeScriptEngine: Lucee CFML engine integration with externalized script templates
- WindowsSupport: Smart terminal detection and emoji capability analysis
- UnifiedCommandExecutor: Consistent command handling across all execution modes
LuCLI uses externalized CFML templates for better maintainability:
src/main/resources/script_engine/
โโโ cfmlOutput.cfs # Expression evaluation
โโโ componentWrapper.cfs # Component execution
โโโ moduleDirectExecution.cfs # Module processing
โโโ componentToScript.cfs # Component conversion
โโโ lucliMappings.cfs # Component mappings
LuCLI's internal script templates use placeholder substitution for consistent error handling and messaging:
// Internal template content (cfmlOutput.cfs)
writeOutput('${EMOJI_ERROR} CFML Error: ' & e.message);
// Processed for emoji-capable terminal
writeOutput('โ CFML Error: ' & e.message);
// Processed for legacy terminal
writeOutput('[ERROR] CFML Error: ' & e.message);| Command | Description | Example |
|---------|-------------|---------||
| --version | Show version information | lucli --version |
| --lucee-version | Show Lucee engine version | lucli --lucee-version |
| --help | Show help information | lucli --help |
| help | Show help for specific commands | lucli help server |
| Command | Description | Example |
|---|---|---|
cfml |
Execute CFML expressions | lucli cfml 'now()' |
script.cfs |
Execute CFML script file | lucli script.cfs arg1 arg2 |
| Command | Description | Example |
|---|---|---|
server start |
Start Lucee server | lucli server start --version 6.2.2.91 --port 8080 |
server stop |
Stop server | lucli server stop --name myapp |
server status |
Check server status | lucli server status |
server list |
List all servers | lucli server list |
server monitor |
JMX monitoring dashboard | lucli server monitor |
server log |
View server logs | lucli server log --follow |
| Command | Description | Example |
|---|---|---|
modules list |
List available modules | lucli modules list |
modules init |
Create new module | lucli modules init my-module |
modules run |
Execute module | lucli modules run my-module arg1 |
<module-name> |
Direct module execution | lucli my-module arg1 arg2 |
| Command | Description | Example |
|---|---|---|
cfml <expr> |
Execute CFML expression | cfml now() |
prompt |
Manage prompt styles | prompt colorful |
ls, cd, pwd |
File system operations | cd /path/to/project |
exit, quit |
Exit terminal | exit |
- Java 17+ (JDK required for building)
- Maven 3.x
- Git
# Clone repository
git clone https://github.com/your-org/lucli.git
cd lucli
# Build JAR
mvn clean package
# Build self-executing binary
mvn clean package -Pbinary
# Run tests
./tests/test.sh
# Quick development cycle
./dev-lucli.shlucli/
โโโ src/main/java/org/lucee/lucli/ # Core Java classes
โโโ src/main/resources/
โ โโโ script_engine/ # Externalized CFML templates
โ โโโ prompts/ # Built-in prompt themes
โ โโโ tomcat_template/ # Server configuration templates
โโโ tests/ # Test suites and examples
โโโ demo_servers/ # Development test servers
โโโ documentation/ # Additional documentation
- Lucee 7.0.0.346-RC: CFML engine
- JLine 3.26.3: Terminal interface and command-line handling
- Jackson 2.15.2: JSON configuration parsing
- Picocli 4.7.5: Command-line parsing and help system
- WARP.md - Developer guide and architecture overview
- Help System Guide - Complete help system documentation
- URL Rewriting Guide - Framework routing and URL rewriting
- SHORTCUTS.md - Quick reference for shortcuts and commands
- TODO.md - Current development roadmap and tasks
# Comprehensive test suite (52 tests)
./tests/test.sh
# Server and CFML integration tests
./tests/test-server-cfml.sh
# URL rewrite integration tests
./tests/test-urlrewrite-integration.sh
# Build and run binary test
./dev-lucli.sh- โ Basic functionality (help, version commands)
- โ Comprehensive help system (all commands and subcommands)
- โ CFML script execution (.cfs, .cfm, .cfc)
- โ Server management (start, stop, status, monitor) with --port option
- โ File system operations and navigation
- โ Module system (create, list, execute)
- โ Command consistency across all execution modes
- โ Binary executable functionality
- โ Configuration handling and persistence
- โ URL rewrite and framework routing
- โ Error scenarios and edge cases
Real-time server monitoring with ASCII dashboard:
lucli server monitor- Memory usage (heap/non-heap) with progress bars
- Thread counts and garbage collection statistics
- System load and CPU metrics
- Lucee-specific performance data
Create reusable CFML components:
# Create module
lucli modules init data-processor
# Edit module (creates Module.cfc)
# Execute module
lucli data-processor --input=data.json --format=xmlJSON-based prompt system with 14+ built-in themes:
{
"name": "my-custom",
"description": "My custom prompt",
"template": "๐ฅ [{time}] {path} {git}โก ",
"showPath": true,
"showTime": true,
"showGit": true,
"useEmoji": true
}- Color placeholder support (
${COLOR_RED},${COLOR_RESET}) - Template caching for improved performance
- Plugin system for third-party extensions
- Git integration in prompts (show branch, status)
- Enhanced module package management
- Package repository for community modules
- Web-based monitoring dashboard
- Docker integration for containerized Lucee instances
- Cloud deployment integrations (AWS, Azure, GCP)
- IDE integrations (VS Code extension)
We welcome contributions! Please see:
- CONTRIBUTING.md - Contribution guidelines
- RELEASE_PROCESS.md - Release and versioning process
- WARP.md - Development setup and architecture
# Format consistent with project
lucli <action> <subcommand> [options] [parameters]
# Examples
lucli server start --version 7.0.0.123
lucli modules init my-module
lucli server log --type server --followThis project is licensed under the MIT License - see the LICENSE file for details.
- Lucee Association: For the powerful CFML engine
- JLine Project: For excellent terminal interface capabilities
- Community Contributors: For feedback, testing, and improvements
# Download and try it now
wget https://github.com/your-org/lucli/releases/latest/download/lucli.jar
java -jar lucli.jar --version
# Start your first CFML session
java -jar lucli.jar
lucli> cfml "Hello, World!"LuCLI - Making CFML development faster, easier, and more enjoyable from the command line.
For detailed documentation and examples, explore the documentation/ directory or visit our GitHub repository.