Rhema
Reference

Scripts

Every Bun script in package.json, what it does, and when you'd run it.

Most day-to-day work happens through bun run setup:all and bun run tauri dev. The full table below covers every script in the repository's top-level package.json.

Top-level scripts

ScriptDescription
setup:allFull setup — orchestrator at data/prepare-embeddings.ts (idempotent; pass --force to re-run every phase)
setup:windowsWindows bootstrap — installs LLVM + CMake via winget and persists LIBCLANG_PATH
devStart Vite dev server
buildtsc -b + Vite production build
tauriRun Tauri CLI commands (tauri dev, tauri build)
testRun Vitest tests
lintESLint
formatPrettier (writes to **/*.{ts,tsx})
typechecktsc --noEmit
previewPreview the Vite production build

Data pipeline scripts

ScriptDescription
download:bible-dataDownload the bundled translation archive + cross-references zip
build:bibleBuild SQLite Bible database from the downloaded JSON sources
download:modelExport Qwen3-Embedding-0.6B to ONNX + quantize to INT8
export:versesExport KJV verses to JSON for embedding precomputation
precompute:embeddingsPrecompute embeddings via the rhema-detection Rust ONNX binary (recommended)
precompute:embeddings-onnxSame, but via Python ONNX Runtime
precompute:embeddings-pySame, but via Python sentence-transformers (GPU path)
quantize:modelQuantize ONNX model to INT8 for ARM64 (optimum-cli onnxruntime quantize --arm64)
download:whisperDownload ggml-large-v3-turbo-q8_0.bin for local Whisper STT
download:ndi-sdkDownload NDI 6 SDK headers and platform libraries

Web subsite scripts

ScriptDescription
web:devcd web && bun run dev — runs the marketing + docs Next.js site
web:buildcd web && bun run build — produces the static export
web:startServe the built site locally
web:lintLint the web subdirectory

The web/ workspace itself has its own package.json with dev, dev:no-open, build, start, lint, and postinstall (which runs fumadocs-mdx).

Three flavors of precompute

The three precompute:embeddings* scripts trade off speed and dependency weight:

  • precompute:embeddings — Rust ONNX binary, no Python required at runtime. The default path inside setup:all when no GPU is detected.
  • precompute:embeddings-onnx — Python ONNX Runtime, useful when you want to iterate on the export or debug embeddings.
  • precompute:embeddings-py — sentence-transformers + PyTorch on GPU when one is available; this is the fastest end-to-end on Apple Silicon and CUDA.

When to run what

ScenarioScript
First clonebun install && bun run setup:all
Translation source changedbun run download:bible-data && bun run build:bible
Embedding model bumpedbun run download:model && bun run precompute:embeddings
Need NDI broadcastbun run download:ndi-sdk
Reinstall the Whisper modelbun run download:whisper
Just want to see the UIbun run tauri dev
Cutting a releasebun run tauri build

CI usage

Terminal output of a CI job running setup:all, cargo test, and bun run test in sequence with green checkmarks

A successful CI run on a fresh checkout: setup:all walks the seven phases, cargo test --workspace exercises the Rust crates, then bun run test runs the frontend Vitest suite. Idempotent skip lines appear when artifacts already exist, so subsequent runs are much faster. Click to expand.

The setup pipeline is designed to be CI-safe — every script is idempotent and exits non-zero on real failure (rather than silently skipping). A typical CI job is:

bun install --frozen-lockfile
bun run setup:all
cargo test --workspace
bun run test
bun run typecheck

On this page