Skip to main content

LightBox

PyPI CI Python 3.12+ License: Apache-2.0

English | 简体中文

LightBox is a local-first photo culling tool built for photographers who want to clear out obvious misses quickly without handing their library to the cloud — or risking an accidental delete.

It runs offline by default with zero API keys, pairs RAW+JPEG and Live Photos automatically, and works either as a standalone desktop/web app or inside Claude, Cursor, and Codex through a Skill and MCP server.

Why LightBox

Most photo culling workflows force an awkward trade-off: either scrub through hundreds of burst frames by hand, or upload full shoots to a subscription cloud tool. LightBox keeps everything on your machine and follows three strict rules:

  • Offline first: Sharpness, exposure, closed-eye checks, burst grouping, semantic search, and face clustering all run locally. No account, no cloud upload, no API key required.
  • No hard deletes: LightBox never calls rm or unlink on your photo folders. Moving rejects always requires an explicit approval step, happens as a same-volume move into a Lightbox_Quarantine/ folder, and can be undone in one click.
  • Respect creative intent: Shallow depth of field, panning shots, long exposures, silhouettes, and intentional low/high-key frames are guarded so they are not misflagged as technical mistakes. Borderline shots stay in an uncertain bucket for your own eyes.

Highlights

  • Deterministic culling: Flags camera shake, missed focus, extreme exposure misfires, and closed eyes; groups bursts and recommends the sharpest pick; keeps RAW+JPEG and Live Photo pairs moving together.
  • Reversible quarantine: Drafts a reviewable move plan with safety verification before touching a single file. Restore an entire batch or individual shots whenever you change your mind.
  • Local search, people & shoot insights: Natural-language search and find-similar powered by local SigLIP 2, face clustering and per-person export, plus a shoot digest summarizing technical misses vs. burst duplicates.
  • Optional AI review (Cmd+K / Ctrl+K): When you want a second opinion on borderline frames or want to talk through a shoot, connect OpenAI, Anthropic, Gemini, any OpenAI-compatible endpoint, or local Ollama in the built-in drawer.

Quick Start

Requires Python 3.12+ and uv.

Option 1: Standalone Desktop or Web App

Launch in your browser without cloning the repo:

uvx --from lightbox-cull lightbox ui

Or open the native desktop window:

uvx --from 'lightbox-cull[desktop]' lightbox app

Install permanently and create a system app launcher (macOS ~/Applications/LightBox.app, Windows .lnk, Linux .desktop):

uv tool install 'lightbox-cull[desktop]'
lightbox install-app

Want to try the interface without scanning your own photos? Generate a synthetic shoot and open it directly:

uvx --from lightbox-cull lightbox demo

Optional extras: Add heic (for example, lightbox-cull[desktop,heic]) if you shoot HEIC. On Linux, desktop window mode requires system GTK bindings (python3-gi gir1.2-webkit2-4.1) or PySide6.

Option 2: Use in Claude, Cursor, or Codex

LightBox supports two workflows inside AI clients:

  1. Direct chat culling (zero install) — Load skills/lightbox-cull/SKILL.md in Claude Code, Cursor, or Codex. Drop a handful of photos directly into chat and ask it to spot blurry frames, compare a burst, or pick the best 3 shots. No local LightBox install or MCP setup is needed.
  2. Whole-folder culling (MCP) — Connect the local MCP server to scan full shoot folders, inspect RAW/HEIC/Live Photo pairs, search locally, and draft reversible quarantine plans.

Claude Desktop / Cursor (you can also copy a ready-made snippet from Settings → Use in Claude / Cursor inside the app):

{
  "mcpServers": {
    "lightbox": {
      "command": "uvx",
      "args": ["--from", "lightbox-cull", "lightbox", "mcp"]
    }
  }
}

Claude Code:

claude mcp add lightbox -- uvx --from lightbox-cull lightbox mcp

Codex (~/.codex/config.toml):

[mcp_servers.lightbox]
command = "uvx"
args = ["--from", "lightbox-cull", "lightbox", "mcp", "--transport", "stdio"]

If a GUI client on macOS or Windows cannot find uvx on its PATH, replace "uvx" with the full path printed by which uvx.

Project Layout

LightBox/
├── src/lightbox/          # Core culling engine, SafeFS quarantine, SQLite store, API, CLI & MCP server
├── web/                   # React + TypeScript frontend (built into src/lightbox/web_dist/)
├── skills/lightbox-cull/  # Dual-mode photo culling skill for Claude, Cursor, and Codex
├── benchmarks/            # Synthetic dataset generator and detection accuracy benchmark
├── scripts/               # Static safety checks and scene vocabulary builder
└── tests/                 # Offline unit, API, CLI, and MCP contract tests

FAQ

Does LightBox upload my photos anywhere? No. Scanning, sharpness/exposure scoring, burst grouping, semantic search, and face clustering all run locally. External network calls only happen if you explicitly download an optional local model (SigLIP 2 / InsightFace) or configure an external AI provider in Settings.

Can LightBox permanently delete my originals? No. File deletion APIs are banned across the codebase and checked automatically in CI via ruff (TID251) and scripts/check_no_delete.py. Every quarantine action moves files safely on the same volume after explicit confirmation and keeps a restore manifest.

What formats are supported? Standard JPEG/PNG/WebP, camera RAW formats supported by LibRaw/rawpy (paired automatically with matching JPEGs), Live Photos, and optional HEIC via lightbox-cull[heic].

Development

git clone https://github.com/olioDuan/LightBox.git
cd LightBox
uv sync

# Lint, safety gates, architecture boundaries, type check, and offline tests
uv run ruff check .
uv run python scripts/check_no_delete.py
uv run lint-imports
uv run mypy src
uv run pytest

To rebuild the frontend bundle after editing files under web/:

cd web
npm install
npm run build

License

Apache-2.0. See LICENSE and NOTICE for third-party component and optional model notices.

Metadata

Release files for lightbox-cull 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lightbox-cull 0.1.1
File Size Uploaded Provenance Actions
lightbox_cull-0.1.1.tar.gz 1.2 MB Without provenance Details for lightbox_cull-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lightbox-cull 0.1.1
File Interpreter ABI Platform Actions
lightbox_cull-0.1.1-py3-none-any.whl Python 3 none any Details for lightbox_cull-0.1.1-py3-none-any.whl

Total release size: 2.0 MB

Security for lightbox-cull 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page