โ ๏ธ This is an alpha release - Expect breaking changes and limitations. The API and features may change significantly before v1.0. We appreciate feedback and contributions!
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.
# Install latest (macOS/Linux)
curl -LsSf https://lucli.dev/install.sh | sh
# Install latest (Windows PowerShell)
powershell -ExecutionPolicy Bypass -NoProfile -Command "irm https://lucli.dev/install.ps1 | iex"
Pin a specific version:
LUCLI_VERSION=0.2.1 curl -LsSf https://lucli.dev/install.sh | sh
# 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 arg2
Or with Docker
# Start using LuCLI interactively
docker run --interactive markdrew/lucli:latest repl
Visit the Releases Pageโ to download:
Also available as a Docker imageโ
# Build self-executing binary
mvn clean package -Pbinary
# Use directly without Java command
./target/lucli --version
./target/lucli
docker 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 --help
Framework-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
--help works on every command and subcommandhelp command 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.json
LuCLI features an advanced output processing system with intelligent emoji handling and placeholder substitution:
# On emoji-capable terminals
โ
Server started successfully on port 8080
# On legacy terminals
[OK] Server started successfully on port 8080
LuCLI includes an intelligent placeholder system that enhances internal messages and error handling:
Available Placeholders:
${NOW}, ${DATE}, ${TIME}, ${TIMESTAMP}${USER_NAME}, ${WORKING_DIR}, ${USER_HOME}, ${OS_NAME}, ${JAVA_VERSION}${LUCLI_VERSION}, ${LUCLI_HOME}${ENV_PATH}, ${ENV_USERNAME}, etc.${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 routesAgent Configuration:
agents (object, optional) - Named Java agents with enabled and jvmArgs fields.documentation/SERVER_AGENTS.md for 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.json content that overrides/extends the base from configurationFile. The merged result is written to lucee-server/context/.CFConfig.json on lucli 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
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 |
# Clone repository
git clone https://github.com/cybersonic/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.sh
lucli/
โโโ src/main/java/org/lucee/lucli/ # Core Java classes
โโโ src/main/resources/
โ โโโ script_engine/ # Externalized CFML templates
โ โโโ prompts/ # Built-in prompt themes
โโโ tests/ # Test suites and examples
โโโ demo_servers/ # Development test servers
โโโ documentation/ # Additional documentation
# 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
Real-time server monitoring with ASCII dashboard:
lucli server monitor
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=xml
Run LuCLI as a long-lived daemon that accepts JSON commands over a local TCP socket.
# Start daemon on default port 10000 (blocks current terminal)
lucli daemon
# Start daemon on a custom port
lucli daemon --port 11000
Each client connection sends a single JSON line with the argv to execute:
{"id":"1","argv":["server","list"]}
The daemon executes the command through the normal Picocli pipeline and replies with JSON containing the exit code and combined stdout/stderr:
{"id":"1","exitCode":0,"output":"..."}
You can talk to the daemon from any language that can open a TCP socket to 127.0.0.1:<port> and read/write UTF-8 lines.
JSON-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_RED}, ${COLOR_RESET})We welcome contributions! Please see:
# 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 --follow
This project is licensed under the MIT License - see the LICENSEโ file for details.
# Download and try it now
wget https://github.com/cybersonic/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โ .
Content type
Image
Digest
sha256:fa0cccdddโฆ
Size
183.1 MB
Last updated
26 days ago
docker pull markdrew/lucli