Skip to main content

HST Command Reference

Run HST through the application lockfile:

npx hst version
npx hst --help
npx hst <command> --help

Global Options​

OptionPurpose
--helpPrint command-specific help
--versionPrint version information
--verboseEnable verbose HST logging

Environment and Project Configuration​

CommandPurpose
versionPrint the HST version
doctor [--fix]Check the project and toolchain; optionally repair supported installation problems
env checkCompatibility alias for environment checks
env fixApply supported environment repairs
env prepare-gitignoreAdd supported generated/secret paths to .gitignore
config showShow the npm compiler declaration and resolved version, or legacy configuration when no npm compiler is declared
config setUpdate legacy configuration; npm compiler versions use compiler:install <version> or npm
config wizardConfigure a legacy compiler installation interactively
secrets:initCreate .secrets from .secrets.example when absent
secrets:listList secret keys without values
secrets:checkCompare .secrets with its template
secrets:execRun a command with .secrets loaded into its environment

Examples:

npx hst doctor
npx hst config show
npx hst secrets:check
npx hst secrets:exec -- npm run build

Target Discovery​

CommandPurpose
target:list [platform]Discover Roku devices and simulator presets
device:list [--type <type>] [--json]Combine Roku discovery with .hosanna-tools/devices.json preferences
npx hst target:list
npx hst device:list

Run​

hst run [platform] [env] [target] [deviceSelector]

HST run-plan resolution from configuration layers and CLI selectors through config generation, build, and target executionHST run-plan resolution from configuration layers and CLI selectors through config generation, build, and target execution

Important options:

OptionPurpose
--device <selector>Select a Roku IP, saved device name, or simulator preset
--app <key>Select an app/flavour from run configuration
--profile <name>Add a build-config developer profile
--app-config <selector>Select runtime AppConfig
--reuseReuse a matching HST session
--replaceReplace a conflicting session or occupied device resource
--lastReuse the last interactive destination
--no-openDo not open the browser
--no-buildSkip the platform build for device runs
--no-logsDo not stream device logs
--dry-runPrint the resolved run plan without executing it
--explainInclude configuration-source details in text plan output
--format text|jsonSelect plan/result format
--non-interactiveFail instead of prompting
--hsconfig <path>Select an explicit Roku hsconfig
--hsc-project <path>Select an explicit Roku compiler project
--build-cmd <command>Override the package-bundle or emulator dev command; HST parses executable and arguments once and does not invoke a shell

Port overrides are --vitePort, --managementPort, --webAppPort, --deviceAppPort, and --extensionPort.

Without an override, desktop preview resolves the host application's own Vite executable and passes the selected --config plus --port as structured arguments. An emulator --build-cmd override owns those config and port arguments itself; HST executes the parsed vector exactly and never interpolates it through a shell.

Examples:

npx hst run browser dev emulator
npx hst run roku dev device --device "living room"
npx hst run roku prod device --app client4 --dry-run --explain

Build​

hst build [platform] [env] [target] [deviceSelector]

build shares platform, environment, target, device, app, profile, AppConfig, config-selection, dry-run, and output-format options with run. It does not launch, deploy, open a browser, or stream logs. The Browser emulator build-only plan resolves build inputs; use the host application's Vite build script to emit a simulator preview.

npm run build:browser
npx hst build roku prod device --hsc-project platforms/hsconfig-roku.prod.json

Use the application debugger and Roku logs for device validation. Capture hardware footage through a configured capture card or display source.

Build Config​

CommandPurpose
build-config:resolveResolve tracked, secret, platform, environment, and profile overlays
build-config:restore-secretsRestore ignored overlays from BUILD_CONFIG_SECRETS_*_BASE64 variables

build-config:resolve options:

OptionPurpose
--env <name>Environment; falls back to HS_ENV or HOSANNA_BUILD_ENV
--platform <name>Platform; falls back to HS_PLATFORM or HOSANNA_BUILD_PLATFORM
--profile <name>Optional developer profile; falls back to HS_BUILD_PROFILE
--allow-profile-in-prodExplicitly permit a developer profile in production
--out <path>Write resolved JSON
--manifest-out <path>Write a sanitized source manifest
--format jsonPrint JSON to stdout
--explainPrint sources without secret values

AppConfig​

CommandPurpose
app-config:resolveResolve an AppConfig file and root-level $extendFile inheritance

Options are --input, --cwd, --expression, --platform, and --out.

