Blog

Using CommandBox to manage dependencies

Brad Wood March 05, 2015

Spread the word

Brad Wood

March 05, 2015

Spread the word


Share your thoughts

Dependencies are other packages that are required by another package for it to run. A simple package may have no dependencies, or it may have many. There are two types of dependencies: a regular dependency or a development dependency. Regular dependencies are ones required for operation of the main package. Development dependencies are optional and only necessary if you plan on making changes to the package you're installing. Dev dependencies would include testing frameworks or build tools.

When a package is installed, CommandBox will read its dependencies (from the box.json) and recursively install them as well. This encourages developers to write small, reusable libraries for everyone to use. When installing via a package manager, you don't have to worry about getting all the pieces installed.

Dependencies and development dependencies are stored in an object with the slug for the key a version range for the value.

"dependencies":{
    "coldbox":"4.0.0",
    "cbvalidation":"1.0.0"
    "cborm":"1.0.0"
},
"devDependencies":{
    "testbox":"2.0.0"
},

When you install a dependency , it will be automatically added to your box.json. Use the --saveDev flag to save a development dependency. Uninstalling a dependency will remove it from your box.json unless you set the save parameter to false.

When you distribute a package for others to use, you should omit it dependencies. This will reduce the size of your repository and will prevent you from having to mess with the 3rd party code. As long as they are saved in your box.json, you're good.

When someone installs your package, CommandBox will automatically get the latest dependencies for them. If you're sharing an entire project that other people will download or clone from GitHub, they can simply run the install command with no parameters.

install

This basically installs the root box.json as the current package, which means all dependencies that don't exist already will be installed. Now your project should be assembled and ready to run!

Read more about using CommandBox here:

http://ortus.gitbooks.io/commandbox-documentation/content/getting_started_guide.html

Add Your Comment

Recent Entries

Discover the tools, tricks, and techniques every modern CFML and BoxLang developer needs!

Discover the tools, tricks, and techniques every modern CFML and BoxLang developer needs!

Into the Box 2026 is officially on the horizon, and it’s shaping up to be our most impactful conference yet.

Our mission this year is simple: **Make modernization approachable for everyone.** Whether you’re a seasoned ColdFusion veteran or a developer just starting your BoxLang journey, we’ve priced this event to ensure the entire community can join us in person.

Victor Campos
Victor Campos
March 05, 2026
From Lucee to Modern JVM Architectures for German Enterprises

From Lucee to Modern JVM Architectures for German Enterprises

How German companies running Lucee and CFML can evolve toward cloud-native JVM platforms

Across Germany, many enterprises rely on Lucee and CFML-based applications to run critical internal systems, customer portals, and business workflows.

Germany has one of the most active Lucee communities in Europe, supported by long-standing adoption of CFML across industries such as:

  • Manufacturing
  • Logistics
  • <...

Cristobal Escobar
Cristobal Escobar
March 04, 2026
BoxLang 1.11.0 Release

BoxLang 1.11.0 Release

We're proud to announce BoxLang 1.11.0, a highly focused performance and stability release that delivers measurable speed improvements across every BoxLang application, with zero code changes required. The team invested deeply in bytecode generation, class loading, lock management, and type casting to produce one of the most impactful runtime optimization releases to date. Alongside the performance wave, this release resolves critical concurrency bugs, hardens DateTime handling, and ships powerful new developer tooling.

Luis Majano
Luis Majano
March 04, 2026