---
name: "gt-auth-switch"
section: "1"
platform: "linux"
package: "gitea-cli"
version: "1.0.0-1"
release: "Arch Linux 2026-11-07"
platforms: ["linux"]
url: "https://carta.tech/man/gt-auth-switch"
---

# gt-auth-switch(1)

Switch the active account of an instance

## NAME

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

## SYNOPSIS

**gt auth switch \[\<user\>\] \[flags\]**

## DESCRIPTION

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.

## OPTIONS

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

## OPTIONS INHERITED FROM PARENT COMMANDS

**--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

## EXAMPLE

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

## SEE ALSO

**[gt-auth(1)](/man/gt-auth/1.md)**
