CommandBox CLI

Isn't it time to Go Commando!

CommandBox is a standalone, native tool for Windows, Mac, and Linux that will provide you with a Command Line Interface (CLI) for developer productivity, tool interaction, package management, embedded CFML server, application scaffolding, and some sweet ASCII art. It seamlessly integrate to work with any of our *Box products but it is also open for extensibility for any ColdFusion (CFML) project as it is also written in ColdFusion (CFML) using our concepts of CommandBox Commands.  It tightly integrates with our contribution community; ForgeBox, so developers can share modules world-wide.

Built-in help is completely integrated for every command, so you can always know how to work with CommandBox. You can pop open a CommandBox shell in your terminal window and manually type commands, or even automate things externally via the CommandBox binary box with your OS's native shell and create awesome command recipes for automation, building, deploying, you name it!

 

 

Package Management

CommandBox also functions as a package management tool which integrates seamlessly with ForgeBox, our community of ColdFusion (CFML) projects, but can also integrate with git,svn,http, ftp and many more code endpoints. We have created a package descriptor we lovingly call box.json which describes your package, dependencies, dev dependencies, ForgeBox data and can also be used as a settings descriptor for CommandBox commands. Any project that contains a box.json in its root can be installed by CommandBox with a simple command: box install {package}. CommandBox will be smart enought to determine package dependencies, local artifact tracking and much more. You can even initialize a CommandBox package using: box init and get cooking with CommandBox packages.

Sample box.json
{
	"name" 				: "TestBox",
	"version"			: "2.0.0",
	"author" 			: "Ortus Solutions <info@ortussolutions.com>",
	"slug"				: "testbox",
	"type"				: "testing",
	"keywords"			: "testing,xunit,bdd,testbox,mxunit,tdd",
	"directory"			: "/",
	"homepage"			: "http://www.coldbox.org",
	"documentation"		: "http://wiki.coldbox.org/wiki/TestBox.cfm",
	"repository"		: { "type" : "git", "url" : "https://github.com/Ortus-Solutions/TestBox" },
	"bugs"				: "https://ortussolutions.atlassian.net/browse/TESTBOX",
	"shortDescription"	: "A BDD and xUnit testing framework",
	"engines"			: [
		{ "type" : "Lucee", "version" : ">4.5" },
		{ "type" : "adobe", "version" : ">9" }
	],
	"license"			: [ 
		{ "type" : "Apache2", "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" } 
	],
	"contributors"		: [
		"Brad Wood <bdw429s@gmail.com>", "Curt Gratz <gratz@compknowhow.com>"
	],
	"ignore"			: [],
	"testbox"			: {
		"runner" : [
			{ "cf10" 	: "http://cf10cboxdev.jfetmac/testbox/tests/runner.cfm" },
			{ "cf11" 	: "http://cf11cboxdev.jfetmac/testbox/tests/runner.cfm" },
			{ "lucee" 	: "http://luceecboxdev.jfetmac/testbox/tests/runner.cfm" }
		]
	}
}
        

Application Scaffolding

CommandBox has a plethora (Yes, I said Plethora) of commands for quickly building out ColdBox/ContentBox/TestBox applications. Create a new ColdBox app with a simple command:coldbox create app, add a handler with coldbox create handler MyHandler. You can even get actions added to it, views created, and BDD integration tests stubbed out at the same time. This can bring new productivity for people who like to live on the command line and especially for those who want to be able to automate workflows. Check it out yourself, type coldbox create help and see all the creation helpers available.

Embedded Server

One of the cool things CommandBox brings to the table is the ability to spin up an ad hoc, lightweight, ColdFusion (CFML) server (Lucee or Adobe ColdFusion) in any directory from the command line. Simply change your working directory to the root of your app, type server start and a super fast server spins up on a new port running your code. When you're done type server stop from that directory or use the little icon that's showed up in your system tray. You can even get the server's logs, status and much more.

Extensible Via ColdFusion (CFML)

So one of the most interesting things about CommandBox is that the actual commands are written in ColdFusion (CFML) itself! CommandBox is small, lightweight, integrated at the operating system level, but actually running on CFML powered by WireBox. This means you will can extend it with your own commands that do cool stuff for any framework, or automate repetitive tasks you're tired of doing every day.

Sample CommandBox Command:
/**
 * Outputs the text you enter
 *
 * echo "Hello World!"
 * 
 **/
component extends="commandbox.system.BaseCommand" aliases="" excludeFromHelp=false {

	/**
	 * @text.hint The text to output
	 **/
	function run( String text="" )  {
		return arguments.text;
	}

}

You can download CommandBox for any flavor of operating system shown below:

No JRE Included

The following downloads do not include a Java Runtime.

Windows Binary
(33mb)

Binary Mac-Linux
(33mb)

RPM
(33mb)

Debian Package
(33mb)

With JRE Included

The following downloads include a Java Runtime.

Windows JRE-32
(78mb)

Windows JRE-64
(78mb)

Mac 64-bit JRE
(78mb)

Linux 32-Bit JRE
(78mb)

Linux 64-Bit JRE
(78mb)

Installation

The following installations are supported:

  • Windows exe
  • Mac/Linux executable binary
  • Manual installation
  • Homebrew (for Mac)
  • Linux (Redhat)
  • Linux (Debian)
  • Linux Yum
  • Linux APT

Read up on each of these methods here in our installation docs.

Below you can find all the print books you can purchase about CommandBox. You can also find them available in print and kindle format via Amazon and Amazon Kindle Store in your location around the world.

  • Command Line for ColdFusion (CFML)
  • Operation System integration for executing commands
  • Ability to create and execute commands built using ColdFusion (CFML)
  • ForgeBox integration for cloud package management and installations
  • ColdBox Platform, TestBox, and ContentBox CMS Integrations
  • Integrated servlet server with rewrite capabilities
  • Ability to create command recipes and execution
  • REPL (Read-Evaluate-Print-Loop) console for immediate ColdFusion (CFML) interaction
  • Ability to interact with user via CLI and create workflows and installers
  • Ability to execute workflows and tasks
  • Built-in Help system