Skip to content

Sign in on first use; Client() reads the stored key; sync generated SDK (v1.0.17) - #233

Merged
abonneth merged 8 commits into
mainfrom
antoine/auto-login
Oct 5, 2026
Merged

abonneth merged 8 commits into
mainfrom
antoine/auto-login

Conversation

@abonneth

@abonneth abonneth commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Made with Cursor


Note

Medium Risk
Changes how API keys are resolved for SDK and CLI (removed cwd .env); auth behavior differs for interactive vs scripted use.

Overview
Unifies API key discovery so Client() / AsyncClient() pick up keys from HAI_API_KEY, then hai login’s file at ~/.config/hai/.env (via shared credentials_path()), with a clear ApiError when nothing is configured.

CLI onboarding adds interactive sign-in on first use (Google or pasted key) before API commands, MCP install, and local bridges; hai login itself prompts for that choice. Non-interactive runs (--json, piped stdin) still fail fast without prompting.

Credential resolution drops project-local .env for keys—CLI/SDK now use env, --api-key, and the global config file only. Docs and tests reflect the new precedence and flows. Release v1.0.17 (generated client version headers).

Reviewed by Cursor Bugbot for commit 29a2ed0. Bugbot is set up for automated code reviews on this repo. Configure here.

@abonneth
abonneth requested a review from adeprezh as a code owner October 5, 2026 12:54
@abonneth
abonneth force-pushed the antoine/auto-login branch from ebe3598 to 1a41401 Compare October 5, 2026 13:02
@abonneth
abonneth force-pushed the antoine/auto-login branch from 1a41401 to fdb9bb5 Compare October 5, 2026 14:06
@abonneth abonneth changed the title Sign in on first use; Client() reads the stored key Sign in on first use; Client() reads the stored key; sync generated SDK (v1.0.17) Oct 5, 2026
@abonneth
abonneth merged commit 6a2c6f6 into main Oct 5, 2026
7 checks passed
@abonneth
abonneth deleted the antoine/auto-login branch October 5, 2026 15:05
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