| name | tea |
| description | Command-line tool to interact with Gitea. Use when working with Gitea repositories, issues, pull requests, releases, labels, milestones, organizations, branches, actions, webhooks, or notifications. Provides local helpers like 'tea pr checkout'. Works best in an upstream/fork workflow when the local main branch tracks the upstream repo. Configuration is persisted in $XDG_CONFIG_HOME/tea. |
tea - Gitea CLI
A productivity helper for Gitea. Manages most entities on one or multiple Gitea instances and provides local helpers.
When to Use This Skill
- Managing Gitea repositories (create, fork, migrate, delete)
- Working with issues (list, create, edit, close, reopen)
- Managing pull requests (list, create, checkout, merge, review, approve, reject)
- Managing labels, milestones, and releases
- Tracking time on issues/PRs
- Managing organizations
- Working with branches (list, protect, unprotect)
- Managing GitHub Actions (secrets, variables, runs, workflows)
- Managing webhooks
- Viewing and managing notifications
Core Concepts
Authentication
tea uses a login system to manage Gitea server connections. Each login stores:
- Server URL
- Authentication method (token, OAuth, SSH key, or basic auth)
- Optional: client ID, scopes, OTP token
Context Awareness
tea tries to use context provided by the repository in $PWD if available. Use --repo or --remote flags to override.
Output Formats
All commands support --output (-o) flag with formats: simple, table, csv, tsv, yaml, json
Commands
logins - Authentication Management
tea logins list
tea logins add --url https://gitea.example.com --token YOUR_TOKEN --name myserver
tea logins add --url https://gitea.example.com --ssh-key /path/to/key --name sshserver
tea logins add --url https://gitea.example.com --oauth --name oauthserver
tea logins default --name myserver
tea logins delete --name myserver
tea whoami
issues - Issue Management
tea issues list --state open
tea issues list --labels bug,urgent
tea issues list --assignee username
tea issues list --milestone "v1.0"
tea issues create --title "Bug in login" --description "Description here"
tea issues create -t "Issue title" -d "Description" --labels bug --assignees user1,user2
tea issues edit --title "New title" 123
tea issues edit --add-labels feature --remove-labels bug 123
tea issues close 123
tea issues reopen 123
pulls - Pull Request Management
tea pulls list --state open
tea pulls checkout 123
tea pulls checkout 123 --branch
tea pulls create --title "Feature X" --description "Description" --base main
tea pulls create -t "PR title" -d "PR body" --head feature-branch
tea pulls merge 123
tea pulls merge 123 --style squash
tea pulls review 123
tea pulls approve 123
tea pulls reject 123 --message "Needs changes"
tea pulls close 123
tea pulls reopen 123
tea pulls clean 123
labels - Label Management
tea labels list
tea labels create --name bug --color "ff0000" --description "Bug label"
tea labels update --id 1 --name "critical bug" --color "ff0000"
tea labels delete --id 1
milestones - Milestone Management
tea milestones list --state open
tea milestones create --title "v1.0" --description "First release"
tea milestones create -t "v2.0" --deadline 2024-12-31
tea milestones close 1
tea milestones delete 1
tea milestones reopen 1
tea milestones issues --add 1 123
tea milestones issues --remove 1 123
releases - Release Management
tea releases list
tea releases create --title "v1.0.0" --tag v1.0.0 --note "Release notes"
tea releases create -t "v1.0.0" -t v1.0.0 -n "Notes" --draft --prerelease
tea releases edit --title "New title" 1
tea releases delete --confirm 1
tea releases delete --confirm --delete-tag 1
tea releases assets list 1
tea releases assets create 1 --asset /path/to/file.zip
tea releases assets delete --confirm 1 asset-name
times - Time Tracking
tea times list
tea times list --repo owner/repo
tea times list --mine
tea times add 123 --duration 2h30m
tea times delete 1
tea times reset 123
organizations - Organization Management
tea orgs list
tea orgs create --name myorg --description "My Organization"
tea orgs delete --name myorg
repos - Repository Management
tea repos list
tea repos list --owner username
tea repos list --type fork
tea repos search --keyword myproject
tea repos search --topic machine-learning
tea repos create --name myrepo --description "My new repo"
tea repos create -n newrepo --private --init --gitignores Go --license MIT
tea repos fork --owner gitea --repo tea
tea repos migrate --clone-url https://github.com/user/repo --service github --issues --labels --milestones
tea repos delete --owner username --name reponame --force
tea repos edit --owner user --repo name --private false
tea repos edit -R owner/repo --description "New description"
branches - Branch Management
tea branches list
tea branches protect main
tea branches unprotect main
actions - GitHub Actions Management
tea actions secrets list
tea actions secrets create --name SECRET_NAME --value value
tea actions secrets create --name NAME --stdin
tea actions secrets delete --confirm --name NAME
tea actions variables list
tea actions variables set --name VAR_NAME --value value
tea actions variables delete --confirm --name NAME
tea actions runs list
tea actions runs list --status success --branch main
tea actions runs view 123
tea actions runs view 123 --jobs
tea actions runs logs 123
tea actions runs logs 123 --follow
tea actions runs delete --confirm 123
tea actions workflows list
webhooks - Webhook Management
tea webhooks list
tea webhooks list --repo owner/repo
tea webhooks create --url https://example.com/webhook --events push,issues
tea webhooks create -u URL --type slack
tea webhooks update --id 1 --url new-url --active
tea webhooks delete --confirm --id 1
comment - Add Comments
tea comment 123 --body "This is a comment"
tea comment -r owner/repo 123 -d "Comment text"
open - Open in Browser
tea open
tea open --repo owner/repo
tea open issues 123
tea open pulls 123
tea open releases 1
notifications - Notifications
tea notifications list
tea notifications list --states unread,pinned
tea notifications list --mine
Common Options
--login, -l: Use a different Gitea login
--repo, -r: Override local repository path or gitea slug (e.g., "owner/repo")
--remote, -R: Discover Gitea login from remote
--output, -o: Output format (simple, table, csv, tsv, yaml, json)
--limit, --lm: Items per page (default: 30)
--page, -p: Page number (default: 1)
Installation
go install github.com/gitea/tea@latest
Configuration
Configuration is stored in $XDG_CONFIG_HOME/tea (typically ~/.config/tea).
Guidelines
- Always authenticate first using
tea logins add before running other commands
- Use
--output json or --output yaml for scriptable output
- Use
--limit and --page for paginated results
- Use
--confirm or -y flag when deleting to skip prompts
- tea works best when run from within a git repository cloned from Gitea
Gotchas
- Authentication required: Most commands require a login. Run
tea logins add first.
- Repository context: tea auto-detects the repository from PWD. Use
--repo owner/repo if not in a git repo.
- Output format: Use
--output json for programmatic access; table format is default.
- Delete confirmation: Most delete commands require
--confirm or -y flag.
- PR checkout:
tea pulls checkout creates a local branch but doesn't switch to it automatically; use git checkout after.
- Time tracking: Time duration format accepts formats like "2h30m" or "150m".
Integration
Related skills in this collection:
- skill-creator - For creating and updating skills
- git - For git operations that work well with tea