feat: generate the gt command reference from gitea/cli

update_cli_docs.sh runs gt's own generator and lays the pages out for the
site: one directory per command group, front matter, titles, sidebar
order, fenced help text and rewritten links. --released succeeds while no
series is documented. A weekly workflow proposes updates like the runner's.

Signed-off-by: bircni <[email protected]>
This commit is contained in:
bircni committed 2026-10-22 11:28:15 +02:00
1 parent fe618c42be
commit 55c3a392a1
261 files changed
+15116 -2

No files matched your search

+61
View File
@@ -0,0 +1,61 @@
---
sidebar_position: 4
description: "Authenticate gt and git with Gitea"
---
# gt auth
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Authenticate gt and git with Gitea
## Synopsis
```text
Authenticate gt and git with Gitea.
gt keeps the accounts of each instance in hosts.yml and their tokens in the system
keyring, or in a private file when you choose so. One account per instance is active;
--user or GITEA_CLI_USER selects another for a single command. GITEA_TOKEN, together with
GITEA_CLI_HOST or GITEA_INSTANCE_URL, replaces the stored credentials of its instance for the
active account too; it must belong to the account that --user or GITEA_CLI_USER names. See
gt help environment for how commands select the instance.
```
```
gt auth [flags]
```
## Options
```
-h, --help help for auth
```
## Options inherited from parent commands
```
--cwd directory Working directory for repository discovery
--debug Log the method, URL, status, and duration of each HTTP request to stderr
--host URL Gitea instance URL, including any base path
--interactive Allow prompts with machine output
-q, --jq expression Filter JSON output using a jq expression; implies --json
--json fields[="*"] Output JSON with the specified comma-separated fields, or all fields
--no-input Disable prompts and implicit editor/browser interactions
--remote remote Git remote used for repository discovery
-R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL
--sudo user Perform API requests as this user (requires an administrator account)
--user name Account name on the selected instance
-y, --yes Accept confirmations without prompting
```
## SEE ALSO
* [gt](../index.md): Work with Gitea from your terminal
* [gt auth login](../auth/login.md): Log in to a Gitea instance
* [gt auth logout](../auth/logout.md): Log out of an account
* [gt auth refresh](../auth/refresh.md): Refresh an OAuth token
* [gt auth setup-git](../auth/setup-git.md): Configure git to use gt for credentials
* [gt auth status](../auth/status.md): Show the accounts gt can use
* [gt auth switch](../auth/switch.md): Switch the active account of an instance
* [gt auth token](../auth/token.md): Print the access token of an account
+72
View File
@@ -0,0 +1,72 @@
---
sidebar_position: 1
description: "Log in to a Gitea instance"
---
# gt auth login
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Log in to a Gitea instance
## Synopsis
```text
Log in to a Gitea instance. On a terminal without a method flag, gt asks for the instance,
how to log in, where to keep the token and whether git should use gt for the instance.
Create a token on the instance under Settings > Applications. Logging in to an account
that gt already has replaces its stored credential after a confirmation (or with --yes).
```
```
gt auth login [flags]
```
## Examples
```
$ gt auth login
$ gt auth login --host gitea.com --with-token < token.txt
$ gt auth login --host gitea.com --oauth --scopes read:repository,read:user
$ gt auth login --host gitea.example.com --with-token --header 'CF-Access-Client-Id: $CF_ID' --header 'CF-Access-Client-Secret: $CF_SECRET'
```
## Options
```
--client-cert file Present the PEM TLS client certificate in file to an instance that requires one; convert a PKCS#12 file with: openssl pkcs12 -in cert.p12 -clcerts -nokeys -out cert.pem
--client-id ID OAuth application ID registered on the instance (default: the instance's stored ID, then gt's); implies --oauth
--client-key file Unencrypted PEM private key file of --client-cert (default: the key in the --client-cert file); convert a PKCS#12 file with: openssl pkcs12 -in cert.p12 -nocerts -nodes -out key.pem
--credential-store string Where to keep the token {keyring|file} (default "keyring")
--header "Name: value" Send the "Name: value" header with every request to this instance, such as an access proxy needs; a value of $NAME or ${NAME} is read from that environment variable (repeatable)
-h, --help help for login
--insecure Skip TLS certificate verification for this instance
--oauth Authorize in a web browser with OAuth
--scopes scopes OAuth token scopes, such as read:repository (default: write access to everything but administration); implies --oauth
--ssh-agent-key fingerprint Sign requests with the ssh-agent key of fingerprint
--ssh-agent-principal principal Sign requests with the ssh-agent certificate of principal
--ssh-key file Sign requests with the SSH private key in file
--with-token Read an access token from stdin, or ask for it on a terminal
```
## Options inherited from parent commands
```
--cwd directory Working directory for repository discovery
--debug Log the method, URL, status, and duration of each HTTP request to stderr
--host URL Gitea instance URL, including any base path
--interactive Allow prompts with machine output
-q, --jq expression Filter JSON output using a jq expression; implies --json
--json fields[="*"] Output JSON with the specified comma-separated fields, or all fields
--no-input Disable prompts and implicit editor/browser interactions
--remote remote Git remote used for repository discovery
-R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL
--sudo user Perform API requests as this user (requires an administrator account)
--user name Account name on the selected instance
-y, --yes Accept confirmations without prompting
```
## SEE ALSO
* [gt auth](../auth/index.md): Authenticate gt and git with Gitea
+58
View File
@@ -0,0 +1,58 @@
---
sidebar_position: 2
description: "Log out of an account"
---
# gt auth logout
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Log out of an account
## Synopsis
```text
Log out of an account: gt forgets the account and deletes its stored credential. Git's
other credential helpers are asked to forget what they stored for the account on the
instance, such as a copy of its token that a keychain kept after a push.
```
```
gt auth logout [<user>] [flags]
```
## Examples
```
$ gt auth logout
$ gt auth logout bob --host gitea.com
# Without confirmation
$ gt auth logout alice --yes
```
## Options
```
-h, --help help for logout
```
## Options inherited from parent commands
```
--cwd directory Working directory for repository discovery
--debug Log the method, URL, status, and duration of each HTTP request to stderr
--host URL Gitea instance URL, including any base path
--interactive Allow prompts with machine output
-q, --jq expression Filter JSON output using a jq expression; implies --json
--json fields[="*"] Output JSON with the specified comma-separated fields, or all fields
--no-input Disable prompts and implicit editor/browser interactions
--remote remote Git remote used for repository discovery
-R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL
--sudo user Perform API requests as this user (requires an administrator account)
--user name Account name on the selected instance
-y, --yes Accept confirmations without prompting
```
## SEE ALSO
* [gt auth](../auth/index.md): Authenticate gt and git with Gitea
+56
View File
@@ -0,0 +1,56 @@
---
sidebar_position: 3
description: "Refresh an OAuth token"
---
# gt auth refresh
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Refresh an OAuth token
## Synopsis
```text
Refresh the OAuth token of the active account, or of --user, now. gt refreshes expiring
OAuth tokens on its own; tokens pasted with --with-token cannot be refreshed and are
replaced by logging in again.
```
```
gt auth refresh [flags]
```
## Examples
```
$ gt auth refresh
$ gt auth refresh --host gitea.com --user alice
```
## Options
```
-h, --help help for refresh
```
## Options inherited from parent commands
```
--cwd directory Working directory for repository discovery
--debug Log the method, URL, status, and duration of each HTTP request to stderr
--host URL Gitea instance URL, including any base path
--interactive Allow prompts with machine output
-q, --jq expression Filter JSON output using a jq expression; implies --json
--json fields[="*"] Output JSON with the specified comma-separated fields, or all fields
--no-input Disable prompts and implicit editor/browser interactions
--remote remote Git remote used for repository discovery
-R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL
--sudo user Perform API requests as this user (requires an administrator account)
--user name Account name on the selected instance
-y, --yes Accept confirmations without prompting
```
## SEE ALSO
* [gt auth](../auth/index.md): Authenticate gt and git with Gitea
+63
View File
@@ -0,0 +1,63 @@
---
sidebar_position: 4
description: "Configure git to use gt for credentials"
---
# gt auth setup-git
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Configure git to use gt for credentials
## Synopsis
```text
Configure git to ask gt for the credentials of an instance, so that git push and fetch
over HTTPS use the active account, or the account of --user. gt's own clone and checkout
commands do not need this.
Other credential helpers, such as a system keychain, are turned off for the instance:
otherwise they answer first and keep a copy of gt's token. --keep-helpers keeps them.
```
```
gt auth setup-git [flags]
```
## Examples
```
$ gt auth setup-git
$ gt auth setup-git --host gitea.com
# Only for the current repository, always as alice
$ gt auth setup-git --local --user alice
```
## Options
```
-h, --help help for setup-git
--keep-helpers Keep other credential helpers for the instance; they are asked first and store gt's token
--local Configure only the current Git repository instead of global Git configuration
```
## Options inherited from parent commands
```
--cwd directory Working directory for repository discovery
--debug Log the method, URL, status, and duration of each HTTP request to stderr
--host URL Gitea instance URL, including any base path
--interactive Allow prompts with machine output
-q, --jq expression Filter JSON output using a jq expression; implies --json
--json fields[="*"] Output JSON with the specified comma-separated fields, or all fields
--no-input Disable prompts and implicit editor/browser interactions
--remote remote Git remote used for repository discovery
-R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL
--sudo user Perform API requests as this user (requires an administrator account)
--user name Account name on the selected instance
-y, --yes Accept confirmations without prompting
```
## SEE ALSO
* [gt auth](../auth/index.md): Authenticate gt and git with Gitea
+59
View File
@@ -0,0 +1,59 @@
---
sidebar_position: 5
description: "Show the accounts gt can use"
---
# gt auth status
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Show the accounts gt can use
## Synopsis
```text
Show the accounts gt can use on each instance, the active one, and how they
authenticate. Fails with exit code 4 when there is no account, or when a credential is
missing or rejected. With --json it exits 0 either way; read credential_available, verified and error.
```
```
gt auth status [flags]
```
## Examples
```
$ gt auth status
# Check the credentials against their instances
$ gt auth status --verify
$ gt auth status --host gitea.com --json
```
## Options
```
-h, --help help for status
--verify Check each credential against its instance
```
## Options inherited from parent commands
```
--cwd directory Working directory for repository discovery
--debug Log the method, URL, status, and duration of each HTTP request to stderr
--host URL Gitea instance URL, including any base path
--interactive Allow prompts with machine output
-q, --jq expression Filter JSON output using a jq expression; implies --json
--json fields[="*"] Output JSON with the specified comma-separated fields, or all fields
--no-input Disable prompts and implicit editor/browser interactions
--remote remote Git remote used for repository discovery
-R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL
--sudo user Perform API requests as this user (requires an administrator account)
--user name Account name on the selected instance
-y, --yes Accept confirmations without prompting
```
## SEE ALSO
* [gt auth](../auth/index.md): Authenticate gt and git with Gitea
+57
View File
@@ -0,0 +1,57 @@
---
sidebar_position: 6
description: "Switch the active account of an instance"
---
# gt auth switch
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Switch the active account of an instance
## Synopsis
```text
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.
```
```
gt auth switch [<user>] [flags]
```
## Examples
```
$ gt auth switch
$ gt auth switch bob
$ gt auth switch bob --host gitea.com
```
## Options
```
-h, --help help for switch
```
## Options inherited from parent commands
```
--cwd directory Working directory for repository discovery
--debug Log the method, URL, status, and duration of each HTTP request to stderr
--host URL Gitea instance URL, including any base path
--interactive Allow prompts with machine output
-q, --jq expression Filter JSON output using a jq expression; implies --json
--json fields[="*"] Output JSON with the specified comma-separated fields, or all fields
--no-input Disable prompts and implicit editor/browser interactions
--remote remote Git remote used for repository discovery
-R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL
--sudo user Perform API requests as this user (requires an administrator account)
--user name Account name on the selected instance
-y, --yes Accept confirmations without prompting
```
## SEE ALSO
* [gt auth](../auth/index.md): Authenticate gt and git with Gitea
+58
View File
@@ -0,0 +1,58 @@
---
sidebar_position: 7
description: "Print the access token of an account"
---
# gt auth token
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Print the access token of an account
## Synopsis
```text
Print the access token that gt uses for the active account, or for --user, so that
scripts can call the API themselves. The GITEA_TOKEN of the instance takes precedence, as
it does for other commands, and an expiring OAuth token is refreshed first. Accounts that
sign requests with an SSH key have no token.
```
```
gt auth token [flags]
```
## Examples
```
$ gt auth token
$ curl -H "Authorization: token $(gt auth token)" https://gitea.com/api/v1/user
$ gt auth token --host gitea.com --user alice
```
## Options
```
-h, --help help for token
```
## Options inherited from parent commands
```
--cwd directory Working directory for repository discovery
--debug Log the method, URL, status, and duration of each HTTP request to stderr
--host URL Gitea instance URL, including any base path
--interactive Allow prompts with machine output
-q, --jq expression Filter JSON output using a jq expression; implies --json
--json fields[="*"] Output JSON with the specified comma-separated fields, or all fields
--no-input Disable prompts and implicit editor/browser interactions
--remote remote Git remote used for repository discovery
-R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL
--sudo user Perform API requests as this user (requires an administrator account)
--user name Account name on the selected instance
-y, --yes Accept confirmations without prompting
```
## SEE ALSO
* [gt auth](../auth/index.md): Authenticate gt and git with Gitea