GT-AUTH-SWITCH(1) gitea-cli Manual GT-AUTH-SWITCH(1)

gt-auth-switch - Switch the active account of an instance

gt auth switch [<user>] [flags]

Switch the active account of an instance, which commands use unless --user or GITEA_CLI_USER selects another. With two accounts, gt auth switch toggles between them; with more, it asks which one on a terminal.

-h, --help[=false] help for switch

--debug[=false] Log the method, URL, status, and duration of each HTTP request to stderr

--host="" Gitea instance URL, including any base path

--interactive[=false] Allow prompts with machine output

--no-input[=false] Disable prompts and implicit editor/browser interactions

--sudo="" Perform API requests as this user (requires an administrator account)

--user="" Account name on the selected instance

$ gt auth switch
$ gt auth switch bob
$ gt auth switch bob --host gitea.com

gt-auth(1)

Nov 2026 gitea-cli