CommandBox : CLI, Package Manager, REPL & More
5.6.0
5.6.0
  • Introduction
  • About This Book
  • Authors
  • Overview
  • Release History
    • 5.x Versions
      • 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
    • Env Var Overrides
  • Embedded Server
    • 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
        • Custom Predicates/Handlers
        • Rule Examples
        • Debugging Server Rules
      • Server Port and Host
      • Proxy IP
      • SSL Server Certs
        • SSL Client Certs
      • HTTPS Redirect/HSTS
      • URL Rewrites
      • Aliases
      • Custom Error Pages
      • Welcome Files
      • Custom Java Version
      • Adding Custom Libs
      • GZip Compression
      • REST Servlet
      • Performance Tuning
      • Undertow Options
      • Custom Tray Menus
      • JVM Args
      • Ad-hoc Env Vars
      • Ad-Hoc Java System Properties
      • server.json Env Var overrides
      • Server Home
      • web.xml Overrides
      • 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
    • 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
    • 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
    • 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
  • Server Enhancements
  • Tray menu makeover
  • Pre/Post package scripts
  • Better ForgeBox Login management
  • onRelease interceptor/package script
  • onInstall interceptor/package script
  • CLI Engine Update
  • Release Notes
  • Bug
  • New Feature
  • Improvement

Was this helpful?

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

What's New in 3.3.0

PreviousWhat's New in 3.4.0NextWhat's New in 3.2.0

Last updated 2 years ago

Was this helpful?

Server Enhancements

The embedded CommandBox server have seen a number of nice enhancements to make it easier for you to use CommandBox for super easy local development.

Fusion Reactor Module

The more people begin to use CommandBox for local development, the more interested they became in being able to run on their dev servers to help trouble shoot their code. That's why we created a module. It's not part of the core, but can be installed in a single command and will attach FusionReactor's server monitor to every server you start. You'll need to have a to use it.

install commandbox-fusionreactor
fr register "your FR license key"
server start
fr open

Web Aliases

CommandBox allows you to create web aliases for the web server that are similar to virtual directories. The alias path is relative to the web root, but can point to any folder on the hard drive. Aliases can be used for static or CFM files. To configure aliases for your server, create an object under web called alises. The keys are the web-accessible virtual paths and the corresponding values are the relative or absolute path to the folder the alias points to.

Here's what your server.json might look like.

{
  "web" : {
    "aliases" : {
      "/foo" : "../bar",
      "/js" : "C:\static\shared\javascript"
    }
  }
}

Here's how to create aliases from the server set command:

server set web.aliases./foo = bar

Custom Error Pages

You can customize the error page that CommandBox servers return. You can have a setting for each status code including a default error page to be used if no other setting applies. Create an errorPages object inside the web object in your server.json where each key is the status code integer or the word default and the value is a relative (to the web root) path to be loaded for that status code. This is what you server.json might look like:

{
  "web" : {
    "errorPages" : {
      "404" : "/path/to/404.html",
      "500" : "/path/to/500.html",
      "default" : "/path/to/default.html"
    }
  }
}

You can set error pages via the server set command like this:

server set web.aliases.404=/missing.htm

Custom tray menu items

You can customize these tray menus and add your own option for your convenience. To add a menu contribution to an individual server, add the following to your server.json:

{
  "trayOptions":[
    {
      "label":"Foo",
      "action":"openbrowser",
      "url":"http://${Setting: runwar.host not found}:${Setting: runwar.port not found}/foobar.cfm",
      "disabled":false,
      "image":"/path/to/image.png"
    }
  ]
}

Tray menu makeover

We've updated to a new library that creates the tray icon for your running servers and the menu that appears when you right click. In addition to better support for some Linux distros, we've added some nice new icons to the menus.

Pre/Post package scripts

Before any package script is run, CommandBox will look for another package script with the same name, but prefixed with pre. After any package script is run, CommandBox will look for another package script with the same name, but prefixed with Post. So if you have a package that contains 3 package scripts: foo, preFoo, and postFoo, they will run in this order.

  1. preFoo

  2. foo

  3. postFoo

This works for built-in package script names as well as as doc package scripts. It also works on any level. In the example above, if you created a 4th package script called prePreFoo, it would run prior to preFoo.

Better ForgeBox Login management

If you use more than one ForgeBox login, perhaps a personal one and a company one, it can be a pain to keep logging in. It's also hard to remember the last user you logged in with. We've introduced two new commands to help with this. Run this to tell you who you are logged in as:

forgebox whoami

Run this to switch between users that you've previously logged in with:

forgebox use myUser

onRelease interceptor/package script

We've added a new "onRelease" interceptor and package script to help with the workflow of publishing packages. Here's a run down of the three key points when bumping a package version.

  • preVersion - Announced before the new version is set using the bump command

  • postVersion - Announced after the new version using the bump command but before the Git repo is tagged.

  • onRelease - Announced after a new version is set using the bump command and after the Git repo is tagged.

Here is a typical package script work flow for working with a package that's hosted on GitHub and published to ForgeBox:

