Skip to content

ForgeBox wheels-cli is the legacy CommandBox-module CLI and drifts from the LuCLI CLI (generates broken {{enums}} models) #3180

Description

@bpamiri

Summary

box install wheels-cli (ForgeBox slug wheels-cli, type commandbox-modules, 6735 installs, latest 4.0.3) installs the OLD CommandBox-module CLI compiled from cli/src/, NOT the LuCLI runtime (cli/lucli/) that CLAUDE.md declares the canonical Wheels 4.0+ CLI and that brew/scoop/apt distribute. These are two independently maintained codebases, and they produce divergent behavior for the same command.

Reproduction (verified in ortussolutions/commandbox:latest)

box install wheels-cli            # installs commandbox-modules 4.0.3
cd <starter-app>
box wheels generate model Widget --no-migration
cat app/models/Widget.cfc

Produces:

component extends="Model" {
    function config() {
        table("widgets");
        {{enums}}
    }
}

The literal {{enums}} placeholder leaks into the generated file (invalid CFML in a config() body).

Root cause

The module's models/TemplateService.cfc replaces {{belongsToRelationships}} (l.92), {{hasManyRelationships}} (l.106) and {{validations}} (l.129), but has no branch for {{enums}} — even though both the module template (templates/ModelContent.txt) and the LuCLI template (cli/lucli/templates/app/app/snippets/ModelContent.txt) contain the {{enums}} placeholder. The LuCLI generator renders it: cli/lucli/services/CodeGen.cfc:53 (enums: buildModelEnums(...)).

Impact

A user who installs the CLI via ForgeBox/CommandBox gets a wheels g model that emits broken code, while a user on the brew/LuCLI CLI gets valid code. More broadly, two wheels-cli install paths exist with no signpost that ForgeBox ships the legacy generation.

Suggested direction (decision for maintainer)

Either (a) stop publishing the legacy CommandBox-module CLI to ForgeBox and point box install wheels-cli users to the LuCLI distribution, or (b) if it must stay published, patch the {{enums}} gap in TemplateService.cfc and add a deprecation banner clarifying the relationship to the LuCLI CLI. At minimum the {{enums}} leak is a standalone bug in cli/src/ worth fixing regardless.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions