Your First box.json

Create a box.json with init and read or change it with package show and package set.

On this page

Every CommandBox project is described by a box.json file. In this lesson you will create one, then read and change it from the command line.

Create it

Make an empty folder and run init inside it:

mkdir my-app
cd my-app
box init

You can pass values up front, and each argument becomes a property in the file:

box init name="My App" slug=my-app version=1.0.0 shortDescription="My first app"

Prefer to be asked questions? Use the wizard:

box init --wizard

Key fields

  • name - a human readable name
  • slug - the unique id, no spaces or special characters
  • version - your own version, using semantic versioning
  • shortDescription - one line about the package
  • type - the kind of package, such as modules

Show values

Run package show with no argument to print the whole file, or name a property:

box package show
box package show slug

Set values

box package set version=1.0.1
box package set name="My App" slug=my-app
Run it in the project root

package show and package set must run in the folder that holds box.json. If there is none, they tell you to run init first.

Recap

  • box init creates a box.json, optionally with values or --wizard.
  • The core fields are name, slug, version, shortDescription and type.
  • package show reads a property and package set changes it.
Edit this page Download Markdown Last updated Nov 30, 2026, 8:08:15 PM Report an issue
Lesson 3 of 15 - Learn CommandBox