← All work2026 · Desktop · AI Agents · Data

KLDH262

Local-first desktop library for AI-generated images — indexes in place, never moves a file.

RoleSolo design & build
StackElectron 33 · React 18 / 19 · TypeScript
Year2026
Tests32

The problem

A folder of ten thousand AI generations named 00042_.png is write-only memory. KLDH262 indexes those folders in place — never moving or copying a file — by reading the generation metadata that ComfyUI, Automatic1111, and Civitai embed in each image: prompt, negative prompt, seed, steps, sampler, checkpoint, and the full LoRA stack.

All derived data — tags, ratings, characters, albums — lives in one JSON catalogue outside the image folders. No account, no server, no telemetry.

Hand-rolled binary parsers

The metadata layer reads PNG tEXt/iTXt/zTXt chunks directly, walks ComfyUI's node graph backward from the sampler through the LoRA chain to the checkpoint, and parses A1111 parameter blocks from both PNG text and EXIF. On a real mixed library it recovers a full generation record for roughly 96% of files.

Small ML, no cloud

Two features most apps would ship as API calls are computed locally. A naive-Bayes-style 18+ classifier learns from the user's own labels — combining prompt terms, LoRA identity, and a skin-chroma histogram — and deliberately under-calls, because a human confirms each batch. "Find more like these" builds a TF-IDF centroid over prompt terms, LoRA overlap, and color composition, on the argument that for synthetic images the generation record is a stronger signal than any face embedding.

Duplicate detection uses two distinct perceptual hashes for two distinct questions: a 64-bit difference hash for "is this the same picture" and a color signature for "does this look alike".

Engineering discipline

The renderer has no filesystem or network access at all: 51 named IPC channels, media served over a custom protocol addressed by ID so no path ever crosses the boundary, and API tokens encrypted via the OS keychain. State lives in a 1,000-line pure reducer handling 107 action types with no Date.now() or Math.random() inside — React StrictMode's double-invoke is a true no-op.

Zero native modules — image decoding, thumbnailing, and hashing all go through Chromium — so CI builds installers for Windows, Linux, and macOS from one codebase with nothing to compile.

Built with

Every technology this project runs on, and the job it does here. Each one links to the other projects it appears in.

By the numbers

~96%Metadata parse rate
51Locked-down IPC channels
107Reducer action types
4Runtime dependencies
32Unit tests, 3-OS CI
9 + 18Screens + overlays