You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
lpb-docs
committed
refactor(setup): unified initial setup wizard for all modes
The first-boot configuration was three fragmented, mode-dependent
mechanisms: a host prompt (ssh/web only), an in-container wizard
(first boot only, TTY-dependent) and one-shot env passthrough. Errors
were swallowed (start.sh '||' + .initialized touched anyway), a 401 on
the keyless /models probe killed non-interactive setup even when the
key was correct, and nothing ever validated credentials before pi ran.
Now there is ONE wizard (localpibox.setup) for every mode:
lpb setup host-side wizard: config repo -> server URL -> API key
-> default model -> lpb-memory (full memory wizard: mode,
transport, background model, limits). Every step is
validated with live HTTP probes; failures loop with the
raw error visible ('a' = start anyway, flagged; 'q' =
abort, nothing written). Writes auth.json/settings.json/
lpb-memory-config.json directly into the state dir, so
configuration is persisted BEFORE first use.
lpb doctor read-only checklist (repo, settings, creds, live probe,
runtime, image).
preflight before EVERY fresh start (cli/shell/ssh/web): healthy
provider -> silent; missing/broken + TTY -> wizard;
non-TTY -> env passthrough + visible note. Validation is
live, so a moved server / changed key re-offers the wizard
instead of going silently stale.
lpb-config setup/check/memory setup delegate to the same wizard;
start.sh keeps only the infra bootstrap and a non-interactive
fallback with a prominent failure banner + every-boot reminder.
Also: probe is auth-aware (Bearer key sent; 401/403 reported as
'key rejected', distinct from unreachable); wizard no longer crashes
on non-integer memory limits; memory wizard prefills CURRENT values;
self-update now ships lpb-config/lpb-devstack/localpibox; docs +
tests updated (80/80 lpb family, all 15 localpibox suites).
Copy file name to clipboardExpand all lines: doc/lpb-config.md
+19-9Lines changed: 19 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,8 +38,9 @@ see [lpb-devstack reference](lpb-devstack.md).
38
38
39
39
| Command | Description |
40
40
|---|---|
41
-
|`lpb-config setup`| Interactive first-run setup: lemonade provider (auth.json), default model (settings.json), lpb-memory config. Runs automatically on first boot (start.sh); idempotent — re-run with `--reconfigure` to change server/model |
42
-
|`lpb-config setup --non-interactive`| Same, no prompts — `LEMONADE_BASE_URL` / `LEMONADE_API_KEY` env + defaults. On TTY-less first boots the `lpb` launcher passes them in (first-boot prompt in `--ssh`/`--web` modes, see `lpb-cli.md`) |
41
+
|`lpb-config setup`| The **same wizard** as `lpb setup` on the host: config repo, lemonade provider (auth.json), default model (settings.json), lpb-memory config. Every step is validated live (HTTP probes); failures loop with the error visible. Re-run any time to correct a bad configuration — current values are pre-filled. `--reconfigure` forces a re-run |
42
+
|`lpb-config setup --non-interactive`| Same, no prompts — `LEMONADE_BASE_URL` / `LEMONADE_API_KEY` env + defaults. First failure aborts with a precise error and writes nothing. This is the `start.sh` fallback for boots where the host wizard did not run |
43
+
|`lpb-config check`| Validate the installation (read-only checklist: config repo, settings, credentials, live server probe) — the in-container twin of `lpb doctor`|
43
44
44
45
### Pipeline Override
45
46
@@ -52,8 +53,12 @@ regardless of pipeline.
52
53
Settings.json is **template-driven**, not git-tracked:
53
54
54
55
1. Config repo ships `settings.json.template` with `__LPB_VERSION__` placeholders
55
-
2. First boot: `start.sh` generates `settings.json` (replaces placeholders)
56
-
3. No model/provider preconfigured — user runs `/login lemonade`
56
+
2. Before the first start, the setup wizard (`lpb setup` on the host, or
57
+
`lpb-config setup` in a shell) renders `settings.json` and writes the
58
+
lemonade provider + default model — `start.sh` re-renders on first boot
59
+
as a fallback (`lpb-config render`)
60
+
3. Model/provider are configured interactively with live validation — see
61
+
the First-Run Setup section above (no `/login` needed for lemonade)
0 commit comments