"scripts":{
  "preVersion":"testbox run",
  "postVersion":"package set location='gituser/repov#`package version`'",
  "postPublish":"!git push --follow-tags"
}

Then when you want to publish a new version of your package, commit your changes to Git and run the following commands:

bump --minor
publish

Those two commands, in combination with your package scripts, would accomplish the following:

  1. Run the package's test suite (a failure will abort the process)

  2. Increase the minor version of the page

  3. Tag the Git repo

  4. Change the package's location property in box.json to point to the new tag

  5. Commit the tag and new box.json

  6. Publish the package to ForgeBox

  7. Push the new box.json and Git tag

onInstall interceptor/package script

Announced while a package is being installed, after the package endpoint and installation directory has been resolved but before the actual installation occurs. This allows you to override things like the installation directory based on package type. Any values updated in the interceptData struct will override what the install command uses.

CLI Engine Update

The Lucee version that the CLI runs on has been updated to be 4.5.3.020 which is also now the default engine to be used when you use the "server start" command and don't specify a cfengine. If you still want to start a web server on Lucee 4.5.2.018, then simply to this:

start cfengine=lucee@4.5.2+018

Release Notes

There are tons of little bug fixes in this version that you can view in our release notes.

Bug

New Feature

Improvement

[] - error when updating forgebox when slugname changes

[] - Empty command CFCs with no functions throw an error starting box

[] - Error "key [FUNCTIONS] doesn't exist" thrown when trying to start command box

[] - server name completion errors on server open command

[] - Document the resolvePath() differing behaviour on OSX vs Windows

[] - artifacts clean fails on OSX when there's .DS_Store files

[] - appSkeleton in the coldbox create app wizard needs to comply to IDs instead of local disk

[] - "server open" always opens localhost

[] - The trayicon in server.json does not work with relative paths

[] - update command doesn't respect original install path

[] - custom url rewrite location doesn't respect starting server by name in different location

[] - coldbox create crud doesn't work on Windows

[] - Add Fusion Reactor support for server

[] - Starting server in web root with WEB-INF treats CWD as war

[] - Add "open" flag to touch/new command.

[] - forgebox whoami command to show what user your API key is set to

[] - Update the storage of the APIkey in the commandbox settings to include multiple keys

[] - Have a forgebox use {username} command to switch the current api key

[] - Allow aliases (virtual directory) in web server

[] - Provide custom 40x and 50x error pages for servers

[] - Catch error scenario when user tries to start a server with a WEB-INF

[] - Upgrade to latest Runwar with several bug fixes

[] - Refactor string similarity to use external library

[] - Refactor semver CFC to be separate lib

[] - Refactor path pattern matcher CFC to be separate lib

[] - coldbox create app command does not list all templates

[] - Run pre/post package scripts by convention

[] - Add onRelease interception point/package script

[] - Serious performance issue with formatting large JSON strings

[] - Better handle syntax errors in a module's config

[] - Move onServerStart interception announcement to have server home dir

[] - Allow tray options to be customized

[] - Add onInstall interception point

[] - Incorrect custom model path in the unit test

[] - Exit REPL multi-line with extra enter stroke

[] - Don't use in-use port specified in start params or server.json

[] - Wait for full debug output when starting server with debug=true

[] - Append JVM args and runwar args to server defaults

[] - Update to Runwar 3.4.10

[] - Improve server status detections

[] - Show tag stack when executing .cfm files

[] - Improve tab completion of forgebox slugs

[] - Allow custom images inside tray menu plus disabled items

[] - Add overwrite confirmations to all coldbox create commands

[] - Improve version output in "forgebox show" command

[] - Upgrade engine to Lucee 4.5.3.020

FusionReactor
CommandBox FusionReactor
FusionReactor license or sign up for a trial
COMMANDBOX-187
COMMANDBOX-422
COMMANDBOX-423
COMMANDBOX-426
COMMANDBOX-434
COMMANDBOX-435
COMMANDBOX-437
COMMANDBOX-449
COMMANDBOX-451
COMMANDBOX-464
COMMANDBOX-465
COMMANDBOX-466
COMMANDBOX-316
COMMANDBOX-399
COMMANDBOX-416
COMMANDBOX-430
COMMANDBOX-431
COMMANDBOX-432
COMMANDBOX-445
COMMANDBOX-458
COMMANDBOX-398
COMMANDBOX-410
COMMANDBOX-412
COMMANDBOX-413
COMMANDBOX-414
COMMANDBOX-419
COMMANDBOX-420
COMMANDBOX-421
COMMANDBOX-424
COMMANDBOX-425
COMMANDBOX-427
COMMANDBOX-428
COMMANDBOX-433
COMMANDBOX-436
COMMANDBOX-440
COMMANDBOX-442
COMMANDBOX-443
COMMANDBOX-444
COMMANDBOX-454
COMMANDBOX-457
COMMANDBOX-460
COMMANDBOX-461
COMMANDBOX-467
COMMANDBOX-468
COMMANDBOX-469
COMMANDBOX-470