Skip to content

Repository files navigation

LocalHub

LocalHub is a personal local-AI Hub for one Operator. Its destination is a browser workspace where the Operator can chat with swappable local models, change configurations, use tools, generate images, and turn successful usage into reproducible experiments without surrendering control to a hosted service.

LocalHub follows one rule throughout: use excellent upstream software instead of rebuilding it. Open WebUI owns the browser chat experience, llama.cpp and ComfyUI own inference, and standard MCP or OpenAPI servers own tool implementations. LocalHub owns the connective layer: model acquisition, process lifecycle, Named Configurations, Model Transformations, tool policy, Response Provenance, and experiment evidence.

Status

The repository currently contains a working v0.2.0 experiment foundation, not the finished browser Hub.

Working today:

  • human-readable experiment definitions;
  • Get → Build → Run → Test → Serve orchestration;
  • verified artifacts and pinned upstream dependencies;
  • bounded subprocess execution and JSON lab records;
  • a Qwen GGUF experiment through llama.cpp; and
  • a CAD image experiment through Diffusers and a pinned ComfyUI GUI.

Specified but not yet implemented:

  • pinned Open WebUI as the Hub Interface;
  • a LocalHub OpenAI-compatible control plane;
  • Qwen3.8-27B Q4_K_M through pinned llama.cpp;
  • Named Configurations exposed in Open WebUI's model picker;
  • per-response provenance for permitted browser overrides;
  • text-to-image generation inside a Conversation; and
  • later Tool Gateway, local quantization, and authenticated LAN access.

See the roadmap for the delivery order.

First Hub milestone

The first milestone is deliberately localhost-only. It is complete when the Operator can open Open WebUI, chat with Qwen3.8-27B, switch Named Configurations, change permitted generation settings, ask for an image in ordinary language, see that image inline, and retain Conversation History across a restart.

LocalHub will bootstrap this milestone from the official Qwen3.8-27B Q4_K_M GGUF with exact provenance. Producing a LocalHub-derived quantization remains the first Model Transformation, but it is deferred until the machine has enough safe disk headroom for source weights, an intermediate BF16 GGUF, and derived variants.

Current experiment CLI

Requirements:

  • Bun 1.3.14 or newer
  • llama.cpp commands llama-cli, llama-bench, and llama-server on PATH for the text experiment
  • uv and Apple Silicon with Metal for the CAD experiment

Install dependencies:

bun install --frozen-lockfile

Run the current text experiment:

bun run src/cli.ts reproduce experiments/qwen2.5-0.5b-instruct-q4_0.yaml

Run one stage explicitly:

bun run src/cli.ts get experiments/qwen2.5-0.5b-instruct-q4_0.yaml
bun run src/cli.ts build experiments/qwen2.5-0.5b-instruct-q4_0.yaml
bun run src/cli.ts run experiments/qwen2.5-0.5b-instruct-q4_0.yaml
bun run src/cli.ts test experiments/qwen2.5-0.5b-instruct-q4_0.yaml

Serve its upstream OpenAI-compatible endpoint:

bun run src/cli.ts serve experiments/qwen2.5-0.5b-instruct-q4_0.yaml
curl http://127.0.0.1:8080/v1/models

Every action writes an ordinary JSON record under .localhub/results/. Records include the experiment definition and digest, source and artifact identity, exact command, tool version, hardware, duration, bounded output, measurements, and output identities.

Current CAD experiment

Prepare and open its pinned upstream ComfyUI workflow:

bun run src/cli.ts get experiments/cad-photoreal-v0/experiment.yaml
bun run src/cli.ts serve experiments/cad-photoreal-v0/experiment.yaml

ComfyUI opens at http://127.0.0.1:8188. This workflow is a CAD image-to-image experiment; it is not the generic text-to-image workflow required by the first Hub milestone.

The synthetic fixture retained all visible source edges within the declared tolerance. That result measures visible 2D edge retention only. It is not evidence of BIM, dimensional, material, or hidden-geometry fidelity.

See the CAD instructions for its exact workflow.

Build the current CLI

bun run build
./dist/lh --help

Canonical design

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages