.nh .TH "GT-RUN-WATCH" "1" "Nov 2026" "gitea-cli" "gitea-cli Manual" .SH NAME gt-run-watch - Watch a run until it completes .SH SYNOPSIS \fBgt run watch [] [flags]\fP .SH DESCRIPTION Watch a run until it completes, refreshing its jobs and steps on a terminal. .PP The command exits with 5 when the run completes without success, with 3 when --timeout expires, and with 1 when gt itself fails, such as on a rejected request. It polls on through an outage of the instance of up to 5 minutes. .PP With --expect-head, it exits with 6 before waiting when the run is for another commit, such as one an earlier push triggered. A full or abbreviated SHA matches the start of the run's commit; another revision, such as HEAD, is resolved in the local clone. .SS ARGUMENTS .EX A run can be supplied as its ID ("34", "#34") or its URL ("https://gitea.example.com/OWNER/REPO/actions/runs/34"). Without an argument, gt asks for one of the repository's recent runs in a terminal. .EE .SS JSON FIELDS .EX actor, attempt, branch, commit, completed_at, conclusion, created_at, event, id, jobs, run_number, started_at, status, title, updated_at, url, workflow, workflow_path .EE .SH OPTIONS \fB--expect-head\fP="" Fail unless the run is for this \fBcommit\fR: a SHA, or a revision of the local clone .PP \fB-h\fP, \fB--help\fP[=false] help for watch .PP \fB-i\fP, \fB--interval\fP=3s Refresh interval .PP \fB--timeout\fP=1h0m0s Maximum time to wait .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--user\fP="" Account \fBname\fR on the selected instance .SH EXAMPLE .EX # watch a run $ gt run watch 34 # pick one of the runs in progress $ gt run watch # wait for a run in a script, for at most 10 minutes $ gt run watch 34 --timeout 10m && echo deployed # wait only if the run is for the commit checked out $ gt run watch 34 --expect-head HEAD .EE .SH SEE ALSO \fBgt-run(1)\fP