feat: teai role

This commit is contained in:
ydc3148
2026-09-14 16:13:02 +08:00
parent 8735e35db6
commit 540718dda7
12 changed files with 416 additions and 120 deletions
+4 -4
View File
@@ -75,9 +75,9 @@ type command struct {
type Globals struct {
// URL 是 Gitea 站點網址。
URL string
// Token 來自 --token 旗標;空字串表示未提供(依序退回環境變數與 tea 組態)。
// Token 來自 --token 旗標;空字串表示未提供(依序退回環境變數與 teai 組態)。
Token string
// ConfigPath 是 tea 組態路徑(--config,等同 TEA_CONFIG)。
// ConfigPath 是 teai 組態路徑(--config,等同 TEAI_CONFIG)。
ConfigPath string
// Output 是輸出格式。
Output gitea.Format
@@ -464,8 +464,8 @@ func printUsage(w io.Writer) {
fmt.Fprintf(w, "用法:\n teai [全域選項] <命令> [參數]\n\n")
fmt.Fprintf(w, "全域選項:\n")
fmt.Fprintf(w, " --url <URL> Gitea 站點(預設 https://gitea.alterminal.com)\n")
fmt.Fprintf(w, " --token <TOKEN> API token;未給則依序嘗試 TEAI_TOKEN、tea 登入組態\n")
fmt.Fprintf(w, " --config <path> tea 組態檔路徑,等同 TEA_CONFIG\n")
fmt.Fprintf(w, " --token <TOKEN> API token;未給則依序嘗試 TEAI_TOKEN、teai 登入組態\n")
fmt.Fprintf(w, " --config <path> teai 組態檔路徑,等同 TEAI_CONFIG\n")
fmt.Fprintf(w, " --output <format> 輸出格式 json|table(預設 json)\n")
fmt.Fprintf(w, " --timeout <dur> HTTP 逾時(預設 30s)\n\n")
fmt.Fprintf(w, "命令:\n")