[FEATURE] Add an `/auth` command to manage the active authentication provider
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Claude Code currently supports multiple authentication methods, such as Claude subscription login, Anthropic API keys, and third-party providers like Google Vertex AI.
However, once more than one authentication method has been configured, it is not very clear which provider is currently active or how to switch between them safely. For example, a user may log in with a Claude subscription using /login, then configure Google Vertex AI using /setup-vertex. After that, Vertex may take precedence, but the subscription login still exists in the background.
This makes authentication state difficult to reason about, especially because switching back often requires manually unsetting environment variables or editing ~/.claude/settings.json. It can also create confusion around billing, since users may unintentionally use API/Vertex billing instead of their Claude subscription.
Proposed Solution
Add a dedicated /auth command that allows users to view and manage authentication providers from inside Claude Code.
The command could provide an interactive menu like:
/auth
Active provider:
Google Vertex AI
Configured providers:
[1] Claude subscription
[2] Anthropic API key
[3] Google Vertex AI
Actions:
- Switch active provider
- Reconfigure provider
- Remove provider
- Show provider details
Alternative Solutions
The workaround is to edit manually the settings.json.
Priority
Medium - Would be very helpful
Feature Category
Interactive mode (TUI)
Use Case Example
_No response_
Additional Context
Suggested capabilities:
- Show the currently active authentication provider
- Show all configured authentication methods
- Allow switching between Claude subscription, Anthropic API, and Vertex/Bedrock providers
- Provide a non-interactive mode, for example:
claude auth status
claude auth use subscription
claude auth use vertex
claude auth logout vertex
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