# Repository Briefing: hatchlight/hatchlight
> Source: https://repoforai.com/repo/hatchlight/hatchlight (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/hatchlight/hatchlight
- **Official Docs / Website**: https://hatchlight.app/
- **Category**: Voice, Vision & Video (语音 / 视觉 / 视频生成)
- **Primary Language**: TypeScript
- **License**: MIT
- **Engineering Health**: A+ (88/100 · Maintenance 35/35 · Adoption 13/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v0.9.1 (2026-12-04) — https://github.com/hatchlight/hatchlight/releases
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: Docker, MCP, Self-Hosted, Local AI, CLI
- **Momentum**: 22 ★ total (+0 24h / +11 7d) · 7 forks
- **Topics**: `ai-image-generator`, `bun`, `comfyui-alternative`, `desktop-app`, `flux`, `generative-ai`, `image-generation`, `image-to-image`, `local-ai`, `local-first`, `lora`, `mcp`
- **When to Use**: Best for: Creators and small teams that want to benchmark models on their own prompts, reuse local weights, and make the same model choices available through desktop, CLI, and agent tools. Skip if: You need node-level workflow authoring, signed desktop installers, or local inference on an Intel Mac.

## Overview
```text
### Architecture & Core Mechanics
Hatchlight pairs a Tauri desktop application with a React interface built on shadcn/ui, Base UI, prompt-kit, and Tailwind CSS. Both the server and CLI run on Bun. A comparison sends one prompt to several selected models. For local execution, Hatchlight detects the hardware, selects a catalog variant that fits, downloads and verifies the files, and keeps a model loaded between images. Cloud calls go directly to the chosen provider using the user's key.

The repository separates application code under `apps/` from shared packages under `packages/`; the Docker engine stage reads the engine catalog from `packages/providers/src/engines.ts` and uses the tar utility in `packages/core/src/local/tar.ts`. Integration happens at the interface level: MCP exposes tools such as `check_consistency` to agents, while OpenAI image and AUTOMATIC1111 compatibility connect existing image clients. The desktop, CLI, and integrations can all use named character and style assets.

### Key Capabilities & Differentiators
The local catalog covers SDXL, FLUX, and Z-Image for generation, Qwen-Image-Edit and FLUX.2 klein for instruction-based editing, Wan 2.1 and 2.2 for text- or first-frame-driven video, and Real-ESRGAN for 4× upscaling. Many catalog entries offer 16-, 8-, or 4-bit variants. Images can be reused for reference-driven generation, masked repainting, or outpainting. Guided Z-Image Turbo can detect outlines locally, but local pose and depth guidance require a prepared map; the fal route can derive one from a photo.

Cloud adapters cover fal, Replicate, OpenRouter, OpenAI, and Google Gemini. Side-by-side results show elapsed time and cost; blind votes in the app or via `hatchlight rank` build a ranking with median time and cost. `hatchlight prefer` lets users choose the default explicitly. Named characters and styles let users reuse references and LoRAs across interfaces. SDXL LoRA training adds captioning, sample previews, and the option to keep an earlier training step.

### Trade-offs & Limitations
Hatchlight is a better fit for selecting models than for building the node graphs that make ComfyUI useful. It also offers a broader comparison interface than simply pointing an existing client at an AUTOMATIC1111 endpoint. Compatible model directories from ComfyUI or AUTOMATIC1111 can be reused in place, making side-by-side adoption practical; that does not imply workflow or extension portability.

Local inference avoids per-call provider charges and keeps inputs on the machine, but requires VRAM and storage. Roughly 8 GB of VRAM covers quick models such as SDXL Turbo, while 4–6 GB is enough for SD 1.5 and the smallest Z-Image Turbo variant; these are not video or training estimates. LoRA training requires Windows or WSL and an NVIDIA GPU with 12 GB of VRAM. The local assistant is Windows-app-only, and local prompt translation and improvement are limited to Windows and WSL. Cloud inference trades those local hardware constraints for provider charges and external processing. The MIT code license does not override individual model terms.

### Hardware & Deployment Guide
Desktop installers are available for Windows, macOS, and Linux, but are unsigned. Windows supports local CUDA, ROCm, Vulkan, and CPU paths; WSL uses the Windows engines. Apple Silicon uses Metal, Intel Macs are cloud-only, and native Linux supports NVIDIA CUDA or CPU, with less validation on real machines. Source installation uses Bun 1.4 or newer: `bun install`, `bun run build`, then `bun run start`, which opens `http://localhost:4096`. Provider credentials can be saved in the app or exported in the environment; the desktop app does not read `.env`.

Local generation can run offline after downloads. For shared use, the Dockerfile pins its Bun and CUDA 12.8.1 runtime base images by digest, and the engine stage installs catalog-selected Linux engines under `/opt/hatchlight/engines`. The NVIDIA-oriented deployment provides accounts and private galleries. `HATCHLIGHT_DATA_DIR` and `HATCHLIGHT_MODELS_DIR` let operators relocate data and model weights separately. The v0.9.0 release added guided terminal setup and broader LoRA support; v0.9.1 focused on interaction fixes and polish.
```

## Key Capabilities
```text
- Model selection: Compare outputs from one prompt, vote blind, and rank models alongside median time and cost.
- Local inference: Select a hardware-appropriate catalog variant, verify downloads, and keep the model loaded between images.
- Editing and video: Use a generated image for masked edits, reference-driven generation, or first-frame Wan video.
- Asset reuse: Read compatible checkpoints and LoRAs in existing model directories without copying them.
- Integration: Use CLI and MCP for automation, or OpenAI-compatible image and AUTOMATIC1111-compatible APIs for existing clients.
- Self-hosting: Run the NVIDIA-oriented Docker server with user accounts and separate galleries.
```

## Quick Start / Clone
```bash
git clone https://github.com/hatchlight/hatchlight.git && cd hatchlight
bun install
bun run build
bun run start
```