npx hst app-config:resolve --expression tv --platform roku
npx hst app-config:resolve --input app.config.roku.json --out /tmp/app-config.json

Code and Asset Generation​

CommandPurpose
generate:allGenerate structs and command-handler maps
generate:structs [files...]Generate structs for selected files or the project
generate:cleanRemove generated output managed by HST
generate:9patchGenerate 9-patch assets
game:prep-level <input>Normalize Tiled JSON to the canonical Hs2d runtime subset

Compiler, SDK, and Framework​

CommandPurpose
compiler:install [version]With a version, save the npm compiler dependency and lockfile; without one, repair the project-selected compiler
compiler:status [--format text|json]Report selected and installed compiler state and the resolved executable
compiler:list [--format text|json]List public npm versions, the project dependency, installed versions and legacy pins/cache
sdk:installIntegrate the declared npm framework package and repair its source links
sdk:migrate --replace-existingMigrate old framework settings, scripts and SDK directories to the installed npm package
template:create [directory] --template <kind>Create app, app-mvvm, game, library or component-library, install dependencies and run the template's setup script. The default kind is app.

The original four bundled starters were introduced in Tools 5.1.0. Tools 5.2.0 expands the default app starter with navigation, content rails, details and local demo playback, and adds the equivalent app-mvvm starter. These starters use SDK 2.0.4 and declare the compiler as an npm dependency. Pin the creator version when starting a project so an older installed command cannot select the retired Git template flow. The examples below require Tools 5.2.0 and SDK 2.0.4 to be published on npm; use reviewed local builds of both packages until then.

Create a new app without installing a global HST:

npx --yes --package @tantawowa/hosanna-tools@5.2.0 hst template:create my-app --template app

For the same app with observable view models bound to its views:

npx --yes --package @tantawowa/hosanna-tools@5.2.0 hst template:create my-mvvm-app --template app-mvvm

All five starters are included in the npm package. Choose a new destination; the command does not overwrite an existing application. Pass --no-install to write the starter without installing dependencies or running its setup script. Pass --no-git to skip Git initialization. The app, game and component-library starters install the platform compiler with their dependencies; browser development does not execute it. The source-library starter accepts a compiler path for its optional Roku check. No compiler license key is required.

After --no-install, finish setup inside the new app:

npm install
npm run setup

The app and app-mvvm starters include the same local catalogue, artwork and one credited Sintel demo trailer shared by all catalogue entries. They have identical screens, controls, setup and development commands. In app-mvvm, HsViewModel classes own screen state and commands, and views bind to them through the public framework API. Each README covers its architecture, replacing the demo content and running the same optional test:ui browser journey. Browser testing requires a separately installed Chromium binary; it does not require the Hosanna compiler.

See Getting started for the complete browser, IDE and Roku workflow.

Tools 5 removes framework source-mode selection, Git and Keygen framework installers, fork synchronization, and framework:update. Use npm to change framework versions, then run sdk:install. See Framework installation with npm.

Legacy licensing​

CommandPurpose
license:activate <key>Validate and store a compiler license key
license:statusValidate the stored key and print entitlements

These commands remain for older Keygen installations. Public npm compiler releases do not require a license key, machine activation or either command. Follow Compiler and tool setup to migrate.

Roku​

CommandPurpose
roku:runDeploy an app zip or folder
roku:command <command>Send an app command through ECP
roku:packagePackage and sign a channel with roku-deploy
roku:map-stackMap BrightScript stack/compile locations through .brs.map files
ci:extract-pkg-key <pkg>Extract a Roku signing key as base64 for CI storage
complib:packagePackage built standalone component-library output
complib:serveServe component-library archives for an on-device development loop

Use hst run roku ... for normal development. Use the lower-level commands for explicit pipeline steps.

Debugger and MCP​

CommandPurpose
debugger:startStart the command-debugger WebSocket proxy
mcp:startStart the Hosanna MCP server
mcp:stopStop the server represented by the MCP lock/PID file
dev:startRun configured local Vite, generator-watch, and optional debugger processes

Capture and RASP​

CommandPurpose
rasp:capture <name>Record input and export a RASP script
rasp:export <captureId> <name>Export a saved input capture as RASP YAML
rasp:validate <file>Validate RASP grammar without a device
rasp:run <file>Execute a RASP script against a connected app

Hosanna UI regression tests run through application-owned Vitest scripts. There is no hst test:ui command and no generic debugger test command.

Talk to us