Skip to content
[ 03 ]Commands

copia-cli auth switch

copia-cli auth switch [flags]

Switch the active account of a Copia host and make that host the default host. With --host and --user it switches to that account. With --host alone it switches to the host's account when the host has one, and to the other account when it has two. Without flags it switches to the other account when exactly two accounts exist in total. In every other case it fails and lists the accounts to choose from. The token of each account stays where it is stored; COPIA_TOKEN applies only with COPIA_HOST or --host, so a switch never sends it to the new default host.

Options

--host <string>
The Copia host of the account to switch to
-u, --user <string>
The account to switch to

Options inherited from parent commands

-R, --repo <string>
Select repository (owner/repo)
--token <string>
Authentication token

Examples

$ copia-cli auth switch
$ copia-cli auth switch --host app.copia.io --user john

See also