Add comprehensive Claude Code skills for Gitea's tea CLI tool. Includes: - Complete skill documentation (skills/SKILL.md) - Detailed examples (skills/examples.md) - User-facing README with installation and usage - Claude Code instructions (CLAUDE.md) - Git ignore file 🍵 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
405 lines
6.6 KiB
Markdown
405 lines
6.6 KiB
Markdown
# Tea CLI Examples
|
|
|
|
Quick reference for common `tea` commands.
|
|
|
|
## Setup
|
|
|
|
```bash
|
|
# Login to Gitea
|
|
tea login add --url https://git.ajet.fyi
|
|
|
|
# Check who you're logged in as
|
|
tea whoami
|
|
|
|
# List all configured logins
|
|
tea login ls
|
|
|
|
# Set default login
|
|
tea login default
|
|
```
|
|
|
|
## Pull Requests
|
|
|
|
```bash
|
|
# List all PRs
|
|
tea pr ls
|
|
|
|
# List open PRs only
|
|
tea pr ls --state open
|
|
|
|
# View specific PR with comments
|
|
tea pr 42 --comments
|
|
|
|
# Create a PR
|
|
tea pr create \
|
|
--title "Feature: Add authentication" \
|
|
--description "Implements JWT authentication" \
|
|
--base main \
|
|
--head feature/auth
|
|
|
|
# Create PR with labels and assignee
|
|
tea pr create -t "Fix bug" -d "Description" \
|
|
--labels bug,urgent \
|
|
--assignees username
|
|
|
|
# Checkout a PR locally
|
|
tea pr checkout 42
|
|
tea pr co 42 --branch # Create local branch
|
|
|
|
# Review a PR
|
|
tea pr review 42
|
|
|
|
# Approve a PR
|
|
tea pr approve 42
|
|
|
|
# Request changes
|
|
tea pr reject 42
|
|
|
|
# Merge a PR
|
|
tea pr merge 42 # Default merge
|
|
tea pr merge 42 --style squash # Squash merge
|
|
tea pr merge 42 --style rebase # Rebase merge
|
|
|
|
# Close a PR without merging
|
|
tea pr close 42
|
|
|
|
# Reopen a closed PR
|
|
tea pr reopen 42
|
|
|
|
# Clean up branches after PR is merged
|
|
tea pr clean 42
|
|
```
|
|
|
|
## Issues
|
|
|
|
```bash
|
|
# List all issues
|
|
tea issues ls
|
|
|
|
# List open issues
|
|
tea issues ls --state open
|
|
|
|
# List issues with specific label
|
|
tea issues ls --labels bug
|
|
|
|
# List issues by author
|
|
tea issues ls --author username
|
|
|
|
# Search issues
|
|
tea issues ls --keyword "authentication"
|
|
|
|
# View specific issue
|
|
tea issues 42
|
|
|
|
# Create an issue
|
|
tea issues create \
|
|
--title "Bug: Login fails" \
|
|
--description "Detailed description of the bug"
|
|
|
|
# Create issue with labels and milestone
|
|
tea issues create -t "Feature request" \
|
|
-d "Description" \
|
|
--labels enhancement \
|
|
--milestone v1.0
|
|
|
|
# Edit an issue
|
|
tea issues edit 42 --title "New title"
|
|
|
|
# Add labels to an issue
|
|
tea issues edit 42 --add-labels bug,urgent
|
|
|
|
# Remove labels
|
|
tea issues edit 42 --remove-labels wontfix
|
|
|
|
# Assign issue to milestone
|
|
tea issues edit 42 --milestone v1.0
|
|
|
|
# Close an issue
|
|
tea issues close 42
|
|
|
|
# Reopen an issue
|
|
tea issues reopen 42
|
|
```
|
|
|
|
## Comments
|
|
|
|
```bash
|
|
# Add comment to issue
|
|
tea comment 42 "This is my comment"
|
|
|
|
# Add comment to PR
|
|
tea comment 123 "LGTM! 👍"
|
|
|
|
# Add multiline comment
|
|
tea comment 42 "First line
|
|
Second line
|
|
Third line"
|
|
```
|
|
|
|
## Releases
|
|
|
|
```bash
|
|
# List all releases
|
|
tea releases ls
|
|
|
|
# Create a release
|
|
tea releases create \
|
|
--tag v1.0.0 \
|
|
--title "Version 1.0.0" \
|
|
--note "Release notes here"
|
|
|
|
# Create release with asset
|
|
tea releases create \
|
|
--tag v1.0.0 \
|
|
-t "v1.0.0" \
|
|
-n "Release notes" \
|
|
--asset ./binary
|
|
|
|
# Create release from file
|
|
tea releases create \
|
|
--tag v1.0.0 \
|
|
-t "v1.0.0" \
|
|
--note-file RELEASE_NOTES.md
|
|
|
|
# Create draft release
|
|
tea releases create --tag v1.0.0 -t "v1.0.0" --draft
|
|
|
|
# Create pre-release
|
|
tea releases create --tag v1.0.0-beta -t "v1.0.0 Beta" --prerelease
|
|
|
|
# Edit a release
|
|
tea releases edit v1.0.0 --title "New title"
|
|
|
|
# Delete a release
|
|
tea releases delete v1.0.0 --confirm
|
|
|
|
# Delete release and tag
|
|
tea releases delete v1.0.0 --confirm --delete-tag
|
|
```
|
|
|
|
## Labels
|
|
|
|
```bash
|
|
# List all labels
|
|
tea labels ls
|
|
|
|
# Save labels to file
|
|
tea labels ls --save > labels.yaml
|
|
|
|
# Create a label
|
|
tea labels create \
|
|
--name bug \
|
|
--color "#ff0000" \
|
|
--description "Bug reports"
|
|
|
|
# Create labels from file
|
|
tea labels create --file labels.yaml
|
|
|
|
# Update a label
|
|
tea labels update \
|
|
--id 123 \
|
|
--name "critical-bug" \
|
|
--color "#cc0000"
|
|
|
|
# Delete a label
|
|
tea labels delete --id 123
|
|
```
|
|
|
|
## Milestones
|
|
|
|
```bash
|
|
# List all milestones
|
|
tea milestones ls
|
|
|
|
# List open milestones
|
|
tea milestones ls --state open
|
|
|
|
# Create a milestone
|
|
tea milestones create \
|
|
--title "v1.0" \
|
|
--description "First stable release"
|
|
|
|
# Create milestone with deadline
|
|
tea milestones create \
|
|
-t "v1.0" \
|
|
-d "First release" \
|
|
--deadline 2026-12-31
|
|
|
|
# View milestone issues
|
|
tea milestones issues v1.0
|
|
|
|
# Add issue to milestone
|
|
tea milestones issues add v1.0 42
|
|
|
|
# Remove issue from milestone
|
|
tea milestones issues remove v1.0 42
|
|
|
|
# Close a milestone
|
|
tea milestones close v1.0
|
|
|
|
# Reopen a milestone
|
|
tea milestones reopen v1.0
|
|
|
|
# Delete a milestone
|
|
tea milestones delete v1.0
|
|
```
|
|
|
|
## Repositories
|
|
|
|
```bash
|
|
# Show current repository details
|
|
tea repo
|
|
|
|
# Clone a repository
|
|
tea clone owner/repo
|
|
|
|
# Clone with depth
|
|
tea clone owner/repo --depth 1
|
|
|
|
# Clone to specific directory
|
|
tea clone owner/repo /path/to/dir
|
|
```
|
|
|
|
## Branches
|
|
|
|
```bash
|
|
# List all branches
|
|
tea branches ls
|
|
|
|
# List with details
|
|
tea branches ls --output table
|
|
```
|
|
|
|
## Notifications
|
|
|
|
```bash
|
|
# List all notifications
|
|
tea notifications
|
|
|
|
# List only your notifications
|
|
tea notifications --mine
|
|
|
|
# Mark notifications as read
|
|
tea notifications --read
|
|
```
|
|
|
|
## Organizations
|
|
|
|
```bash
|
|
# List organizations
|
|
tea orgs ls
|
|
|
|
# Create an organization
|
|
tea orgs create --name my-org --description "My organization"
|
|
|
|
# Delete an organization
|
|
tea orgs delete my-org
|
|
```
|
|
|
|
## Open in Browser
|
|
|
|
```bash
|
|
# Open current repo in browser
|
|
tea open
|
|
|
|
# Open specific issue/PR in browser
|
|
tea open 42
|
|
|
|
# Open repo page
|
|
tea open --repo owner/repo
|
|
```
|
|
|
|
## Output Formats
|
|
|
|
```bash
|
|
# JSON output
|
|
tea pr ls --output json
|
|
|
|
# YAML output
|
|
tea issues ls -o yaml
|
|
|
|
# CSV output
|
|
tea releases ls -o csv
|
|
|
|
# TSV output
|
|
tea milestones ls -o tsv
|
|
|
|
# Simple output (minimal)
|
|
tea pr ls -o simple
|
|
```
|
|
|
|
## Advanced Filtering
|
|
|
|
```bash
|
|
# Filter PRs by multiple criteria
|
|
tea pr ls \
|
|
--state open \
|
|
--labels bug \
|
|
--milestone v1.0
|
|
|
|
# Filter issues by date range
|
|
tea issues ls \
|
|
--from 2026-01-01 \
|
|
--until 2026-12-31
|
|
|
|
# Complex issue search
|
|
tea issues ls \
|
|
--author username \
|
|
--labels bug,urgent \
|
|
--milestone v1.0 \
|
|
--state open
|
|
|
|
# Pagination
|
|
tea pr ls --page 2 --limit 50
|
|
```
|
|
|
|
## Using with Specific Repositories
|
|
|
|
```bash
|
|
# Work with a specific repo
|
|
tea pr ls --repo owner/repo
|
|
|
|
# Work with different Gitea login
|
|
tea issues ls --login my-gitea
|
|
|
|
# Override remote
|
|
tea pr create --remote origin -t "Title" -d "Description"
|
|
```
|
|
|
|
## Combining with Git
|
|
|
|
```bash
|
|
# Create branch, make changes, create PR
|
|
git checkout -b feature/new-thing
|
|
# ... make changes ...
|
|
git add .
|
|
git commit -m "Add new feature"
|
|
git push -u origin feature/new-thing
|
|
tea pr create -t "Feature: New thing" -d "Description"
|
|
|
|
# Review PR locally
|
|
tea pr checkout 42
|
|
# ... test changes ...
|
|
git checkout main
|
|
tea pr approve 42
|
|
tea pr merge 42
|
|
```
|
|
|
|
## Tips and Tricks
|
|
|
|
```bash
|
|
# Get JSON output for scripting
|
|
tea pr ls -o json | jq '.[] | select(.state == "open")'
|
|
|
|
# Check specific fields
|
|
tea pr ls --fields index,title,state,author
|
|
|
|
# Use aliases
|
|
alias tpr='tea pr'
|
|
alias ti='tea issues'
|
|
alias trl='tea releases'
|
|
|
|
# Quick PR creation from current branch
|
|
git push && tea pr create -t "$(git log -1 --pretty=%s)" -d "$(git log -1 --pretty=%b)"
|
|
```
|