Publishing to ForgeBox

Package your project, log in, and publish it to ForgeBox with versioning.

On this page

Any folder with a box.json is a package. In this lesson you will describe your package, bump its version and publish it to ForgeBox so anyone can install it.

Describe the package

Run package init in the project root to create a box.json. Set the fields ForgeBox needs.

box package init slug=my-package type=modules
{
    "name": "My Package",
    "slug": "my-package",
    "version": "1.0.0",
    "type": "modules",
    "ignore": [
        "**/.*",
        "test",
        "tests"
    ]
}
  • slug is the unique id people use to install it.
  • type tells ForgeBox and CommandBox what kind of package this is, for example modules.
  • ignore lists files left out of the published zip.

ForgeBox also reads a readme, instructions and changelog file from your project (.md or .txt) for the package page.

Version, log in, publish

1
Bump the version
box bump --patch

Use --minor or --major for bigger changes. In a clean Git repo this also creates a tag.

2
Log in to ForgeBox
box forgebox login

You need a free account from forgebox.io.

3
Publish
box publish

If the version already exists, its metadata is updated. If it is new, it is added.

Check it

box forgebox show my-package
box install my-package
Private packages

Add --private to package init to create a package only you can see.

Recap

  • A package is a folder with a box.json that has name, slug, version, type and ignore.
  • box bump changes the version using semantic versioning.
  • box forgebox login then box publish puts your package on ForgeBox.
Edit this page Download Markdown Last updated Nov 30, 2026, 8:08:15 PM Report an issue
Lesson 7 of 15 - Learn CommandBox