Skip to main content

1. Construct the facade

main.ts
initialize() is single-phase here: one call, no second services phase to await.

2. Generate text

3. Stream it

The stream emits started, textDelta / reasoningDelta, toolCallAdded / toolArgumentsDone, usage, then exactly one terminal completed, failed, or cancelled. Electron is the only SDK with a cancelled terminal event.

4. Reach it from the renderer

The preload exposes the same facade as window.runanywhere, so page code calls the identical methods without importing a native addon.
renderer.ts
Input constructors come along for the ride, which is what lets renderer code build the same values main-process code builds:

5. Download a model with progress

Electron is the only SDK where a download can be paused and resumed.

6. Add speech

Verify it is really running locally

capabilities() is generated from packaging facts about the linked addon, not from namespace presence. On Windows ARM64 you will see qhexrt alone; on x64 and macOS you will see llamacpp, onnx, and sherpa.

Next

Configuration

Models, storage, logging, auth

Installation

Processes and packaging