← 返回命令列表

Linux command

tea 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Log in to a Gitea instance

tea login add --url [https://gitea.example.com] --token [your_token]

List issues

tea issues

Create a new issue

tea issues create --title "[Bug report]" --body "[Description]"

List pull requests

tea pulls

Create a pull request

tea pulls create --title "[Feature]" --base [main] --head [feature-branch]

Checkout a pull request

tea pulls checkout [42]

List repositories

tea repos

Clone a repository

tea clone [owner/repo]

说明

tea is a command-line client for interacting with Gitea servers. It provides functionality similar to GitHub's gh CLI, allowing management of repositories, issues, pull requests, and other entities directly from the terminal. The tool uses context from the current git repository when available, detecting the remote Gitea server and repository automatically. It works best with an upstream/fork workflow where the local main branch tracks the upstream repository. Multiple Gitea instances can be configured via tea logins add, with one set as default. Configuration is stored in $XDG_CONFIG_HOME/tea (typically ~/.config/tea). Useful commands include tea pulls checkout to fetch and switch to a PR branch locally, and tea open to quickly open the current repository in a web browser.

参数

--login, -l _name_
Use a specific login configuration
--repo, -r _owner/repo_
Specify repository (default: detected from current directory)
--output, -o _format_
Output format: simple, table, csv, tsv, yaml, json
--help, -h
Show help for command
--version, -v
Show version

FAQ

What is the tea command used for?

tea is a command-line client for interacting with Gitea servers. It provides functionality similar to GitHub's gh CLI, allowing management of repositories, issues, pull requests, and other entities directly from the terminal. The tool uses context from the current git repository when available, detecting the remote Gitea server and repository automatically. It works best with an upstream/fork workflow where the local main branch tracks the upstream repository. Multiple Gitea instances can be configured via tea logins add, with one set as default. Configuration is stored in $XDG_CONFIG_HOME/tea (typically ~/.config/tea). Useful commands include tea pulls checkout to fetch and switch to a PR branch locally, and tea open to quickly open the current repository in a web browser.

How do I run a basic tea example?

Run `tea login add --url [https://gitea.example.com] --token [your_token]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --login, -l _name_ do in tea?

Use a specific login configuration