Skip to content

v0.3.17

Choose a tag to compare

@github-actions github-actions released this 06 Jun 22:03
· 124 commits to main since this release

LuCLI v0.3.17

Downloads

  • lucli-0.3.17.jar/lucli.jar - Universal JAR (Java 21+, works everywhere) ✅ Signed
  • lucli-0.3.17-linux - Shell wrapper for Linux (Java 21+ required)
  • lucli-0.3.17-macos - Shell wrapper for macOS (Java 21+ required)
  • lucli-0.3.17.bat - Windows batch launcher (Java 21+ required)
  • install.sh - POSIX installer bootstrap (curl ... | sh)
  • install.ps1 - PowerShell installer bootstrap (irm ... | iex)

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

## CHANGES

  • CI + Release Stability for Environment Fallback/Snapshot Builds: Updated BATS dry-run coverage to match current missing --env behavior (warn and use base config instead of failing), and hardened release.yml publish Docker build steps by restoring Maven cache in publish and building JARs in offline mode to avoid snapshot-resolution 403 regressions.

  • Docs: Dependency Examples Page: Added content/docs/100_dependencies-and-extensions/020_dependency-examples.md with copy/paste lucee.json snippets for supported dependency types (git, forgebox, and extension via ID/slug, URL, and local path), plus install command examples; linked it from the dependency section in docs index and dependency management page.

  • Java 21 Runtime Gate in Wrapper Scripts: Added early runtime checks in src/bin/lucli.sh and src/bin/lucli.bat so LuCLI fails fast with a clear error when Java is missing, unparseable, or older than Java 21.

  • Dependency Shortcut Templates for deps add: lucli deps add <shortcut> now supports non-interactive shortcut templates loaded from src/main/resources/dependencies/dependency-shortcuts.json (including built-in testbox and fw1), and --dev writes the shortcut dependency to devDependencies.

  • Fix: Numeric #env: Placeholder Deserialization in lucee.json: Server config loading now preprocesses typed numeric port fields before strict Jackson binding, so values like "port": "#env:HTTP_PORT#" (including env overrides) resolve correctly from .env/system variables instead of failing with not a valid int value.

  • Fix: Environment Override envFile Reload: Applying --env overrides now reloads the realized merged envFile before runtime env assembly, so dry-run env previews and server runtime env variables use the environment-specific file (for example prod.env) instead of the base file.

  • Dry-Run --include Section Selector: lucli server start --dry-run and lucli server run --dry-run now support explicit section selection via --include (for example --include env,lucee,tomcat-web,tomcat-server). --include-env no longer implicitly includes realized lucee.json; once any include selector is provided, only requested sections are printed. Legacy start preview flags remain available as aliases.

  • Dry-Run Realized Env Variable Preview: lucli server start --dry-run --include-env now prints a dedicated section showing environment variables realized during lucee.json placeholder substitution (#env:VAR#, deprecated ${VAR}, and default fallbacks), in addition to the runtime env preview.

  • Dependency-Level enabled Toggle for Extensions: Added support for enabled: false on dependencies/devDependencies entries (including environment overrides) so disabled extensions are fully ignored by deps install, auto-install on server start, and runtime extension activation (LUCEE_EXTENSIONS / deploy handling).

  • Fix: Default rewrite.config Now Actually Serves Static Files: The bundled rewrite_template/rewrite.config was using a stack of RewriteCond %{REQUEST_URI} !pattern entries before a single rewrite RewriteRule to "skip" static-file paths. On Tomcat 11's RewriteValve that idiom does NOT short-circuit the way Apache mod_rewrite does — the conditions effectively don't gate the rule, the rule fires for every request, and public/ static files (.css, .js, .txt, .png, etc.) silently 404 even though their extensions are explicitly listed in the negation. The template now expresses the same intent as positive-match RewriteRule … - [L] passthroughs (router-file passthrough, CFML-extension match, conventional static directories, /lucee, /rest/), which terminate rule processing for matching requests and let Tomcat's default servlet serve the file. Each passthrough preserves the exact semantic of the corresponding original RewriteCond ! entry — including ^/${routerFile}.*$ (so /${routerFile}/path-info style framework URLs aren't incorrectly rewritten to /${routerFile}/${routerFile}/path-info when URL rewriting is partially configured) and ^/lucee.*$ (matches /lucee with or without a trailing slash, equivalent to the original's !^/lucee no-trailing-slash semantic). Net effect: public/assets/foo.css, public/__sentinel.txt, etc. now return HTTP 200 with Content-Type set correctly; framework routing through ${routerFile} still works for /, /posts, etc.; and /${routerFile}/anything paths pass through cleanly. Discovered during a Wheels Tutorial fresh-VM bake (the bonus-basecoat chapter's curl -o public/assets/basecoat.min.css ... instructions were dead on arrival because the file existed but the rewrite intercepted the request before the default servlet could serve it). Verified end-to-end on Tomcat 11.0.13 + Lucee Express 7.0.0.395 against a 10-case URL matrix covering both static and dynamic paths plus the new edge cases.

  • Whitelabeling Support for LuCLI: Added a new build-time whitelabeling feature for branded distributions, including profile-aware naming/home isolation, configurable branding metadata and banner content, optional product-version override (branding.productVersion) with ${LUCLI_VERSION} banner token support, and bundled module packaging/deployment from /modules-install on first startup.

  • Version Output Includes Java Runtime: lucli --version now includes a Java Version: line alongside LuCLI and Lucee versions, sourced from the active Java runtime (java -version) with a runtime-property fallback for portability.

  • Fix: .lucli Leading lucli Prefix Now Preserves Quoted Arguments: Script-line normalization no longer rebuilds commands from parsed tokens when stripping an initial lucli prefix. We now remove only the leading command token from the raw line, preserving quoted values like name=\"Mark Drew\" for module and run invocations. Added regression test coverage for quoted argument preservation.

  • Fix: OpenAI AI Config Timeout Compatibility: lucli ai config add now omits custom.timeout for OpenAI-compatible providers (openai, copilot, deepseek, grok, ollama, perplexity, other) because newer OpenAI-compatible APIs reject it as an unsupported request argument. When --timeout is provided for those providers, LuCLI now warns that the value is ignored.

  • Admin Disabled Security Env Enforcement: When admin.enabled=false, LuCLI now enforces LUCEE_ADMIN_ENABLED=false in runtime process environments and Tomcat setenv.sh/setenv.bat generation, and surfaces it in dry-run --include-env previews.

  • Fix: .lucli Command Failures Now Exit Non-Zero: .lucli scripts now propagate subcommand exit codes (for example, run failures) so command errors no longer end with an overall success exit status. Added BATS regression coverage.

  • Fix: cfml Command Exits Non-Zero on Failure: lucli cfml '<expr>' now exits with code 1 when the expression throws. Previously, the catch block logged the error and fell through to return result with result == null, which picocli maps to exit 0. Callers checking exit codes (shell pipelines, CI jobs, pre-commit hooks, doctest harnesses) now correctly see failure.

  • Fix: JAVA_HOME Preflight Before Server Start: lucli server start (and wheels start) now detects missing or broken JAVA_HOME before the child JVM is spawned, and prints an actionable error pointing at Adoptium. Previously the child exited silently and the parent reported a misleading "port conflicts detected" error, forcing users to hunt through ~/.wheels/servers/<name>/server.err to find the real cause. The preflight now runs against the effective child-process environment (parent shell + .env file + lucee.json envVars), so project-level JAVA_HOME overrides are honored and the check won't false-positive when the var is defined in project config but not the parent shell.

  • Module Dispatch: Auto-Bind Positional Args to Typed Params: LuCLI's module dispatch now maps CLI positional args (arg1, arg2, ...) to a target function's typed parameters by declaration order. Module authors can declare typed signatures like function greet(required string name, boolean verbose = false) and get rich MCP JSONSchema (via existing auto-discovery), MCP named-arg binding (standard CFML argumentCollection), and CLI positional binding (this change) all from a single source of truth. Named args and already-populated typed params win over positional fallback; excess positional args stay in argCollection for variadic access. Closes the last remaining "write a per-function arg-parsing shim" pattern for LuCLI module authors.

  • Lockfile-Independent Extension Activation: Server runtime extension activation no longer requires dependencySettings.useLockFile=true. server start/server run now derive extension deployment and LUCEE_EXTENSIONS from lucee.json dependencies when lockfiles are disabled (including dry-run --include-env previews), with lockfile entries still used when enabled/available.

  • Deps Install Materializes Extension Files by Default: lucli deps install now copies/downloads type: "extension" dependencies with path/url into their installPath during install (instead of only recording metadata). Added dependencySettings.materializeExtensionsOnInstall (default true) to opt out and keep metadata/cache-based behavior.

  • BATS Coverage for Local Extension Deployment: Added an integration lifecycle test that creates a fake local .lex dependency, runs lucli deps install, starts the server, and verifies the extension is deployed under ~/.lucli/servers/<server>/lucee-server/deploy/.

  • CI Test Result Publishing Permissions: Updated GitHub Actions test jobs to grant pull-requests: write and issues: write so EnricoMi/publish-unit-test-result-action can post PR comments without failing Linux unit/integration jobs with 403 Resource not accessible by integration.

  • Server Runtime Prewarm Flag (--prewarm): Added --prewarm support to both lucli server start and lucli server run to pre-download runtime artifacts and exit without starting a server. LuCLI now prewarms Lucee Express for lucee-express runtime, prewarms Lucee JARs for tomcat/jetty runtimes, and reports a no-download message for docker runtime.

  • Server Header Shows Generated Lucee Config Path: When server startup writes .CFConfig.json, LuCLI now prints Generated lucee config in: <path> alongside existing startup header lines so the effective Lucee config file location is explicit.

  • Fix: Profile-Aware Home Directory in Script Engine: LuceeScriptEngine.getLucliHomeDirectory() now uses the active CLI profile's home directory instead of a hardcoded ~/.lucli path. This ensures that BaseModule.cfc and other shared resources are provisioned to the correct home directory (e.g. ~/.wheels/modules/ when running as wheels).

  • Server Environment Fallback (LUCLI_ENV) + Docker Default: lucli server start and lucli server run now fall back to LUCLI_ENV when --env/--environment is not provided, while still honoring explicit --env precedence. The Docker image now sets LUCLI_ENV="" by default so deployments can override it at runtime (for example docker run -e LUCLI_ENV=prod ...).

  • Server Warmup Flag (--warmup): Added --warmup support to lucli server start and lucli server run to enable Lucee build-time warmup by injecting both LUCEE_ENABLE_WARMUP=true and -Dlucee.enable.warmup=true for that invocation (without persisting changes to lucee.json).

  • Fix: MCP Tool Output Capture: lucli mcp <module> now correctly captures module out() / err() output into JSON-RPC response bodies. Previously, Lucee's systemOutput() bypassed System.setOut() redirection because it caches stream references at engine startup — so every MCP tool returned empty content to callers while output leaked to the terminal, contaminating the stdio protocol stream. BaseModule now uses createObject("java", "java.lang.System").out.println(...) for dynamic lookup that honors redirection.

  • MCP Tool Hiding: Public functions inherited from BaseModule (init, getEnv, getSecret, verbose, getAbsolutePath, executeCommand, version, showHelp) are now automatically excluded from MCP tools/list responses. Modules can additionally declare specific commands to hide with a new mcpHiddenTools() convention:

    public array function mcpHiddenTools() {
        return ["start", "stop", "console"];
    }

    Hidden tools remain reachable as CLI subcommands — this is purely an MCP-surface filter for commands that are stateful, interactive, or otherwise inappropriate for autonomous agent use.

  • Fix: BaseModule.cfc Dev Sync: The shared BaseModule.cfc in the active profile's modules directory is now refreshed when its content differs from the JAR-bundled copy, instead of only when the LuCLI version number changes. Dev iterations that modify src/main/resources/modules/BaseModule.cfc now reach the installed copy without needing a formal version bump.

  • executeModuleAndReturn() on LuceeScriptEngine: Framework callers can now invoke a module function and capture its return value without triggering the legacy print-if-non-null CLI behavior. Used internally by MCP tool introspection.

  • #project:path# Placeholder in Configuration: Added #project:path# placeholder support for lucee.json configuration values (e.g. datasource DSNs). Resolved at server start alongside #env:VAR# and #secret:NAME#, replacing the token with the absolute project directory path.