CommandBox : CLI, Package Manager, REPL & More
6.0.0
6.0.0
  • Introduction
  • About This Book
  • Authors
  • Overview
  • Release History
    • 6.x Versions
      • What's New in 6.0.0
    • 5.x Versions
      • What's New in 5.9.1
      • What's New in 5.9.0
      • What's New in 5.8.0
      • What's New in 5.7.0
      • What's New in 5.6.0
      • What's New in 5.5.2
      • What's New in 5.5.1
      • What's New in 5.4.2
      • What's New in 5.4.1
      • What's New in 5.4.0
      • What's New in 5.3.1
      • What's New in 5.3.0
      • What's New in 5.2.1
      • What's New in 5.2.0
      • What's New in 5.1.1
      • What's New in 5.1.0
      • What's New in 5.0.0
    • 4.x Versions
      • What's new in 4.8.0
      • What's New in 4.7.0
      • What's New in 4.6.0
      • What's New in 4.5.0
      • What's New in 4.4.0
      • What's New in 4.3.0
      • What's New in 4.2.0
      • What's New in 4.1.0
      • What's New in 4.0.0
    • 3.x Versions
      • What's New in 3.9.0
      • What's New in 3.8.0
      • What's New in 3.7.0
      • What's New in 3.6.0
      • What's New in 3.5.0
      • What's New in 3.4.0
      • What's New in 3.3.0
      • What's New in 3.2.0
      • What's New in 3.1.1
      • What's New in 3.0.1
      • What's New in 3.0.0
    • 2.x Versions
      • What's New in 2.2.0
      • What's New in 2.1.1
      • What's New in 2.1.0
      • What's New in 2.0.0
    • 1.x Versions
      • What's in 1.0.0
  • Getting Started Guide
  • Setup
    • Requirements
    • Download
    • Installation
    • Light and Thin Binaries
    • Non-Oracle JREs
    • Upgrading
    • Common Errors
  • Usage
    • Execution
      • Recipes
      • CFML Files
        • Using a DB in CFML scripts
      • OS Binaries
      • CFML Functions
      • Exit Codes
    • Commands
    • Parameters
      • Escaping Special Characters
      • File Paths
      • Globbing Patterns
      • Piping into Commands
      • Expressions
    • Command Help
    • Environment Variables
    • System Settings
    • System Setting Expansion Namespaces
    • Ad-hoc Command Aliases
    • Default Command Parameters
    • REPL
    • Tab Completion
    • Interactive Shell Features
    • forEach Command
    • watch Command
    • jq Command
    • printTable Command
    • sql Command
    • Auto Update Checks
    • Bullet Train Prompt
    • 256 Color Support
    • A Little Fun
  • IDE Integrations
    • Sublime Text
    • Visual Studio Code
  • Config Settings
    • Module Settings
    • Proxy Settings
    • Endpoint Settings
    • Server Settings
    • JSON Settings
    • Misc Settings
    • Task Runner Settings
    • Setting Sync
    • Env Var Overrides
  • Embedded Server
    • Multi-Site Support
      • Defining Sites
      • Configuring Sites
      • Servlet Pass Predicate
      • Bindings
      • Multi-Site Examples
      • Pretty Diagrams
    • Multi-Engine Support
    • ModCFML Support
    • Server Versions
    • Start HTML Server
    • Offline Server Starts
    • Debugging Server Starts
    • Server Processes
    • Manage Servers
    • FusionReactor
    • Server Logs
    • Server Scripts
    • Configuring Your Server
      • Security
        • Basic Authentication
        • Client Cert Authentication
      • Server Profiles
      • Server Rules
        • Baked in Rules
        • Allowed Static Files
        • Rule Language
        • Rewrites Map
        • Custom Predicates/Handlers
        • Rule Examples
        • Debugging Server Rules
      • Bindings
        • Open Browser URL
        • Legacy Port & Host syntax
        • Legacy SSL Server Cert syntax
        • Legacy SSL Client Cert syntax
      • Proxy IP
      • HTTPS Redirect/HSTS
      • SSL Client Certs
      • URL Rewrites
      • Aliases
      • Custom Error Pages
      • MIME Types
      • Welcome Files
      • Custom Java Version
      • Adding Custom Libs
      • GZip Compression
      • REST Servlet
      • Performance Tuning
      • Undertow Options
      • Custom Tray Menus
      • JVM Args
      • Case Sensitivity of Web Server
      • Ad-hoc Env Vars
      • Ad-Hoc Java System Properties
      • server.json Env Var overrides
      • Server Home
      • web.xml Overrides
      • Console Log Layout
      • Resource Manager
      • Adobe CF Features
      • Experimental Features
    • External Web Server
    • Starting as a Service
    • Single Server Mode
    • Server.json
      • Working with server.json
      • Packaging Your Server
      • Using Multiple server.json Files
  • Package Management
    • Installing Packages
      • Installation Path
      • Installation Options
      • Advanced Installation
      • Debug Installation
    • Private Packages
    • System Modules
    • Code Endpoints
      • ForgeBox
      • HTTP(S)
      • File
      • Folder
      • Git
      • Java
      • S3
      • CFLib
      • Jar (via HTTP)
      • Lex (via HTTP or File)
      • Gist
    • Package Scripts
    • Dependencies
    • Semantic Versioning
    • Updating Packages
    • Creating Packages
      • Editing Package Properties
      • Publishing Lucee Extensions to ForgeBox
    • Artifacts
    • Box.json
      • Basic Package Data
      • Extended Package Data
      • Package URLs
      • Installation
      • Embedded Server
      • Dependencies
      • TestBox
    • Managing Version
  • Task Runners
    • Task Anatomy
    • BaseTask Super Class
    • Task Target Dependencies
    • Passing Parameters
    • Using Parameters
    • Task Output
      • Printing tables
      • Printing Columns
      • Printing Tree
    • Lifecycle Events
    • Threading/Async
    • Task Interactivity
    • Shell Integration
    • Downloading Files
    • Running Other Commands
    • Error Handling
    • Hitting Your Database
    • Sending E-mail
    • Interactive Jobs
    • Watchers
    • Property Files
    • Running other Tasks
    • Loading Ad hoc Jars
    • Loading Ad-hoc Modules
    • Cancel Long Tasks
    • Progress Bar
    • Installing Lucee Extensions
    • Caching Task Runners
  • Helpful Commands
    • Token Replacements
    • Checksums
    • Code Quality Tools
    • ask and confirm
  • Deploying CommandBox
    • Github Actions
    • Docker
    • Heroku
    • Amazon Lightsail
  • TestBox Integration
    • Test Runner
    • Test Watcher
  • Developing For CommandBox
    • Modules
      • Installation and Locations
      • Configuration
        • Public Properties
        • Configure() Method
        • Lifecycle Methods
      • Conventions
      • User Settings
      • Linking Modules
    • Commands
      • Aliases
      • Using Parameters
        • Using File Globs
        • Dynamic Parameters
      • Command Output
      • Tab Completion & Help
      • Interactivity
      • Watchers
      • Shell integration
      • Running Other Commands
      • Error handling
      • Watchers
      • Loading Ad hoc Jars
    • Interceptors
      • Core Interception Points
        • CLI Lifecycle
        • Command Execution Lifecycle
        • Module Lifecycle
        • Server Lifecycle
        • Error Handling
        • Package Lifecycle
      • Custom Interception Points
    • Injection DSL
    • Example Project
    • FusionReactor for the CLI
  • ForgeBox Enterprise
    • Introduction
    • Storage
    • Commands
      • List
      • Register
      • Login
      • Set Default
      • Remove
    • Usage
