Follow-up to landing-ai/ade-cli-internal#72 (fixed by landing-ai/ade-cli-internal#78), which was explicitly scoped to fixing the login/logout overwrite-and-selection confusion. That change made environments coexist but kept one credential per environment.
This issue tracks the deferred half of landing-ai/ade-cli-internal#72's title — "like env, account name": supporting multiple credentials within a single environment, addressable by account.
Motivation
Today a second login to the same environment replaces the first. Someone with two production accounts (e.g. two identities/tenants, or an API key and an OAuth session) can't keep both.
Current model (post-landing-ai/ade-cli-internal#78)
- A profile is keyed by environment only;
credentials.json holds one entry per env under environments.
login --env X authenticates/selects X; login (flagless) targets production.
logout is per environment.
See docs/adr/0001-auth-login-selects-logout-per-env.md for the model and why account-level profiles were deferred.
Rough scope (to be grilled before building)
- Profile identity becomes
(environment, account); storage grows a nested map.
- Account naming: auto-derive from OAuth token identity (email/sub); explicit
--account/--name for API keys.
- Selection within an env (which account is active) + how
status/logout address accounts.
- Migration of the existing one-credential-per-env schema.
Design decisions (identity model, selection UX, storage layout) should go through a /grill-with-docs session and a new ADR before implementation.
Migrated from the private development tracker (landing-ai/ade-cli-internal#79) during the launch cutover.
Follow-up to landing-ai/ade-cli-internal#72 (fixed by landing-ai/ade-cli-internal#78), which was explicitly scoped to fixing the login/logout overwrite-and-selection confusion. That change made environments coexist but kept one credential per environment.
This issue tracks the deferred half of landing-ai/ade-cli-internal#72's title — "like env, account name": supporting multiple credentials within a single environment, addressable by account.
Motivation
Today a second login to the same environment replaces the first. Someone with two production accounts (e.g. two identities/tenants, or an API key and an OAuth session) can't keep both.
Current model (post-landing-ai/ade-cli-internal#78)
credentials.jsonholds one entry per env underenvironments.login --env Xauthenticates/selects X;login(flagless) targets production.logoutis per environment.See
docs/adr/0001-auth-login-selects-logout-per-env.mdfor the model and why account-level profiles were deferred.Rough scope (to be grilled before building)
(environment, account); storage grows a nested map.--account/--namefor API keys.status/logoutaddress accounts.Design decisions (identity model, selection UX, storage layout) should go through a
/grill-with-docssession and a new ADR before implementation.Migrated from the private development tracker (landing-ai/ade-cli-internal#79) during the launch cutover.