Skip to content

CLI & Config

The dh command-line tool compiles, validates, and watches your pallets.

CommandDescription
dh buildCompile all pallets (default if no command given)
dh watchWatch for changes and auto-compile
dh validateValidate pallets without writing output
dh cleanClear the .dh/ cache directory
dh initInitialize a new workspace
dh helpShow available commands
FlagShortWorks withDescription
--verbose-vbuild, watch, validate, cleanShow detailed output (Blender logs, file-level progress)
--clean-cbuild, watchClear cache before building

Example:

Terminal window
dh build --verbose --clean

dh watch monitors your Pallets/ directory and recompiles when files change.

Debounce: waits for changes to settle before compiling (default: 1000ms, configurable via watchDebounceMs).

Manual controls:

KeyAction
Space, Enter, R, CTrigger manual compile
Q, Ctrl+CExit watch mode
Building io.mltn.mltn-mayu...
✓ Parsing definitions
✓ Validating references
✓ Processing textures
✓ Converting models
✓ Bundling assets
✓ Writing output
Build succeeded in 1.2s
Building io.mltn.mltn-mayu...
✓ Parsing definitions
✗ Validating references
Error in io.mltn.mltn-mayu/avatar.dh-avatar:12:5
Missing required property 'name' in material definition
10 | "materials": {
11 | "body": {
> 12 | "diffuseTexture": "textures/body.png"
| ^
13 | }
14 | }
Build failed with 1 error

Lives in your workspace root. All properties are optional — omit them to use defaults.

PropertyTypeDefaultDescription
workspaceRootstring?Documents/DigitalHeavenWorkspace root directory
palletsDirectorystring?{workspaceRoot}/PalletsSource pallets location
buildDirectorystring?{workspaceRoot}/BuildCompiled output location
cacheDirectorystring?{workspaceRoot}/.dhCache directory
watchDebounceMsint?1000Milliseconds to wait before auto-compiling
additionalPalletPathsstring[][]Extra paths to search for pallets (cross-pallet refs)
blenderPathstring?auto-detectPath to Blender executable

Example:

dh-config.jsonc
{
"watchDebounceMs": 500,
"additionalPalletPaths": [
"D:/SharedPallets"
],
"blenderPath": "C:/Program Files/Blender Foundation/Blender 4.0/blender.exe"
}

What dh build does under the hood:

  1. Parse — Read all JSONC/.dh-* definition files
  2. Validate — Check schemas, references, types, inheritance chains
  3. Process textures — Channel packing, extraction, and resize from dh.texture definitions and @channel references
  4. Convert models — FBX → GLB via Blender (cached by content hash)
  5. Bundle — LZ4-compress assets into the output pallet
  6. Output — Write compiled .pallet file to Build/