Skip to main content
Move between organizations on the same profile without signing in again. The CLI uses your stored refresh token to mint a new access token scoped to the selected organization, then updates the profile record.

Synopsis

talkvalue auth switch [org]

Arguments

ArgumentTypeDescription
orgstringOrganization name or ID to switch to. When omitted, the CLI prompts you to pick from the list.

Examples

1. Pick interactively

talkvalue auth switch
The CLI fetches your organizations and shows an arrow-key picker. After you confirm, output ends with ✓ Switched to Acme Inc. on stderr and the JSON envelope on stdout.

2. Switch by name or ID

talkvalue auth switch "Acme Inc."
talkvalue auth switch org_01HXXX...
Matches by name (case-insensitive) first, then by ID. Skips the picker entirely.

3. Combine with profile selection

talkvalue auth switch "Production" --profile prod
Use the global --profile flag to switch the organization on a non-active profile without making it active first.

Response

{
  "data": {
    "orgId": "org_01HXXX...",
    "orgName": "Acme Inc.",
    "profile": "you"
  }
}
The new access token is stored in your system keyring and the profile record is updated with the selected orgId and orgName. Subsequent commands run against the new organization until you switch again. If the active profile has no refresh token, the command fails and asks you to run auth login.

See also