Skip to content

How do I sign in and choose an Account in the CLI?

Use the Account plugin to sign in as a person and select an Account you belong to. The CLI keeps this identity in a local profile. Login uses --profile when supplied, otherwise the saved active profile or a new default profile. To sign in to a particular profile, name it explicitly.

Install the plugin if it is missing, then start login:

socra install account
socra account login

Complete the browser sign-in and Account selection. For a terminal that cannot receive a browser callback, use the device-code flow:

socra account login --device-code

Follow the URL and code printed by the command. Finish the authorization before the code expires, then return to the terminal. Check the result:

socra account status

To choose another Account interactively, run:

socra account switch

Complete the browser authorization opened by the switch command, then run socra account status again. Switching uses the browser flow; the device-code option shown above belongs to login. Outside an interactive terminal, supply the destination as socra account switch ACCOUNT_HANDLE_OR_ID.

Account switching applies to a human profile. It does not move data between Accounts or grant membership in a new one. A missing Account must be resolved through membership before you can select it.

Status and credential reads use an explicit profile first, then SOCRA_ACCOUNT_PROFILE if set, and otherwise the active profile. This can differ from the profile used by an unqualified login command. If status reports missing or nonrenewable credentials, follow its profile-specific login instruction. Keep profile names and the selected Account clear when more than one identity uses the same installation.