Skip to content

v0.2.1

Choose a tag to compare

@github-actions github-actions released this 27 Feb 23:11
· 268 commits to main since this release

LuCLI v0.2.1

  • URL Rewriting: Migrated to Tomcat RewriteValve: Replaced the Tuckey UrlRewriteFilter (urlrewrite.xml) with Tomcat's built-in RewriteValve (rewrite.config). This eliminates javax/jakarta servlet API compatibility issues across Tomcat versions and removes the need for an external JAR. Rewrite rules now use Apache mod_rewrite syntax and are placed at the Host level (conf/Catalina/<host>/rewrite.config) instead of inside WEB-INF/. When both HTTPS redirect and URL rewriting are enabled, rules are combined into a single rewrite.config file.
  • ⚠️ Deprecation: urlrewrite.xml: Existing projects using urlrewrite.xml will see a warning at server startup. Migrate your rewrite rules to the new rewrite.config format (Apache mod_rewrite syntax). See the updated URL Rewriting documentation.
  • Jetty Runtime: URL Rewriting Not Supported: URL rewriting is not available when using the Jetty runtime. A warning is displayed if urlRewrite.enabled is set with a Jetty-based runtime.
  • New #env:VAR# Variable Syntax: Variable substitution in lucee.json now uses #env:VAR_NAME# syntax (e.g., #env:DB_HOST#, #env:PORT:-8080# for defaults). The env: prefix makes intent explicit, distinguishing environment lookups from #secret:NAME# and potential future CFML expression support.
  • Protected Zones: The configuration, environments.<env>.configuration, and jvm.additionalArgs blocks are protected — only #env:VAR# substitution is applied, preserving ${VAR} for Lucee runtime evaluation and JVM system properties.
  • ⚠️ Deprecation: ${VAR} and bare #VAR# Syntax: The old ${VAR} syntax and the bare #VAR# syntax (without the env: prefix) are both deprecated. They still work but trigger a one-time warning. Migrate to #env:VAR# — the old syntax will be removed in a future release.
  • CFML Expression Guard: A warning is shown if #...# placeholders contain parentheses, which may indicate accidental CFML expressions rather than simple variable references.
  • --config Support for server stop and server restart: Added --config / -c option to server stop and server restart commands. Allows stopping/restarting servers by specifying their configuration file (e.g., lucli server stop --config lucee-docker.json) instead of requiring --name. The server name is resolved from the config file automatically.
  • source Directive for .lucli Scripts: Added a source command for loading .env-style files inside .lucli scripts (e.g., source .env). Paths are resolved relative to the script's directory. Loaded variables become available as ${VAR} placeholders and in scriptEnvironment, just like set.
  • --envfile CLI Option: Added --envfile <path> flag to pre-load environment variables from a file before script execution (e.g., lucli --envfile=.env myscript.lucli). Variables are available to all script lines from the start.
  • ⚠️ Deprecation: Top-level version in lucee.json: The Lucee engine version should now be specified under a new "lucee" block: "lucee": { "version": "6.2.2.91", "variant": "standard" }. This frees up the top-level "version" key for specifying the application/project version. Existing configs with a top-level "version" containing a Lucee version string (e.g. "6.2.2.91") are automatically migrated at load time with a deprecation warning. A "variant" field (default "standard") replaces the previous runtime.variant for selecting Lucee editions. The old format will be removed in a future release.
  • Fix: Shebang Line Handling: Fixed syntax error when executing CFML scripts (.cfs, .cfm) that contain shebang lines (e.g., #!/usr/bin/env lucli). Scripts can now include shebangs for direct execution while remaining compatible with lucli run. The shebang line is automatically stripped before the script is passed to the Lucee engine.
  • JSON Comments: lucee.json now supports // line comments and /* */ block comments, making it easier to annotate your configuration.
  • Relative Path Resolution in envVars: Relative paths (starting with ./ or ../) in envVars are now automatically resolved to absolute paths against the project directory, so the server process receives correct paths regardless of its working directory.
  • Dry-Run for server run: lucli server run --dry-run now works the same as server start --dry-run, showing the realized configuration without starting the server.
  • Environment Preview (--include-env): Added --include-env flag for --dry-run on both server start and server run to display the environment variables that would be passed to the runtime (CATALINA_OPTS, LUCEE_EXTENSIONS, envVars, etc.). Also included in --include-all.
  • Platform Updates: Updated to Lucee 7.0.2.101-SNAPSHOT.
  • Module Help: Modules now support --help (e.g. lucli markspresso --help) to display available subcommands with their arguments, types, and defaults. Module name, version, and description are pulled from module.json. Module authors can override showHelp() for custom help output.
  • Runtime Providers: LuCLI now supports pluggable server runtimes via the new runtime key in lucee.json. Choose how your Lucee server runs:
    • Lucee Express (default) — same as before, no config change needed.
    • Vendor Tomcat — point LuCLI at your own Tomcat installation with "runtime": {"type": "tomcat", "catalinaHome": "/path/to/tomcat"}. LuCLI validates the installation, checks Lucee/Tomcat version compatibility, and creates an isolated per-server instance. Also supports the CATALINA_HOME environment variable as a fallback.
    • Docker (experimental) — run Lucee in a Docker container with "runtime": "docker". Automatically pulls the lucee/lucee image, maps ports and volumes, and manages the container lifecycle. server stop, server status, and server list all work with Docker containers.
  • Runtime Configuration in lucee.json: Supports both string shorthand ("runtime": "docker") and object form ("runtime": {"type": "tomcat", "catalinaHome": "..."}) with optional fields for Docker image, tag, and container name. Updated lucee.schema.json with the new schema.
  • Fix: Server Status with Tomcat: Fixed a bug where server status would report a running server as "NOT RUNNING" because the PID file was being overwritten during Tomcat startup.
  • Documentation: Added runtime providers guide covering all three providers with configuration examples and a manual QA test guide.
  • New Aliases Added plural aliases for better discoverability: lucli server → lucli servers, lucli module → lucli modules, lucli secret → lucli secrets.
  • Reusable Table UI Component: Added org.lucee.lucli.ui.Table class for consistent CLI table rendering across commands. Features include multiple title rows, auto-sizing columns, full-width separators, optional footer, and configurable border styles (BOX, ASCII, NONE). Uses builder pattern for fluent API.
  • ModuleConfig Loader: Added org.lucee.lucli.modules.ModuleConfig class that loads module.json once with sensible defaults. Eliminates redundant JSON parsing (was reading file 3x per module) and provides status detection (DEV/INSTALLED/AVAILABLE).
  • Modules Refactoring: Moved module commands to cli/commands/modules/ subpackage. Refactored ModulesListCommandImpl to use new Table and ModuleConfig classes for cleaner, more maintainable code.
  • Code Cleanup: Removed unused imports across codebase, fixed WindowsSupport statics, general import organization.
  • Emoji Support Refactoring: Created new EmojiSupport class with centralized global emoji control. Single showEmojis setting in ~/.lucli/settings.json now affects all output. Use EmojiSupport.process() to replace emojis with text fallbacks when disabled. Simplified PromptConfig and Terminal to use this unified approach.
  • Fix: Prompt Display Bug: Fixed broken Unicode regex patterns that were stripping letters from paths in prompts (e.g., showing // instead of ~/Code/LuCLI).
  • Fix: Environment Configuration Merge: Fixed issue where environment-specific config in lucee.json (e.g., --env=prod) would revert to defaults instead of properly overriding base config values. Now reads raw JSON from file for correct deep merging.
  • Fix: Terminal Exception Handling: Added general exception handler to the REPL loop so uncaught exceptions display an error message and continue instead of crashing the terminal.
  • Fix: Tab Completion for File Paths: Fixed tab completion for ls, cat, cd, head, tail, etc. - completion now triggers correctly after typing a command with a trailing space. Also fixed ~/ path completion to preserve the tilde prefix instead of expanding to the full home path.
  • External Command File Completion: Added file path completion as fallback for external commands like code, vim, open, etc.
  • Welcome Page: When starting a Lucee server with enableLucee=true (the default), LuCLI now automatically creates a welcome index.cfm in the webroot if one doesn't exist. The page displays server info, helpful commands, and links to documentation. Existing index.cfm files are never overwritten.
  • Fix: resolved an issue after refactoring where the values are not returned from the executeLucliScriptCommand method, causing CFML command outputs to not be displayed in the terminal. The method now returns the command output as a string, which is printed to the terminal if not empty.
  • Fix: Fixed silent failures when executing picocli subcommands (e.g. server stop) in .lucli scripts. Captured output was being discarded instead of returned, so commands would run but produce no visible output or error messages.
  • SpotBugs Integration: Added SpotBugs Maven plugin for static analysis. New documentation at content/docs/150_testing-and-qa/020_spotbugs.md covers setup, usage, and configuration.

Downloads

  • lucli-0.2.1.jar/lucli.jar - Universal JAR (Java 21+, works everywhere) ✅ Signed
  • lucli-0.2.1-linux - Shell wrapper for Linux (Java 21+ required)
  • lucli-0.2.1-macos - Shell wrapper for macOS (Java 21+ required)
  • lucli-0.2.1.bat - Windows batch launcher (Java 21+ required)

All downloads require Java 21+. JAR files are cryptographically signed for authenticity.