Gitea Tea CLI
3 min read
The official command-line client for Gitea servers. Similar to GitHub's gh CLI — allows managing repositories, issues, pull requests, releases, milestones, labels, actions secrets/variables, webhooks, notifications, and more from the terminal.
Installation
sh
# macOS
brew install tea
# Arch Linux
sudo pacman -S tea
# Alpine Linux
sudo apk add tea
# Debian/Ubuntu (as tea-cli)
sudo apt install tea-cli
# Go
go install gitea.dev/tea@latest
# Source
git clone https://gitea.com/gitea/tea.git
cd tea && make
Setup
sh
tea login add # interactive: server URL, token, user
tea login ls # list configured logins
tea login default # set default login
Core Commands
Issues
sh
tea issues # list open issues (current repo)
tea issue ls # same
tea issue 42 # show issue #42
tea issue create # create new issue
tea issue edit 42 # edit issue
tea issue close 42 # close issue
tea issue reopen 42 # reopen issue
Pull Requests
sh
tea pulls # list open PRs
tea pr ls # same
tea pr checkout 7 # checkout PR #7 locally
tea pr create # create new PR
tea pr merge 7 # merge PR #7
tea pr approve 7 # approve PR
tea pr close 7 # close PR
tea pr reopen 7 # reopen PR
Releases
sh
tea releases # list releases
tea release create v1.0.0 # create release
tea release edit v1.0.0 # edit release notes
tea release delete v1.0.0 # delete release
Repositories
sh
tea repos # list repos
tea repo search term # search repos
tea repo create myrepo # create new repo
tea repo fork org/repo # fork a repo
tea repo delete org/repo # delete repo
Actions
sh
tea actions secrets list # list Action secrets
tea actions secrets create KEY # create secret (prompts for value)
tea actions variables ls # list Action variables
tea actions variables set KEY val
tea actions runs list # list Action runs
tea actions workflows list # list workflows
tea actions workflows dispatch # trigger workflow
Comments
sh
tea comment 42 "message" # add comment to issue/PR #42
tea comment add 42 "message" # explicit add (same as above)
tea comment list 42 # list comments on issue/PR #42
tea comment edit <id> "text" # edit a specific comment
tea comment delete <id> # delete a comment
Notifications
sh
tea notifications # show notifications
tea notifications --mine # only mine
tea notifications read # mark as read
tea notifications pin # pin notification
Labels, Milestones, Webhooks
sh
tea labels # list labels
tea label create "bug" "#ff0000"
tea milestones # list milestones
tea ms create v1.0 --deadline 2026-12-31
tea webhooks list # list webhooks
tea webhooks create https://example.com/hook --events push
Other
sh
tea open # open repo in browser
tea open 42 # open issue/PR #42 in browser
tea clone org/repo # clone repo
tea whoami # show current user
tea admin users list # admin operations
Context-Aware Behavior
tea detects the remote Gitea server and repository from the current directory's git remote. Override with --repo org/repo or --remote upstream. Works best in upstream/fork workflow where local main tracks the upstream.
Configuration
~/.config/tea/ — YAML-based, supports multiple Gitea instances (one default).