// OPENBOX DOCS
Library Setup Center
Guided first-run setup with non-destructive scan previews, candidate resolution, and safe commits.
The Library Setup Center (#setupLibraryButton) provides a safe, guided workflow for importing games, checking emulator readiness, and resolving multi-platform ambiguities before altering your library.
Workflow Stepper
The stepper runs eight stages: Overview, Sources, Scan, Decisions, Readiness, Options, Confirm, Finish.
- Overview: Reviews library health and recommends the next step.
- Sources: Choose game directories, ROM folders, or installed storefronts (Steam, Heroic, Lutris, Faugus).
- Scan: OpenBox performs a read-only inspection (
POST /api/v2/setup/preview), generating a transient preview document identified bypreview_idatrevision1. The scanner reports discovered files and highlights items needing your decision. - Decisions: Review items in batches (
GET /api/v2/setup/preview/itemswith thepreview_id/revisioncursor), inspect version candidates and per-candidateemulator_choices, resolve ambiguities, and set platform overrides via decisions. The items cursor is bound to one preview revision — a stale cursor stops withPREVIEW_STALE. - Readiness: Launch Doctor preflight checks (
POST /api/v2/launch/preflightfor one game,POST /api/v2/launch/preflight/batchfor many;routes.py:260-261) flag missing emulators or missing BIOS files with one-click fix buttons. - Options: Set metadata, media, region, and import behavior for the commit.
- Confirm: Optionally Revalidate preview (
setup.revalidate) to re-scan sources against the current library — this bumps the previewrevisionand marks it revalidated — then Continue commits the reviewed plan (POST /api/v2/setup/commitwithpreview_id,revision, and decisions). All imported items are tagged with animport_batch_idfor easy filtering. - Finish: Shows a completion summary (added, merged, skipped, unmatched, media/launch readiness, warnings, failed) with actions to view imported games, review unmatched metadata, fix launch blockers, or open the Activity Center.
Safe by Design
- Previews are side-effect free and never mutate
library.jsonuntil committed. - Stale-preview guards (
PREVIEW_STALE) prevent race conditions if underlying files change during review. - Existing games are matched by canonical identity hashes, preventing duplicates.