Powered by GitBook
On this page
  • Bundled System Modules
  • Custom MIME Types
  • Config and Module Sync
  • onServerInitialInstall interceptor
  • Case Sensitivity of Web Server
  • Support for PFX cert files
  • Case Insensitive Server Rule Predicates
  • Server Rule Reverse Proxy handler supports SSL
  • REPL Improvements
  • Per-Server Preferred Browser Setting
  • New Server Console Log Layouts
  • New forgebox version-debug command
  • Release Notes

Was this helpful?

Edit on GitHub
Export as PDF
  1. Release History
  2. 5.x Versions

What's New in 5.8.0

PreviousWhat's New in 5.9.0NextWhat's New in 5.7.0

Was this helpful?

Bundled System Modules

To be more useful, CommandBox now bundles the following system modules

They will be automatically installed (or updated) when you start the CLI for the first time. You can still update or uninstall them, just like any system module. Note: If you have any of these modules currently linked into the CommandBox core, any uncommitted changes will be overwritten when you upgrade box. Please unlink the repos first before upgrading.

The CommandBox Update Check modules can be disabled if you don't like it via

config set modules.commandbox-update-check.enable=false

It will also automatically obey the

Custom MIME Types

CommandBox will automatically set the content type in the HTTP response for common static file types. If you come across a file extension that doesn't have the correct type, you can set it like so in your server.json:

