{{tag>[cli gitea tea git pull-request]}}
====== tea (Gitea CLI) ======
''tea''는 여러 Gitea 인스턴스의 저장소, issue, pull request, release, organization 및 Gitea Actions를 터미널에서 관리하는 공식 CLI이다. 현재 Git 저장소의 remote 정보를 자동으로 활용하며, 설정은 ''$XDG_CONFIG_HOME/tea'' 아래에 저장한다.
===== Summary =====
* 공식 프로젝트: [[https://gitea.com/gitea/tea|gitea/tea]]
* 공식 다운로드: [[https://dl.gitea.com/tea/|dl.gitea.com/tea]]
* 이 문서에서 확인한 최신 안정 버전: ''v0.15.1'' (2026-08-02)
* 기본 형식: ''**tea** COMMAND [OPTIONS] ARGS''
===== Installation =====
==== Debian / Ubuntu ====
공식 APT repository나 ''.deb'' package는 제공되지 않는다. 공식 prebuilt binary를 설치한다. 아래 예시는 x86-64용이며, ARM64에서는 파일명의 ''linux-amd64''를 ''linux-arm64''로 바꾼다.
curl -LO https://dl.gitea.com/tea/0.15.1/tea-0.15.1-linux-amd64.xz
curl -LO https://dl.gitea.com/tea/0.15.1/tea-0.15.1-linux-amd64.xz.sha256
sha256sum --check tea-0.15.1-linux-amd64.xz.sha256
unxz tea-0.15.1-linux-amd64.xz
chmod +x tea-0.15.1-linux-amd64
sudo install -m 0755 tea-0.15.1-linux-amd64 /usr/local/bin/tea
==== RHEL / Fedora ====
공식 DNF/YUM repository나 ''.rpm'' package는 제공되지 않는다. 위 Linux prebuilt binary 설치 절차를 사용한다.
==== macOS ====
공식 README가 안내하는 Homebrew formula를 사용한다.
brew install tea
==== Windows ====
공식 ''winget'' package는 확인되지 않는다. [[https://dl.gitea.com/tea/0.15.1/|v0.15.1 공식 다운로드 디렉터리]]에서 시스템에 맞는 ''windows-amd64.exe'' 또는 ''windows-arm64.exe''를 내려받고, ''tea.exe''로 이름을 바꿔 ''PATH''에 포함된 디렉터리에 둔다. 공식 README에는 third-party MSYS2 package도 안내되어 있다.
==== 설치 확인 ====
tea --version
===== Usage =====
tea [GLOBAL_OPTIONS] COMMAND [COMMAND_OPTIONS] [ARGS]
* ''**tea** login add [OPTIONS]'' — Gitea 인스턴스 연결
* ''**--name** NAME''
* ''**--url** URL''
* ''**--token** ACCESS_TOKEN''
* ''**tea** login list'' — 저장된 로그인 목록 확인
* ''**tea** whoami'' — 현재 로그인 사용자 확인
* ''**tea** issues [OPTIONS]'' — issue 조회 및 관리
* ''**tea** pulls [OPTIONS]'' — pull request 조회 및 관리
* ''**tea** releases [OPTIONS]'' — release 관리
* ''**tea** actions [OPTIONS]'' — Gitea Actions secret 및 variable 관리
* ''**tea** api [OPTIONS] PATH'' — 인증된 Gitea API 요청
===== Options =====
* ''**--debug, --vvv**'' — debug mode 활성화
* ''**--help, -h**'' — 도움말 표시
* ''**--version, -v**'' — 버전 표시
각 subcommand의 옵션은 ''**tea** COMMAND **--help**''로 확인한다.
===== Examples =====
==== 로그인 ====
대화형 입력을 사용하면 token이 shell history나 process list에 노출될 위험을 줄일 수 있다.
tea login add
tea login list
tea whoami
명시적으로 인스턴스를 지정할 때는 다음 형식을 사용한다.
tea login add --name work --url https://git.example.com
실제 access token을 wiki, script, shell history 또는 Git 저장소에 기록하지 않는다. 필요한 최소 scope만 부여하고, 노출되었다면 즉시 폐기하고 재발급한다.
==== Pull Request ====
기존 명령 기록의 ''pr'' alias는 ''pulls''와 동일한 command family를 가리킨다.
tea pr create
tea pr list
tea pr show 42
tea pr checkout 42
tea pr merge 42
* ''**tea** pr create'' — Pull Request 생성
* ''**tea** pr list'' — Pull Request 목록
* ''**tea** pr show REQUEST'' — Pull Request 상세
* ''**tea** pr checkout REQUEST'' — Pull Request branch checkout
* ''**tea** pr merge REQUEST'' — Pull Request merge
==== 저장소 context와 명시적 대상 ====
# 현재 Git 저장소의 open pull request
tea pulls
# 특정 local repository
tea pulls --repo /path/to/repository
# 특정 Gitea repository와 login profile
tea pulls --repo owner/repository --login work
==== Gitea Actions ====
tea actions secrets list
tea actions secrets create API_KEY
tea actions variables list
tea actions variables set API_URL https://api.example.com
==== API 요청 ====
tea api /user
tea api /repos/owner/repository
===== Configuration =====
* 설정 기본 위치: ''$XDG_CONFIG_HOME/tea''
* 여러 Gitea 인스턴스는 named login profile로 구분한다.
* 현재 Git 저장소의 remote와 upstream tracking 정보가 있으면 ''tea''가 repository context를 자동 감지한다.
* 자동화에서는 ''--login''과 ''--repo''를 명시하면 다른 profile이나 저장소를 잘못 선택하는 일을 줄일 수 있다.
===== Compatibility =====
* 공식 prebuilt binary: Linux, macOS, Windows 및 FreeBSD용 build 제공
* 공식 Homebrew 설치: macOS
* third-party package: Arch Linux, Alpine Linux, Windows MSYS2
* shell completion은 숨겨진 ''tea completion SHELL'' command로 생성할 수 있다.
source <(tea completion bash)
source <(tea completion zsh)
tea completion fish > ~/.config/fish/completions/tea.fish
===== Help =====
아래 내용은 이 저장소의 base environment에 설치된 ''tea 0.14.1''에서 직접 확인했다. 설치된 버전에 따라 command와 option이 달라질 수 있다.
++++ tea --help |
NAME:
tea - command line tool to interact with Gitea
USAGE:
tea [global options] [command [command options]]
COMMANDS:
help, h Shows a list of commands or help for one command
ENTITIES:
issues, issue, i List, create and update issues
pulls, pull, pr Manage and checkout pull requests
labels, label Manage issue labels
milestones, milestone, ms List and create milestones
releases, release, r Manage releases
times, time, t Operate on tracked times of a repository's issues & pulls
organizations, organization, org List, create, delete organizations
repos, repo Manage repositories
branches, branch, b Consult branches
actions, action Manage repository actions
webhooks, webhook, hooks, hook Manage webhooks
comment, c Add a comment to an issue / pr
HELPERS:
open, o Open something of the repository in web browser
notifications, notification, n Show notifications
clone, C Clone a repository locally
api Make an authenticated API request
MISCELLANEOUS:
whoami Show current logged in user
admin, a Operations requiring admin access on the Gitea instance
SETUP:
logins, login Log in to a Gitea server
logout Log out from a Gitea server
ssh-keys, ssh-key Manage SSH public keys
GLOBAL OPTIONS:
--debug, --vvv Enable debug mode
--help, -h show help
--version, -v print the version
++++
===== Troubleshooting =====
* repository를 찾지 못하면 Git remote를 확인하거나 ''--repo OWNER/REPOSITORY''와 ''--login NAME''을 명시한다.
* 인증 오류가 나면 ''tea login list''와 ''tea whoami''로 선택된 profile을 확인한다.
* MFA/SSO가 있는 인스턴스에서는 browser에서 최소 권한의 application token을 생성한 뒤 ''tea login add''의 대화형 절차를 사용하는 방식이 가장 호환성이 높다.
* 자세한 subcommand 사용법은 ''tea COMMAND --help''로 확인한다.
===== See Also =====
* [[git:ko|Git]]
* [[gh:ko|GitHub CLI (gh)]]
* [[curl:ko|curl]]
* [[https://about.gitea.com/products/tea/|Gitea Tea 제품 페이지]]
* [[https://gitea.com/gitea/tea/src/branch/main/README.md|공식 README]]
===== History =====
* codex:: 2026-08-10 공식 v0.15.1 설치 안내, 현재 command 구조, 안전한 로그인·PR·Actions·API 예제 및 실제 v0.14.1 help를 추가하고 ''tea:ko'' namespace page로 마이그레이션.
{{indexmenu>.#1|js}}