.nh .TH "GT-DOCTOR" "1" "Nov 2026" "gitea-cli" "gitea-cli Manual" .SH NAME gt-doctor - Check gt's setup for this directory .SH SYNOPSIS \fBgt doctor [flags]\fP .SH DESCRIPTION Check the setup that commands in this directory use: the settings files, the instance, its configured headers and whether it answers, the account and its credential, the repository, and Git. Each problem comes with the command that fixes it. gt doctor fails when a check fails. .SS JSON FIELDS .EX checks, host, host_source, repo, repo_source, user, user_source .EE .SH OPTIONS \fB-h\fP, \fB--help\fP[=false] help for doctor .SH OPTIONS INHERITED FROM PARENT COMMANDS \fB--csv\fP[=""] Output CSV with the specified comma-separated \fBfields\fR, or all fields .PP \fB--cwd\fP="" Working \fBdirectory\fR for repository discovery .PP \fB--debug\fP[=false] Log the method, URL, status, and duration of each HTTP request to stderr .PP \fB--host\fP="" Gitea instance \fBURL\fR, including any base path .PP \fB--interactive\fP[=false] Allow prompts with machine output .PP \fB-q\fP, \fB--jq\fP="" Filter JSON output using a jq \fBexpression\fR; implies --json .PP \fB--json\fP[=""] Output JSON with the specified comma-separated \fBfields\fR, or all fields .PP \fB--no-input\fP[=false] Disable prompts and implicit editor/browser interactions .PP \fB--remote\fP="" Git \fBremote\fR used for repository discovery .PP \fB-R\fP, \fB--repo\fP="" Select a repository as \fBOWNER/REPO\fR or URL .PP \fB--sudo\fP="" Perform API requests as this \fBuser\fR (requires an administrator account) .PP \fB--template\fP="" Format JSON output using a Go \fBtemplate\fR; implies --json (see gt help formatting) .PP \fB--user\fP="" Account \fBname\fR on the selected instance .SH EXAMPLE .EX $ gt doctor # Check another repository and instance $ gt doctor -R gitea.com/gitea/cli $ gt doctor --jq '.checks[] | select(.status == "failed")' .EE .SH SEE ALSO \fBgt(1)\fP