Closes #66. `depot status` and `depot get` chose a depot tree on disk with `--target local`, taking the root from `DEPOT_DIR`. One decision, two flags — and `--target local` with no directory anywhere was valid but meaningless. Now they take `--out DIR`, matching the crucible nwsync surface. `--target` names remote backends only (`bunny|cdn`). Passing both exits 64. - `--target local` stays as a deprecated alias for `--out $DEPOT_DIR`, listed in the hidden-alias table in `docs/command-surface.md`. Nothing in `wrappers/` calls depot, but the three repos in `wrappers/consumers.txt` are out of reach from here, so the alias stays. - `status --source` was already unused; it now warns "ignored; use --out DIR" instead of accepting silently. - Fixes a real parse bug found on the way: the documented `depot get <sha> <dest> --target cdn` form never parsed its flags, because Go's `flag` package stops at the first positional. Positionals are split off by hand now; both orders are tested. - Registry usage strings and `docs/command-surface.md` synced — that doc still said depot was unwired. Not converted: `push --source` and `pull --dest`. Neither is `--target local`; one names a read source, the other a remote pull's destination. Say the word if they should become `--out` too. `go test ./...` green. 🤖 Generated with [Claude Code](https://claude.com/claude-code)Reviewed-on: #67 Co-authored-by: vickydotbat <vickydotbat@tutamail.com>
92 lines
4.2 KiB
Markdown
92 lines
4.2 KiB
Markdown
# Crucible command surface
|
|
|
|
`internal/dispatch.Registry` is the single source of truth for Crucible's
|
|
builders, visible commands, descriptions, help, and hidden compatibility
|
|
aliases.
|
|
|
|
## Visible commands
|
|
|
|
| Builder | Command | Purpose |
|
|
| --- | --- | --- |
|
|
| `hak` | `build` | Build configured HAK archives and their manifest. |
|
|
| `hak` | `manifest` | Apply a generated HAK list to module source. |
|
|
| `module` | `build` | Build the module and configured project outputs. |
|
|
| `module` | `extract` | Extract built archives into configured source trees. |
|
|
| `module` | `validate` | Validate project layout, config, and source inventory. |
|
|
| `module` | `compare` | Compare source content with built archives. |
|
|
| `module` | `manifest` | Apply a generated HAK list to module source. |
|
|
| `topdata` | `validate` | Validate topdata source and canonical JSON compatibility. |
|
|
| `topdata` | `build` | Compile topdata and refresh the configured package. |
|
|
| `topdata` | `package` | Package cached outputs into HAK and TLK files. |
|
|
| `topdata` | `compare` | Compare current output with a fresh native build. |
|
|
| `topdata` | `convert` | Convert between 2DA and native JSON/module formats. |
|
|
| `wiki` | `build` | Render wiki page drafts from compiled topdata. |
|
|
| `wiki` | `deploy` | Deploy generated wiki pages to NodeBB. |
|
|
| `assets` | `compile` | Compile ASCII `.mdl` models to binary in place. |
|
|
| `assets` | `convert` | Convert textures to/from NWN DDS (flips vertically). |
|
|
| `assets` | `upscale` | Upscale textures through an installed backend. |
|
|
| `assets` | `check-mdl` | Report uncompiled ASCII `.mdl` and model-name mismatches. |
|
|
| `assets` | `fix-mdl` | Lowercase `.mdl` names and rewrite model identity to match. |
|
|
| `assets` | `check-dupes` | Report runtime-name (basename) collisions across dirs. |
|
|
| `assets` | `clean-dupes` | Delete clean-tree files whose basename collides with primary. |
|
|
| `depot` | `status` | Report referenced-vs-present drift against a backend. |
|
|
| `depot` | `push` | Upload referenced-but-absent blobs from a local depot. |
|
|
| `depot` | `verify` | Existence sweep plus sampled download re-hash. |
|
|
| `depot` | `get` | Fetch one blob with sha re-verify. |
|
|
| `depot` | `pull` | Incremental verified pull of every referenced blob. |
|
|
|
|
`depot status` and `depot get` pick their backend either with `--out DIR`, a
|
|
depot tree on disk, or with `--target bunny|cdn`, a remote backend. The two
|
|
flags are mutually exclusive.
|
|
|
|
## Hidden compatibility aliases
|
|
|
|
Existing scripts may continue using these names indefinitely. They are accepted
|
|
but omitted from routine help and the interactive menu:
|
|
|
|
| Builder | Hidden alias | Implementation |
|
|
| --- | --- | --- |
|
|
| `hak` | `build-haks` | `build-haks` |
|
|
| `hak` | `apply-hak-manifest` | `apply-hak-manifest` |
|
|
| `module` | `build-module` | module-only `build-module` |
|
|
| `module` | `apply-hak-manifest` | `apply-hak-manifest` |
|
|
| `topdata` | `validate-topdata` | `validate-topdata` |
|
|
| `topdata` | `build-topdata` | `build-topdata` |
|
|
| `topdata` | `build-top-package` | `build-top-package` |
|
|
| `topdata` | `compare-topdata` | `compare-topdata` |
|
|
| `topdata` | `convert-topdata` | `convert-topdata` |
|
|
| `depot` | `--target local` | `--out $DEPOT_DIR` on `status`/`get` |
|
|
| `wiki` | `build-wiki` | `build-wiki` |
|
|
| `wiki` | `deploy-wiki` | `deploy-wiki` |
|
|
|
|
`module build-module` deliberately retains its narrower module-only behavior;
|
|
it is not redirected to the broader `module build`.
|
|
|
|
## Global commands
|
|
|
|
```text
|
|
crucible help | -h usage + builder list
|
|
crucible version | -V build version
|
|
crucible list name<TAB>binary<TAB>summary
|
|
crucible config [args] inspect and validate effective configuration
|
|
crucible changelog [args] generate a release changelog
|
|
```
|
|
|
|
## HAK build options
|
|
|
|
```text
|
|
crucible hak build
|
|
[--hak <hak-name> ...]
|
|
[--archive <archive-name> ...]
|
|
[--source-manifest <path>]
|
|
[--content-addressed-root <path>]
|
|
[--plan-only]
|
|
[--quiet|--verbose|--debug]
|
|
```
|
|
|
|
When a source manifest contains `asset_sources`, pass
|
|
`--content-addressed-root <directory>`. Crucible resolves each declared SHA-256
|
|
under `sha256/<first-two>/<next-two>/<full-sha256>` and verifies streamed bytes
|
|
while writing selected HAK archives. Authored `.bmu` files are ordinary assets
|
|
and require no conversion pipeline.
|