server set web.mimeTypes.log=text/plain

Which creates the following

{                            
    "web":{                             
        "mimeTypes":{                  
            "log":"text/plain"      
        }
    }
} 

In the above example, hitting a file such as foo.log would come back with a text/plain content type header.

This setting will override any <mime-mapping> tag in your web.xml file.

Config and Module Sync

If you are authenticated to ForgeBox in the CLI, you can synchronize your config settings to and from your ForgeBox account. This is a great way to get up and running on a new PC or keep multiple CommandBox installs in sync. In addition to synchronizing your Config Settings, this feature will also track your installed system modules, such as CFConfig, etc.

config sync push

This command will push your local settings and modules up to your ForgeBox account.

config sync push

By default, the settings are "merged" so new local settings will be added to ForgeBox, but nothing will be removed. To remove config that only exists on ForgeBox, you can use the --overwrite flag to force a full sync.

config sync pull

This command will pull your settings and modules from your ForgeBox account and set/install them locally.

config sync pull

By default, the settings are "merged" so missing settings will be added locally, and missing system modules will be installed, but nothing will be removed. To remove config and modules that only exist locally, you can use the --overwrite flag to force a full sync. This will remove local config settings and uninstall local system modules which were not on ForgeBox.

config sync diff

This command will not change anything, but gives you a full report of all settings which are different between your local CommandBox CLI and ForgeBox. It will show you "Remote Only," "Local Only," and "Changed" settings and modules. Use this to see what you're about to change before pushing or pulling.

config sync diff

onServerInitialInstall interceptor

This is the same as onServerInstall, but it only runs the VERY FIRST time a CF engine is installed. This is helpful if you want to install Lucee extensions or ACF modules and only need to do it the first time. This interceptor is easier than using onServerInstall and inspecting the installDetails.initialInstall flag.

Case Sensitivity of Web Server

This has been an experimental feature of CommandBox servers for a while, but we've finalized the feature and added a proper setting to enable it in server.json. By default, the web server in CommandBox will follow the case sensitivity of the underlying file system. So, when on Windows /FiLe.TxT will still load an actual file called /file.txt. But on Linux, the case in the browser would need to match that of the file system. CommandBox allows you to force case sensitivity to be ON or OFF for a server, overriding the server's file system.

Forcing Case sensitivity

To force CommandBox's web server to be case sensitive, even on operating systems like Windows, use the following setting. There is a nominal performance benefit in doing this, and it can allow a Windows CommandBox server to mimic a Linux server for testing.

server set web.caseSensitivePaths=true

Forcing Case Insensitivity

To force CommandBox's web server to be case insensitive, even on operating systems like Linux, use the following setting. There is a nominal performance overhead in doing this, and it can allow a Linux CommandBox server to mimic a Windows IIS server. In this mode, CommandBox will use an internal cache of file system lookups to improve performance. If there are two files of the same name using different case, then you will get whatever file is found first.

server set web.caseSensitivePaths=false

Support for PFX cert files

If using CommandBox's SSL, you can now use a PFX file (PKCS #8 format) which contains the public and private key in one file.

Case Insensitive Server Rule Predicates

Most of the Server Rule predicates are case-sensitive, which poses a problem when using them for security on Windows since they will only match one specific spelling of a folder or file. We have added "-nocase" versions of several popular predicates which perform case-insensitive checks.

  • regex-nocase()

  • path-suffix-nocase()

  • path-prefix-nocase()

  • path-nocase()

  • equals-nocase()

  • contains-nocase()

Server Rule Reverse Proxy handler supports SSL

load-balanced-proxy({'https://reports1.mydomain.com','https://reports2.mydomain.com'})

REPL Improvements

CFSCRIPT-REPL: "test".len()
4
CFSCRIPT-REPL: [1,2,3].each( (i)=>echo(i) )
123

Per-Server Preferred Browser Setting

There is already a Config Setting for the preferred browser when opening up sites. You can now customize this on a per-server basis with this server.json setting

server set preferredBrowser=firefox
server open

New Server Console Log Layouts

