bggpipe init: guided, idempotent first-run setup

One command replaces the clone-era checklist: creates photos/ and
data/, writes a default config.toml, prompts for the four credentials
with hidden input (appended to a 0600 .env, only the missing ones,
values never echoed), and offers the one-time Chromium download.
Re-runs report status and fill gaps; without a TTY it reports instead
of hanging. Groundwork for any future publishing path — PyPI or a
bundled app both need exactly this wizard.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Eric Wagoner
2026-08-02 16:56:28 -04:00
parent 10f65d8aba
commit bf9795235a
5 changed files with 336 additions and 4 deletions
+4 -3
View File
@@ -39,11 +39,12 @@ Every stage is idempotent and resumable: kill it mid-run, restart, lose nothing.
```sh
git clone https://git.kestrelsnest.social/eric/bggpipe.git
cd bggpipe
uv sync # installs Python deps
uv run playwright install chromium # browser for the upload stage
cp .env.example .env # then fill in your keys
uv sync # installs Python deps
uv run bggpipe init # guided setup: folders, credentials, browser download
```
The `init` wizard is idempotent — re-run it anytime to check status or add keys you skipped. It prompts for the credentials below (hidden input, saved to a `.env` it creates with owner-only permissions) and offers the one-time Playwright Chromium download. Prefer doing it by hand? `cp .env.example .env`, fill it in, and run `uv run playwright install chromium` yourself.
Secrets live in environment variables only, never in config files, code, or logs. `.env` is gitignored. If you use [direnv](https://direnv.net/), the committed `.envrc` loads `.env` automatically after a one-time `direnv allow`; otherwise export the variables yourself (e.g. `set -a; source .env; set +a`).
| Variable | Used by | What it is |