1.6 KiB
1.6 KiB
tea CLI — Gitea CLI Fallback
tea is a CLI tool for Gitea. Use it as a backup when MCP tools fail or are unavailable.
Prerequisites
teamust be installed (brew install teaorgo install gitea.com/gitea/tea@latest)- Authenticated via
tea login add(seereferences/auth.md)
Common Operations
Issues
# List issues
tea issues --repo owner/repo
# View issue details
tea issues --repo owner/repo 12
# Search issues
tea issues --repo owner/repo --state open --labels bug
# Create issue comment
tea comment --repo owner/repo 12 "comment body"
API fallback (raw)
When a specific tea subcommand doesn't exist, use the raw API:
# GET request
tea api GET /repos/{owner}/{repo}/issues/{index}
# POST request
tea api POST /repos/{owner}/{repo}/issues/{index}/comments --body '{"body": "text"}'
# Wiki pages
tea api GET /repos/{owner}/{repo}/wiki/pages
tea api GET /repos/{owner}/{repo}/wiki/page/{pageName}
tea api POST /repos/{owner}/{repo}/wiki/new --body '{"title":"page","content_base64":"..."}'
tea api PATCH /repos/{owner}/{repo}/wiki/page/{pageName} --body '{"content_base64":"..."}'
Debugging
# Check current login
tea login list
# Test connectivity
tea api GET /version
# View repo info
tea repos --repo owner/repo
When to Use tea vs MCP
| Scenario | Preferred |
|---|---|
| Normal workflow | MCP tools (mcp__gitea__*) |
| MCP server down / unreachable | tea CLI |
| Investigating errors / debugging | tea api for raw responses |
| Bulk operations / scripting | tea CLI in Bash |