Eric Wagoner 9897da7f82 Review stage: resumable rich TUI for matches and versions
Prompt loop over ambiguous/unmatched rows: pick a candidate (table with
owned/rank), skip, reject, enter a manual BGG id, or free-text re-search
via the cached client. Approvals attempt version resolution from the
title's edition cues, degrading to version_unknown when the API is
unreachable (no token yet). Optional, skippable version pass for
version_ambiguous rows. Every decision rewrites matches.csv atomically,
so q/Ctrl-C/EOF mid-session loses nothing. Tests drive the loop with
scripted input against a synthetic matches.csv and the fixture cache.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-01 13:13:20 -04:00

bggpipe — Shelf-to-BoardGameGeek Collection Pipeline

Photograph your board game shelves. End up with your whole collection — including which edition of each game you own — cataloged on BoardGameGeek.

photos/ → [1 extract] → titles.json → [2 resolve] → matches.csv
        → [3 review] → matches.csv (approved) → [4 diff] → to_add.csv
        → [5 upload] → upload_log.csv
        → [6 enrich] → games.json

Status: pre-release. The design is complete (full spec); the code is being built. Nothing below works yet.

Why this exists

BGG has no bulk import and no write API. Cataloging a few hundred games by hand means hours of searching, clicking, and second-guessing which of five editions you own. This pipeline replaces that with: take photos, run a command, resolve a handful of ambiguous matches in a review step, done.

How it works

  1. extract — Shelf photos go to the Anthropic API (Claude vision), which reads game titles off spines and boxes along with edition cues: publisher, edition wording, print year, language.
  2. resolve — Titles are matched to BGG game IDs via the XML API2 (exact + fuzzy matching, popularity tiebreaks), then edition cues are matched against BGG's version list for each game. Anything uncertain is flagged rather than guessed.
  3. review — A local review step for ambiguous matches: pick the right game/version, or leave the version blank. Wrong guesses never reach your collection.
  4. diff — Your existing BGG collection is fetched and compared, per copy (owning one edition of a game doesn't hide a second edition you also own).
  5. upload — A Playwright browser session logs into your BGG account and adds each game — with its version, when known — politely and slowly, with dry-run mode, per-game logging, and resumability.
  6. enrich — Full metadata for every game (designers, player counts, weight, rank, mechanics, artwork URLs, version details) lands in data/games.json, ready to power whatever you build next.

Every stage is idempotent and resumable: kill it mid-run, restart, lose nothing. All artifacts are flat CSV/JSON files you can inspect and edit.

Requirements

  • macOS or Linux, Python 3.12+, uv
  • An Anthropic API key (vision extraction)
  • A BoardGameGeek account and a registered BGG application — as of BGG's 2025 API policy, the XML API requires a Bearer token from a registered app. Register a free non-commercial application at boardgamegeek.com/applications (approval can take a week or more — apply early), then create a token. Each user needs their own — tokens must not be shared.
  • Playwright Chromium: uv run playwright install chromium

Secrets come from environment variables only — ANTHROPIC_API_KEY, BGG_USERNAME, BGG_PASSWORD, BGG_API_TOKEN — and are never written to disk or logs.

A note on being a good BGG citizen

This tool is not affiliated with or supported by BoardGameGeek. It uses only the sanctioned XML API2 for reads (with your own registered application token, per BGG's current policy) and drives the regular website for writes, deliberately slowly (one request every couple of seconds, slower for uploads). Please keep it that way: BGG is a community resource running on community goodwill. You are responsible for your own account — review the dry-run output before a real upload.

License

MIT — see LICENSE.

S
Description
CLI and local browser pipeline for cataloging board game shelves into a BoardGameGeek collection: shelf photos → Claude vision title extraction → BGG XML API matching → human review → automated bulk upload.
Readme MIT 2.7 MiB
Languages
Python 84.9%
HTML 9.9%
CSS 4.5%
JavaScript 0.7%