History

chore(tui): update readme, fix usage

lhpqaq committed 9 months ago

Commit 020df411 parent f31f7f74 files · +12 −2Browse files

Unified · Split

4 files
  1. README.md +5 −0
  2. README_CN.md +5 −0
  3. internal/tui/i18n.go +1 −1
  4. internal/tui/usage_tab.go +1 −1
README.md+5−0
@@ -64,6 +64,11 @@ CLIProxyAPI Guides: [https://help.router-for.me/](https://help.router-for.me/) · 63 unmodified lines
6464
6565 see [MANAGEMENT_API.md](https://help.router-for.me/management/api)
6666
67+## Management TUI
68+
69+A terminal-based interface for managing configuration, keys/auth files, and viewing real-time logs. Run with:
70+`./CLIProxyAPI --tui`
71+
6772 ## Amp CLI Support
6873
6974 CLIProxyAPI includes integrated support for [Amp CLI](https://ampcode.com) and Amp IDE extensions, enabling you to use your Google/ChatGPT/Claude OAuth subscriptions with Amp's coding tools:
README_CN.md+5−0
@@ -64,6 +64,11 @@ CLIProxyAPI 用户手册: [https://help.router-for.me/](https://help.router-fo · 63 unmodified lines
6464
6565 请参见 [MANAGEMENT_API_CN.md](https://help.router-for.me/cn/management/api)
6666
67+## 管理 TUI
68+
69+一个用于管理配置、密钥/认证文件以及查看实时日志的终端界面。使用以下命令启动:
70+`./CLIProxyAPI --tui`
71+
6772 ## Amp CLI 支持
6873
6974 CLIProxyAPI 已内置对 [Amp CLI](https://ampcode.com) 和 Amp IDE 扩展的支持,可让你使用自己的 Google/ChatGPT/Claude OAuth 订阅来配合 Amp 编码工具:
internal/tui/i18n.go+1−1
@@ -3,7 +3,7 @@ package tui · 2 unmodified lines
33 // i18n provides a simple internationalization system for the TUI.
44 // Supported locales: "zh" (Chinese, default), "en" (English).
55
6−var currentLocale = "zh"
6+var currentLocale = "en"
77
88 // SetLocale changes the active locale.
99 func SetLocale(locale string) {
internal/tui/usage_tab.go+1−1
@@ -231,7 +231,7 @@ func (m usageTabModel) renderContent() string { · 230 unmodified lines
231231 apiToks := int64(getFloat(apiMap, "total_tokens"))
232232
233233 row := fmt.Sprintf(" %-30s %10d %12s",
234− truncate(apiName, 30), apiReqs, formatLargeNumber(apiToks))
234+ truncate(maskKey(apiName), 30), apiReqs, formatLargeNumber(apiToks))
235235 sb.WriteString(lipgloss.NewStyle().Bold(true).Render(row))
236236 sb.WriteString("\n")
237237