Skip to content

Conversation

@coleleavitt
Copy link
Contributor

Summary

  • Add support for multiple accounts per provider with active account switching
  • Automatic migration from legacy single-auth format

Changes

Auth Module (src/auth/index.ts)

  • New ProviderAuth data structure with accounts map and active field
  • New functions: listAccounts, setAccount, setActive, removeAccount, getAccount, hasAccounts, getActive
  • Backward-compatible migration: legacy single-auth entries auto-convert to multi-account format on read

CLI (src/cli/cmd/auth.ts)

  • auth list now shows accounts grouped by provider with active indicator
  • auth login accepts --account / -a flag to specify account name
  • auth logout allows removing specific accounts (not just entire providers)

TUI (src/cli/cmd/tui/component/dialog-provider.tsx)

  • New DialogAccounts component for listing/switching accounts
  • New DialogAccountName component for naming new accounts
  • Updated DialogAuthMethod to support account context

Server (src/server/server.ts)

  • New endpoints:
    • GET /auth/:providerID/accounts - List accounts
    • PUT /auth/:providerID/accounts/:accountName - Set account credentials
    • POST /auth/:providerID/accounts/:accountName/active - Set active account
    • DELETE /auth/:providerID/accounts/:accountName - Remove account

SDK

  • Regenerated with new auth.accounts.* methods

- Add support for multiple accounts per provider with active account switching
- New Auth data structure: ProviderAuth with accounts map and active field
- Migrate legacy single-auth format automatically on read
- CLI: auth list shows accounts per provider, login accepts --account flag
- CLI: auth logout allows removing specific accounts
- TUI: New DialogAccounts, DialogAccountName, DialogAuthMethod components
- Server: New /auth/:providerID/accounts endpoints (list, set, setActive, remove)
- Regenerate SDK with new auth.accounts.* methods
@Shaglock
Copy link

This is exactly what I need right now!

- Add detection for github:, git://, git+ URL schemes in BunProc.install
- Extract package name from git URLs for correct module path resolution
- Skip @Version suffix for git dependencies to prevent resolution errors
- Update default anthropic-auth plugin to use GitHub fork
@guard22
Copy link

guard22 commented Dec 30, 2025

we need this!

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.

3 participants