diff --git a/changelog.d/3183-commandbox-install-guide.added.md b/changelog.d/3183-commandbox-install-guide.added.md new file mode 100644 index 0000000000..5205e2a914 --- /dev/null +++ b/changelog.d/3183-commandbox-install-guide.added.md @@ -0,0 +1 @@ +- Adds "Installing with CommandBox" guide to the v4 docs, documenting the four ForgeBox packages Wheels publishes (`wheels-base-template`, `wheels-core`, `wheels-cli`, `wheels-starter-app`), the post-install placeholder edits required before `box server start`, the server management workflow, and the scope of what the standalone `wheels` CLI provides that CommandBox cannot replace. Includes a 2.x/3.x → 4.0 command mapping table. Cross-links added from `installing.mdx` and `cfml-engines.mdx` (#3183). diff --git a/web/sites/guides/src/content/docs/v4-0-0/start-here/cfml-engines.mdx b/web/sites/guides/src/content/docs/v4-0-0/start-here/cfml-engines.mdx index 7e234f9cee..efaf8f2eb1 100644 --- a/web/sites/guides/src/content/docs/v4-0-0/start-here/cfml-engines.mdx +++ b/web/sites/guides/src/content/docs/v4-0-0/start-here/cfml-engines.mdx @@ -102,6 +102,11 @@ Wheels' BoxLang compatibility is verified per release in the same CI matrix as L href="../installing/" description="Get the wheels CLI on your machine. Lucee-bundled." /> + + +1. **Create a project directory and install the base template:** + + ```bash title="CommandBox shell or your shell" + mkdir myApp && cd myApp + box install wheels-base-template + ``` + + CommandBox resolves the current stable version (4.0.3 at time of writing), downloads the template archive, and extracts it. `wheels-core` is pulled transitively and lands in `vendor/wheels/`. + +2. **Edit the placeholder values in `server.json`.** + + The template archive ships with raw token placeholders that the `wheels new` command substitutes automatically. A direct `box install` skips that substitution, so you must edit them by hand before starting the server. + + Open `server.json` and replace: + + | Placeholder | Replace with | + |---|---| + | `\|appName\|` | Your application name, e.g. `myApp` | + | `\|cfmlEngine\|` | The engine you want, e.g. `lucee@6` or `adobe@2025` | + + A minimal edited `server.json` looks like: + + ```json title="server.json" + { + "name": "myApp", + "cfengine": "lucee@6", + "webroot": "public" + } + ``` + +3. **Edit the placeholder values in `config/settings.cfm`.** + + Open `config/settings.cfm` and replace: + + | Placeholder | Replace with | + |---|---| + | `\|datasourceName\|` | Your datasource name, e.g. `myapp` | + | `\|reloadPassword\|` | A reload password, e.g. a short random string | + +4. **Configure a datasource** in your CFML engine's administrator, or use an in-process datasource definition. The datasource name must match what you set in step 3. + +5. **Start the server:** + + ```bash title="your shell" + box server start + ``` + + First run downloads the CFML engine if CommandBox has not cached it yet (~100–500 MB depending on the engine). Once started, the app is available at the port shown in the CommandBox output (default `8080`). + +6. **Verify the app is running** by opening `http://localhost:8080` in a browser. You should see the Wheels welcome page. + + + + + +## Serve and reload + +Once the server is running, the standard CommandBox commands apply: + +```bash title="your shell" +box server stop +box server restart +box server info +``` + +To reload the Wheels application without restarting the server, send the reload request directly: + +``` +http://localhost:8080/?reload=true&password= +``` + +Use the reload password you set in `config/settings.cfm` during setup. + +To pin or change the CFML engine, update the `cfengine` field in `server.json` and restart the server. See [CFML Engines](/v4-0-0/start-here/cfml-engines/) for the supported values and engine-specific notes. + +## What is not available through CommandBox + +The following capabilities require the `wheels` binary (LuCLI-based) and are not reachable through a CommandBox-only workflow: + +| Capability | `wheels` CLI command | CommandBox equivalent | +|---|---|---| +| App scaffolding | `wheels new myApp` | `box install wheels-base-template` (with manual edits) | +| Code generation | `wheels generate model/controller/scaffold` | None | +| Database migrations | `wheels migrate latest` | None | +| Interactive console | `wheels console` | None | +| Test runner | `wheels test` | None | +| MCP server | `wheels mcp wheels` | None | +| Wheels packages registry | `wheels packages add/list/search` | None | +| Deploy | `wheels deploy` | None | + +If your workflow needs any of the above, install the `wheels` binary alongside CommandBox — they are independent tools and do not conflict. The `wheels` CLI communicates with a running server over HTTP, so it works with a CommandBox-managed server just as well as with the bundled Lucee runtime. + + + +## Coming from 2.x/3.x CommandBox workflows + +If you built a Wheels 2.x or 3.x app using CommandBox as your primary tool, here is the direct mapping to Wheels 4: + +| 3.x CommandBox workflow | Wheels 4 equivalent | +|---|---| +| `box install wheels-cli` (CommandBox module) | Install the `wheels` binary (brew/scoop/apt/yum) | +| `wheels generate app myApp` (CommandBox) | `wheels new myApp` (standalone CLI) | +| `box server start` | `box server start` (unchanged) or `wheels start` (bundled Lucee) | +| `wheels migrate` (CommandBox) | `wheels migrate latest` (standalone CLI, talks to running server) | +| `box install ` | `wheels packages add ` (Wheels packages registry) | +| `box publish` (ForgeBox) | Submit to the [Wheels packages registry](https://github.com/wheels-dev/wheels-packages) | + +The framework itself is backward-compatible with the `box server start` workflow — that part is unchanged. The difference is how you interact with the running server for development tasks. + +## Related guides + + + + + + diff --git a/web/sites/guides/src/content/docs/v4-0-0/start-here/installing.mdx b/web/sites/guides/src/content/docs/v4-0-0/start-here/installing.mdx index c80b564e4c..5cc3c22e88 100644 --- a/web/sites/guides/src/content/docs/v4-0-0/start-here/installing.mdx +++ b/web/sites/guides/src/content/docs/v4-0-0/start-here/installing.mdx @@ -20,6 +20,10 @@ Install the `wheels` CLI. Five minutes. The `wheels` CLI bundles a Lucee runtime — that's the easiest path for development and what the rest of these docs assume. The framework itself runs on Adobe ColdFusion 2023/2025 and BoxLang too; you'll use CommandBox to manage the engine instead of the bundled CLI. See [CFML Engines](/v4-0-0/start-here/cfml-engines/) for the setup. + +