{
  "id": "tea",
  "name": "Tea",
  "homepage": "https://about.gitea.com/products/tea/",
  "description": "The official command-line interface for Gitea.",
  "executables": [
    "tea"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/tea/config.yml"
    ],
    "exclude": [],
    "secret": [],
    "side_effect": false,
    "secret_paths": [
      {
        "file": "[configHome]/tea/config.yml",
        "match": {
          "key_path": [
            "logins.*.token",
            "logins.*.refresh_token"
          ]
        }
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Gitea CLI",
    "description": "Common tea jobs: list issues, create an issue, create a pull request. Login management, reviews, releases and the other subcommands are outside this form.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "issues",
          "list"
        ],
        "label": "List issues",
        "description": "List issues of the repository. Fields and paging beyond the ones shown are left out.",
        "source": [
          {
            "id": "tea-cli",
            "kind": "manual",
            "url": "https://gitea.com/gitea/tea/raw/branch/main/docs/CLI.md",
            "revision": "main 2026-10-27",
            "evidence": "### list, ls\n\nList issues of the repository\n\n**--assignee, -a**=\"\":\n\n**--author, -A**=\"\":\n\n**--keyword, -k**=\"\": Filter by search string\n\n**--labels, -L**=\"\": Comma-separated list of labels to match issues against.\n\n**--limit, --lm**=\"\": specify limit of items per page (default: 30)\n\n**--milestones, -m**=\"\": Comma-separated list of milestones to match issues against.\n\n**--output, -o**=\"\": Output format. (simple, table, csv, tsv, yaml, json)\n\n**--repo, -r**=\"\": Override local repository path or gitea repository slug to interact with. Optional\n\n**--state**=\"\": Filter by state (all|open|closed)\n"
          }
        ],
        "field": [
          {
            "id": "state",
            "label": "State",
            "type": "enum",
            "option": [
              "--state"
            ],
            "choices": [
              {
                "value": "all",
                "label": "All"
              },
              {
                "value": "open",
                "label": "Open"
              },
              {
                "value": "closed",
                "label": "Closed"
              }
            ],
            "sources": [
              "tea-cli"
            ]
          },
          {
            "id": "keyword",
            "label": "Search text",
            "type": "string",
            "option": [
              "--keyword",
              "-k"
            ],
            "sources": [
              "tea-cli"
            ]
          },
          {
            "id": "labels",
            "label": "Labels",
            "description": "Comma-separated list of labels.",
            "type": "string",
            "option": [
              "--labels",
              "-L"
            ],
            "sources": [
              "tea-cli"
            ]
          },
          {
            "id": "milestones",
            "label": "Milestones",
            "description": "Comma-separated list of milestones.",
            "type": "string",
            "option": [
              "--milestones",
              "-m"
            ],
            "sources": [
              "tea-cli"
            ]
          },
          {
            "id": "assignee",
            "label": "Assignee",
            "type": "string",
            "option": [
              "--assignee",
              "-a"
            ],
            "sources": [
              "tea-cli"
            ]
          },
          {
            "id": "author",
            "label": "Author",
            "type": "string",
            "option": [
              "--author",
              "-A"
            ],
            "sources": [
              "tea-cli"
            ]
          },
          {
            "id": "limit",
            "label": "Items per page",
            "type": "integer",
            "option": [
              "--limit",
              "--lm"
            ],
            "sources": [
              "tea-cli"
            ]
          },
          {
            "id": "output",
            "label": "Output format",
            "type": "enum",
            "option": [
              "--output",
              "-o"
            ],
            "choices": [
              {
                "value": "simple",
                "label": "Simple"
              },
              {
                "value": "table",
                "label": "Table"
              },
              {
                "value": "csv",
                "label": "CSV"
              },
              {
                "value": "tsv",
                "label": "TSV"
              },
              {
                "value": "yaml",
                "label": "YAML"
              },
              {
                "value": "json",
                "label": "JSON"
              }
            ],
            "sources": [
              "tea-cli"
            ]
          },
          {
            "id": "repo",
            "label": "Repository",
            "description": "Local repository path or Gitea repository slug.",
            "type": "string",
            "option": [
              "--repo",
              "-r"
            ],
            "sources": [
              "tea-cli"
            ]
          }
        ],
        "task": [
          {
            "id": "open",
            "label": "Open issues",
            "fields": [
              "state",
              "labels",
              "repo"
            ],
            "set": {
              "state": [
                "open"
              ]
            }
          },
          {
            "id": "json",
            "label": "Export as JSON",
            "fields": [
              "state",
              "output",
              "repo"
            ],
            "set": {
              "output": [
                "json"
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "state",
              "keyword",
              "labels",
              "repo"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "milestones",
              "assignee",
              "author",
              "limit",
              "output"
            ]
          }
        ]
      },
      {
        "path": [
          "issues",
          "create"
        ],
        "label": "Create an issue",
        "description": "Create an issue on the repository. Deadline and referenced-version options are left out.",
        "source": [
          {
            "id": "tea-cli",
            "kind": "manual",
            "url": "https://gitea.com/gitea/tea/raw/branch/main/docs/CLI.md",
            "revision": "main 2026-10-27",
            "evidence": "### create, c\n\nCreate an issue on repository\n\n**--assignees, -a**=\"\": Comma-separated list of usernames to assign\n\n**--description, -d**=\"\":\n\n**--description-file**=\"\": Read description from file ('-' for stdin)\n\n**--labels, -L**=\"\": Comma-separated list of labels to assign\n\n**--milestone, -m**=\"\": Milestone to assign\n\n**--repo, -r**=\"\": Override local repository path or gitea repository slug to interact with. Optional\n\n**--title, -t**=\"\":\n"
          }
        ],
        "field": [
          {
            "id": "title",
            "label": "Title",
            "type": "string",
            "option": [
              "--title",
              "-t"
            ],
            "sources": [
              "tea-cli"
            ]
          },
          {
            "id": "description",
            "label": "Description",
            "type": "string",
            "option": [
              "--description",
              "-d"
            ],
            "sources": [
              "tea-cli"
            ]
          },
          {
            "id": "description_file",
            "label": "Description file",
            "type": "path",
            "option": [
              "--description-file"
            ],
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "tea-cli"
            ]
          },
          {
            "id": "labels",
            "label": "Labels",
            "description": "Comma-separated list of labels.",
            "type": "string",
            "option": [
              "--labels",
              "-L"
            ],
            "sources": [
              "tea-cli"
            ]
          },
          {
            "id": "assignees",
            "label": "Assignees",
            "description": "Comma-separated list of usernames.",
            "type": "string",
            "option": [
              "--assignees",
              "-a"
            ],
            "sources": [
              "tea-cli"
            ]
          },
          {
            "id": "milestone",
            "label": "Milestone",
            "type": "string",
            "option": [
              "--milestone",
              "-m"
            ],
            "sources": [
              "tea-cli"
            ]
          },
          {
            "id": "repo",
            "label": "Repository",
            "description": "Local repository path or Gitea repository slug.",
            "type": "string",
            "option": [
              "--repo",
              "-r"
            ],
            "sources": [
              "tea-cli"
            ]
          }
        ],
        "task": [
          {
            "id": "simple",
            "label": "Title and description",
            "fields": [
              "title",
              "description",
              "repo"
            ],
            "required": [
              "title"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "title",
              "description",
              "description_file",
              "repo"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "labels",
              "assignees",
              "milestone"
            ]
          }
        ]
      },
      {
        "path": [
          "pulls",
          "create"
        ],
        "label": "Create a pull request",
        "description": "Create a pull request from the current or a given branch. Agit flow and deadline options are left out.",
        "source": [
          {
            "id": "tea-cli",
            "kind": "manual",
            "url": "https://gitea.com/gitea/tea/raw/branch/main/docs/CLI.md",
            "revision": "main 2026-10-27",
            "evidence": "### create, c\n\nCreate a pull-request\n\n**--allow-maintainer-edits, --edits**: Enable maintainers to push to the base branch of created pull\n\n**--assignees, -a**=\"\": Comma-separated list of usernames to assign\n\n**--base, -b**=\"\": Branch name of the PR target (default is repos default branch)\n\n**--description, -d**=\"\":\n\n**--draft**: Create as a draft (prepends \"WIP: \" to the title; Gitea treats WIP-prefixed PRs as drafts)\n\n**--head**=\"\": Branch name of the PR source (default is current one). To specify a different head repo, use <user>:<branch>\n\n**--labels, -L**=\"\": Comma-separated list of labels to assign\n\n**--milestone, -m**=\"\": Milestone to assign\n\n**--repo, -r**=\"\": Override local repository path or gitea repository slug to interact with. Optional\n\n**--title, -t**=\"\":\n"
          }
        ],
        "field": [
          {
            "id": "title",
            "label": "Title",
            "type": "string",
            "option": [
              "--title",
              "-t"
            ],
            "sources": [
              "tea-cli"
            ]
          },
          {
            "id": "description",
            "label": "Description",
            "type": "string",
            "option": [
              "--description",
              "-d"
            ],
            "sources": [
              "tea-cli"
            ]
          },
          {
            "id": "base",
            "label": "Target branch",
            "description": "Defaults to the repository's default branch.",
            "type": "string",
            "option": [
              "--base",
              "-b"
            ],
            "sources": [
              "tea-cli"
            ]
          },
          {
            "id": "head",
            "label": "Source branch",
            "description": "Defaults to the current branch; use user:branch for another head repository.",
            "type": "string",
            "option": [
              "--head"
            ],
            "sources": [
              "tea-cli"
            ]
          },
          {
            "id": "draft",
            "label": "Draft",
            "type": "boolean",
            "option": [
              "--draft"
            ],
            "sources": [
              "tea-cli"
            ]
          },
          {
            "id": "edits",
            "label": "Allow maintainer edits",
            "type": "boolean",
            "option": [
              "--allow-maintainer-edits",
              "--edits"
            ],
            "sources": [
              "tea-cli"
            ]
          },
          {
            "id": "labels",
            "label": "Labels",
            "description": "Comma-separated list of labels.",
            "type": "string",
            "option": [
              "--labels",
              "-L"
            ],
            "sources": [
              "tea-cli"
            ]
          },
          {
            "id": "assignees",
            "label": "Assignees",
            "description": "Comma-separated list of usernames.",
            "type": "string",
            "option": [
              "--assignees",
              "-a"
            ],
            "sources": [
              "tea-cli"
            ]
          },
          {
            "id": "milestone",
            "label": "Milestone",
            "type": "string",
            "option": [
              "--milestone",
              "-m"
            ],
            "sources": [
              "tea-cli"
            ]
          },
          {
            "id": "repo",
            "label": "Repository",
            "description": "Local repository path or Gitea repository slug.",
            "type": "string",
            "option": [
              "--repo",
              "-r"
            ],
            "sources": [
              "tea-cli"
            ]
          }
        ],
        "task": [
          {
            "id": "pr",
            "label": "Pull request",
            "fields": [
              "title",
              "description",
              "base",
              "repo"
            ],
            "required": [
              "title"
            ]
          },
          {
            "id": "draft_pr",
            "label": "Draft pull request",
            "fields": [
              "title",
              "description",
              "base",
              "draft",
              "repo"
            ],
            "required": [
              "title"
            ],
            "set": {
              "draft": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "title",
              "description",
              "base",
              "head",
              "draft",
              "repo"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "edits",
              "labels",
              "assignees",
              "milestone"
            ]
          }
        ]
      }
    ]
  }
}