You can now control the Log4j appender layout for CommandBox servers, which includes formats such as JSON, which allows your server logs to be automatically imported into Elastic Search

server set runwar.console.appenderLayout=JSONTemplateLayout

New forgebox version-debug command

There is a helpful command called forgebox version-debug which will show you what version of a package will be installed without actually installing it. It can also be useful to test a semver range and see what packages it matches.

Release Notes

Bug

New Feature

Improvement

Task

More Info:

Read More:

Read More:

More Info:

Undertow's reverse-proxy() handler would not connect to a back-end server using SSL. We've given up on , and added a new load-balanced-proxy() handler which works with SSL.

Due to in the Lucee evaluate() function that seem like they'll , we've finally put a workaround in the REPL, which captures the return value of member functions chained to literals and expressions using closures. Ex:

Read More:

Read More:

Experimental feature force insensitive web server has stopped working in some cases

Hide Felix error messages in console on startup

Custom tray options calling box with space in path fail

Add load-balanced-proxy() handler to replace Undertow's broken reverse-proxy() because they refuse to fix it

Capture return value from some REPL expressions because Lucee refuses to fix evaluate()'s parser

Two instance of CLI cause class loading issues from OSGI bundles

server start port check doesn't take web.http.enable into accout

CommandBox settings sync feature

Add onServerInitialInstall package/server script

Add `.webp` as a default mime type for CommandBox to support this new image format

Formalize setting for case sensitivity of web server

Add "nocase" versions of regex(), path-suffix(), path-prefix(), equals(), contains(), and path() predicates

Improve forgebox whoami command

Allow CommandBox to customize console appender Layout

New "forgebox version-debug" command

Bundle super helpful modules in box core

onConfigSettingSave and onEndpointLogin interception announcements

Ability to pass file name to "more" command

Add a method in server.json to add MIME type mappings to Undertow

Improve message when starting second server with single server mode enabled

system setting serverinfo namespace use interceptdata if running inside of server script

Allow `web.webroot` to be changed in single server mode

Authentication failures don't send custom error pages

Add directory param to coldbox watch-reinit command

Support PKCS #8 format private keys

Allow preferredBrowser to be set on a per-server basis

Add file and directory completion to the ID param of the install command

Add installExtension() for commands and task runners to install Lucee extensions on the fly to the CLI

Update Lucee to 5.3.10.120 in CLI core

Improve upgrade command

Load libdirs in system classloader

Check for default branch of "main" in Git endpoint

Try removing JAX API classes from runwar

Update to Undertow 2.2.22-Final

Update bundled JRE to jdk-11.0.18+10

Remove stopgap for COMMANDBOX-1459

commandbox-cfconfig
commandbox-dotenv
commandbox-update-check
offlineMode Config Setting.
https://commandbox.ortusbooks.com/embedded-server/configuring-your-server/mime-types
https://commandbox.ortusbooks.com/config-settings/setting-sync
https://commandbox.ortusbooks.com/embedded-server/configuring-your-server/case-sensitivity-of-web-server
https://commandbox.ortusbooks.com/embedded-server/configuring-your-server/ssl-certs
RedHat fixing this any time soon
long-standing bugs
never get fixed
https://commandbox.ortusbooks.com/embedded-server/configuring-your-server/console-log-layout
https://commandbox.ortusbooks.com/package-management/installing-packages/debug-installation
COMMANDBOX-1537
COMMANDBOX-1541
COMMANDBOX-1542
COMMANDBOX-1550
COMMANDBOX-1551
COMMANDBOX-1552
COMMANDBOX-1559
COMMANDBOX-1434
COMMANDBOX-1539
COMMANDBOX-1540
COMMANDBOX-1543
COMMANDBOX-1549
COMMANDBOX-1555
COMMANDBOX-1556
COMMANDBOX-1562
COMMANDBOX-1566
COMMANDBOX-1567
COMMANDBOX-1034
COMMANDBOX-1345
COMMANDBOX-1393
COMMANDBOX-1538
COMMANDBOX-1544
COMMANDBOX-1545
COMMANDBOX-1547
COMMANDBOX-1548
COMMANDBOX-1554
COMMANDBOX-1557
COMMANDBOX-1558
COMMANDBOX-1560
COMMANDBOX-1561
COMMANDBOX-1564
COMMANDBOX-1565
COMMANDBOX-1357
COMMANDBOX-1546
COMMANDBOX-1553
COMMANDBOX-1563