HQL CLI

The hql command runs, compiles, scaffolds, builds, and packages HQL code.

Quick Reference

CommandPurpose
hql run <target.hql|expression>Run a file or expression
hql watch <target.hql>Re-run a file when it changes
hql compile <target.hql> -o <target.js>Compile to JavaScript
hql new <path> --mobile|--webScaffold a mobile or web project
hql dev [path]Run a project dev loop
hql build ios|android|web [path]Build an app target
hql build [path] --target jsr|npm|allBuild package artifacts
hql init [path]Initialize a package
hql check [path]Validate a package
hql pack [path]Build package artifacts
hql publish [path]Publish package artifacts
hql add [path] <specifier>Add a dependency
hql remove [path] <name>Remove a dependency
hql install [path]Install dependencies
hql update [path] [name]Update dependencies
hql info <specifier>Inspect a dependency specifier
hql config [path]Print package config
hql config write [path]Write normalized package config
hql explain <CODE>Explain an HQL diagnostic

Run

hql run hello.hql
hql run '(+ 1 2)'
hql run hello.hql --typecheck=strict
hql run hello.hql --typecheck=warn
hql run hello.hql --typecheck=off

Files run for side effects. Expression input prints the expression result.

Compile

hql compile hello.hql -o hello.js
hql compile app.hql -o app.js --pure
hql compile app.hql -o app.js --react-dom
hql compile app.hql -o app.js --react-native

--pure enables pure-mode import trust checks. React compile targets lower HQL element syntax for the chosen platform.

Watch

hql watch app.hql

The watch command keeps a warm compiler process resident and re-runs on save.

Web And Mobile

hql new ./app --web --yes
hql dev ./app --dry-run
hql build ./app --dry-run
hql new ./mobile --mobile --yes
hql run ios ./mobile --dry-run
hql build android ./mobile --dry-run

Use --dry-run on project commands when you want to inspect generated work without launching a toolchain.

Packages

hql init ./my-lib --name @example/my-lib --version 0.1.0
hql check ./my-lib
hql config ./my-lib
hql config write ./my-lib
hql build ./my-lib --target all
hql pack ./my-lib --target all
hql publish ./my-lib --dry-run

See Packages for package config, dependency syntax, and distribution boundaries.

Diagnostics

hql explain HQL3008

Use Errors when a diagnostic points to a code.

Verification

This page is snapshot-checked against the real CLI help text so command names and usage strings do not silently drift from hql/src/hql/cli.ts.