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

+91
View File
@@ -0,0 +1,91 @@
---
sidebar_position: 1
description: "Environment variables and global flags"
---
# gt help environment
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Environment variables and global flags
## Synopsis
```text
Global flags work with every command, before or after the command name:
--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
gt selects the repository from --repo, GITEA_CLI_REPO, git config gt.repository (gt repo
set-default) or a Git remote (--remote, else the base remote pr checkout recorded, the
current branch's remote, upstream or origin, skipping remotes on instances without an
account, or not on --host or the GITEA_TOKEN instance). Like gh, a clone with upstream
and origin targets upstream: a branch tracking origin does not select the fork,
and the instance from the repository URL, --host, GITEA_CLI_HOST or GITEA_INSTANCE_URL,
default_host, the only configured instance, or, among several, the instance of the clone's
repository.
Environment variables:
GITEA_CLI_CONFIG_DIR configuration directory; gt config path prints the files
GITEA_CLI_HOST, GITEA_INSTANCE_URL instance URL, overriding default_host
GITEA_TOKEN access token for that instance instead of stored credentials
GITEA_INSTANCE_INSECURE with GITEA_TOKEN, skip TLS verification when true
GITEA_INSTANCE_SSH_HOST with GITEA_TOKEN, SSH host that identifies the instance's remotes
GITEA_CLI_USER account on the selected instance, like --user
GITEA_CLI_REPO repository as OWNER/REPO or URL, like --repo
GITEA_CLI_EDITOR editor, overriding config.yml
GITEA_CLI_PAGER pager, overriding config.yml
GITEA_CLI_COLOR color preference: auto, always or never
GITEA_CLI_HTTP_TIMEOUT longest wait for an answer, overriding config.yml
NO_COLOR disables automatic color when set, even with CLICOLOR_FORCE
CLICOLOR_FORCE unless empty or 0, colors stderr, even when redirected, and
a terminal stdout despite CLICOLOR=0 or TERM=dumb
CLICOLOR disables automatic color on a terminal when 0
VISUAL, EDITOR, PAGER, BROWSER editor (VISUAL first), pager and browser when config.yml sets none
TERM dumb asks each prompt as a line of text, for screen readers,
and turns off automatic color
Piped or redirected stdout is data: the color settings never color it. Only a
command's own --color always does, such as gt pr diff --color always.
Preferences in config.yml are described in gt config --help.
```
## Options
```
-h, --help help for environment
```
## 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](): Work with Gitea from your terminal
+53
View File
@@ -0,0 +1,53 @@
---
sidebar_position: 2
description: "Exit codes used by gt"
---
# gt help exit-codes
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Exit codes used by gt
## Synopsis
```text
gt exits with one of these codes:
0 success, including an empty list
1 the command failed
2 usage error: an unknown command or flag, or a missing or invalid argument
3 canceled: a declined confirmation, a prompt left with Esc or Ctrl-D, or a timeout
4 authentication is missing or was rejected
8 gt pr checks: some checks are still pending
130 interrupted with Ctrl-C, also at a prompt
A command may document further codes in its help.
```
## Options
```
-h, --help help for exit-codes
```
## 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](): Work with Gitea from your terminal
+65
View File
@@ -0,0 +1,65 @@
---
sidebar_position: 3
description: "JSON output with --json and --jq"
---
# gt help formatting
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
JSON output with --json and --jq
## Synopsis
```text
gt prints text for people by default. Scripts should use JSON: the columns and
wording of text output may change between releases.
--json print every field
--json FIELDS print only the comma-separated FIELDS, such as --json number,title
-q, --jq EXPR filter the JSON with a jq expression; implies --json
The JSON FIELDS section of a command's help lists its fields, and shell completion
offers them after --json. An unknown field reports the available ones.
--jq runs inside gt, so jq does not need to be installed. String results print
without quotes:
$ gt issue list --json number,title --jq '.[] | "\(.number)\t\(.title)"'
Some fields cost extra requests, such as the reviewers of pr list, the blocked_by and blocks
of issue view and issue edit, and the visibility of org member list. gt makes them only when
the output includes the field: --json names it, or --json selects every field and the --jq
expression names it. An expression that reaches such a field without naming it, as
to_entries does, sees it empty; name the field in --json instead.
On a terminal, JSON is indented and colored; otherwise each value prints on one line.
Commands that return no resource, such as deletes, reject --json.
```
## Options
```
-h, --help help for formatting
```
## 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](): Work with Gitea from your terminal
+14
View File
@@ -0,0 +1,14 @@
---
sidebar_position: 30
description: "Guides built into gt, read with gt help <topic>."
---
# Help topics
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Guides built into gt, read with `gt help <topic>`:
- [gt help environment](environment.md): Environment variables and global flags
- [gt help exit-codes](exit-codes.md): Exit codes used by gt
- [gt help formatting](formatting.md): JSON output with --json and --jq