Skip to main content

Installation

Pre-built binaries​

Download a pre-built binary from the GitHub releases page. Choose the archive for your platform (Linux, macOS, Windows) and architecture, extract it, and put the bhaus-util binary on your PATH.

macOS​

# Apple Silicon (arm64)
curl -L https://github.com/sjsone/bhaus-util/releases/latest/download/bhaus-util_macos_arm64.tar.gz | tar xz -C /usr/local/bin

# LEGACY Intel (amd64)
curl -L https://github.com/sjsone/bhaus-util/releases/latest/download/bhaus-util_macos_amd64.tar.gz | tar xz -C /usr/local/bin

Linux​

# x86_64 / amd64
curl -L https://github.com/sjsone/bhaus-util/releases/latest/download/bhaus-util_linux_amd64.tar.gz | sudo tar xz -C /usr/local/bin

# ARM64
curl -L https://github.com/sjsone/bhaus-util/releases/latest/download/bhaus-util_linux_arm64.tar.gz | sudo tar xz -C /usr/local/bin

Windows (WSL)​

# x86_64 / amd64
curl -L https://github.com/sjsone/bhaus-util/releases/latest/download/bhaus-util_v0.0.1_windows_amd64.zip -o bhaus-util.zip && unzip -o bhaus-util.zip -d /usr/local/bin && rm bhaus-util.zip

# ARM64
curl -L https://github.com/sjsone/bhaus-util/releases/latest/download/bhaus-util_v0.0.1_windows_arm64.zip -o bhaus-util.zip && unzip -o bhaus-util.zip -d /usr/local/bin && rm bhaus-util.zip

From source​

Build the CLI from source. You will need Go 1.27 or newer and git.

Clone and build​

git clone https://github.com/sjsone/bhaus-util.git
cd bhaus-util
go build -o bin/bhaus-util ./cmd/bhaus-util

This produces a single bhaus-util binary at bin/bhaus-util. Put it on your PATH or reference it with a relative path for the rest of this guide.

Verify it works​

./bin/bhaus-util help
bhaus-util — tooling for the BHaus modelling language

Parses .bhaus files into a typed AST. It drives everything built on top of
that: the editor language server, linting and target-language scaffolding.

Usage:
bhaus-util <command> [flags] [arguments]

Commands:
ls Run the language server over stdio (started by editors, not humans)
lint Check a .bhaus file for problems
scaffold Generate rough target-language source from .bhaus declarations
help Show this message or "help <command>" for one command's details

Examples:
# See what a command expects
bhaus-util scaffold --help

# Generate Go from a model and print it to stdout
bhaus-util scaffold go domain/user.bhaus

# Generate TypeScript for every .bhaus file into a directory tree
bhaus-util scaffold typescript --out-dir ./gen domain/*.bhaus

Scaffold languages: [go php typescript] (plus any YAML defs found in --template-dir).

Run "bhaus-util <command> --help" for flags, defaults and per-command examples.

ls starts the language server over stdio. The two commands you will use directly are lint and scaffold.