Skip to content

feat: seamless first-run onboarding with a clear managed vs BYOK choice#90

Merged
Aayam Bansal (aayambansal) merged 8 commits into
mainfrom
feat/onboarding-managed-byok
Jul 5, 2026
Merged

feat: seamless first-run onboarding with a clear managed vs BYOK choice#90
Aayam Bansal (aayambansal) merged 8 commits into
mainfrom
feat/onboarding-managed-byok

Conversation

@ishaan1124

Copy link
Copy Markdown
Contributor

What & why

First-time users had no guided setup — bare openscience just opened the workspace with a passive "not connected" warning — and two similarly-named auth systems (login/auth for provider keys vs connect login for the Atlas account) made the mental model confusing. This adds a first-run wizard and unifies the command vocabulary so verbs map to intent, while keeping OpenScience fully usable with no account.

Command surface

Verbs now map to intent. Old names remain as aliases, so nothing existing breaks.

Intent Command Was
Set up / re-run setup openscience init (alias onboard) — (new)
Log in to Atlas openscience login connect login
Log out of Atlas openscience logout connect logout
Account + wallet status openscience status (alias whoami) connect status
Sync managed creds openscience sync connect sync
Manage devices openscience devices connect devices
Your own provider keys openscience keys add/rm/ls/signin auth …
Wallet / top up openscience wallet billing
Health check openscience doctor — (new)

openscience connect …, auth, and billing still resolve (aliased) so existing muscle memory and scripts keep working.

First-run wizard

Managed-first, but BYOK and "not now" are one keystroke away — the "no account required" promise is preserved.

  • Atlas managed → browser login → wallet balance → optional top-up.
  • Your own keys → the existing provider picker (also Claude / ChatGPT / Copilot sign-in); keys stored locally and free (never pushed to the paid server vault).
  • Not now → straight into the free demo models.
  • Then offers to install the Atlas CLI companion (npm i -g @synsci/atlas) if absent. Since openscience seeds the atlas-cli config from the same session, the companion is already signed in.

Triggered from the default command only when there is a TTY and nothing is configured; suppressed in CI / non-interactive / via OPENSCIENCE_NO_ONBOARD=1; runs once (state marker), and on demand via openscience init.

Installer

install now offers the Atlas CLI companion — TTY-gated, reads /dev/tty (since curl | bash makes stdin the script); skipped in CI, non-interactive shells, when atlas is already installed, or with --no-atlas / OPENSCIENCE_NO_ATLAS. Mirrored byte-for-byte to the served copy that the CI smoke job diffs.

Security / polish

  • share.ts no longer ships app.dev.syntheticsciences.ai in public builds; it routes through the endpoints.ts resolver (addresses the one LOW finding from the leak audit).
  • ARCHITECTURE.md corrected to app.syntheticsciences.ai to match the code.
  • Softened the default-command nudge so BYOK users are not told to connect Atlas.

Docs / landing

  • README updated to the new verbs and the first-run setup.
  • Landing page: the Installation section moved up (from position 9 to right under the product shot) with copy refreshed for the wizard.

Testing

  • bun run typecheck — clean.
  • bun test — 842 pass. The 10 failing provider.test.ts cases (claude-sonnet-4 variants / capabilities) are pre-existing live models.dev catalog drift — identical on main with these changes stashed, so unrelated to this PR.
  • Smoke-tested the new command tree, doctor, and the auth / connect back-compat aliases end to end.

openscience login/logout/status/sync/devices are now first-class commands; connect stays as a back-compat umbrella alias. Extract runAtlasLogin() so the setup wizard can reuse it, and have status report wallet balance and routing.
Managed-first fork (Atlas managed / your own keys / not now) that never blocks BYOK or account-free use, offers the Atlas CLI companion, and writes a marker so it only auto-runs once. init reruns it; doctor reports what is configured.
…d tree

BYOK key management is now openscience keys add/rm/ls/signin (auth kept as an alias); wallet is openscience wallet (billing kept as an alias). Codex logout folds into keys rm. The default command launches the wizard on first run and no longer nags BYOK users to connect Atlas.
TTY-gated prompt that reads /dev/tty (curl|bash makes stdin the script). Skipped in CI, non-interactive shells, when atlas is already installed, or with --no-atlas / OPENSCIENCE_NO_ATLAS. Mirrored byte-for-byte to the served copy that CI checks.
share.ts no longer ships app.dev.syntheticsciences.ai in public builds; it routes through the endpoints resolver. ARCHITECTURE.md now states app.syntheticsciences.ai, matching src/endpoints.ts.
@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openscience Ready Ready Preview, Comment Jul 5, 2026 5:33pm

Request Review

Rename connect/auth/billing references to login/keys/wallet across the command reference, Atlas, quickstart, models, and security pages, add the new init/status/wallet/doctor commands, and rebuild the served public/docs bundle.
@aayambansal Aayam Bansal (aayambansal) merged commit 4301ed4 into main Jul 5, 2026
17 of 19 checks passed
@aayambansal Aayam Bansal (aayambansal) deleted the feat/onboarding-managed-byok branch July 5, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants