CLI 目录 横向对比 FCRS-1.0 标准 /llms.txt
← 返回 CLI 目录

Gitea tea

$ tea 官方出品 中风险
Gitea · 代码托管与研发协同 · MIT · macos / linux / windows

Gitea 与兼容 Forgejo 实例的官方命令行工具,暴露 Issue、Pull Request、仓库与通知管理,并提供机读友好的 --output json 格式。

FCRS-1.0 综合评分
81 /100
良好 (Good)
中置信度 (源码/文档)
零摩擦安装命令
brew install tea
CLI vs MCP 选型建议 优先选 CLI

轻量 Gitea 脚本场景直接使用 tea 配合 --output json 即可,无需额外配置专用 MCP 服务器。

Agent 友好度体检单

✓ 原生 JSON 输出
— 字段裁剪
✓ 无头非交互
— 支持 Dry-Run
— 只读模式开关
— 支持 NO_COLOR
✓ 自省/Schema 发现
— 官方 SKILL.md

当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。

FCRS-1.0 六维评分拆解

Agent 友好度 19 / 25

列表和查看子命令支持 --output json,但未传全参数时 tea login add 或创建命令可能触发交互提示。

  • Supports --output json (-o json) across issues, pulls, and releases
  • Interactive prompts occur if required flags are omitted on create commands
安全与权限边界 19 / 25

配置中支持以 --login 命名隔离多个实例,但远程变更命令缺少 --dry-run。

  • Supports named --login profiles in ~/.config/tea/config.yml
  • No global --dry-run flag on write operations
安装与运行摩擦 14 / 15

静态 Go 单二进制,可通过 Homebrew、go install 与官方发布包跨平台安装。

  • Cross-platform Go binary for macOS, Linux, and Windows
能力覆盖与边际价值 13 / 15

无重型依赖即可覆盖日常 Gitea PR、Issue 与 Release 工作流。

  • Native support for pulls, issues, releases, and notifications
维护与来源背书 8 / 10

Gitea 官方组织以 MIT 协议维护,社区持续迭代。

  • Hosted under gitea/tea official repository
文档与可验证性 8 / 10

README 与 --help 说明清晰,但手册深度略逊于 gh 或 glab。

  • Documented CLI flags in tea --help and repository README

安全边界、鉴权与放权指南

鉴权方式
环境变量密钥 本地配置文件
凭证存储位置

将实例登录信息与 API Token 保存在 ~/.config/tea/config.yml;支持通过 --login 在多个 Gitea 服务器间切换。

潜在副作用
只读查询 本地写入 远端写入 破坏性删除
费用与配额提示

MIT 开源免费 CLI;对接免费自建或托管的 Gitea 实例。

可复制到 CLAUDE.md / AGENTS.md 的安全护栏
# Gitea tea Agent Rules
- Always pass `--output json` when listing or viewing resources.
- Specify `--login <name>` when multiple Gitea remotes are configured.
- Confirm before merging pull requests or deleting releases.

Agent 高频安全命令配方

只读查询(安全推荐)

以 JSON 列出待处理 Pull Request
tea pulls list --output json

以 JSON 格式输出待处理 PR,便于脚本解析。

以 JSON 列出待处理 Issue
tea issues list --output json

获取结构化 JSON 格式的仓库 Issue 列表。

受控写入与预演

使用显式参数创建 Issue
tea issues create --title "fix: build script" --description "Details here"

显式传入 --title 与 --description,确保命令无交互直接完成。

核心优势

  • + 列表与详情命令均具备整洁的 --output json 输出格式。
  • + 原生支持多自建服务器的 --login 配置隔离。
  • + 轻量级 Go 单二进制,启动迅速。

注意事项与踩坑点

  • ! 初次执行 tea login add 必须显式传入 --name、--url 与 --token 才能保持无交互。
  • ! 缺少类似 gh api 或 glab api 的原生底层 API 兜底子命令。

已验证兼容的 Agent 宿主

Claude Code Codex CLI Gemini CLI