diff --git a/app/src/main/res/resources.properties b/app/src/main/res/resources.properties
index dab4408..3c5afff 100644
--- a/app/src/main/res/resources.properties
+++ b/app/src/main/res/resources.properties
@@ -1,4 +1,5 @@
-# 默认(无 qualifier)资源对应的语言:简体中文
-# AGP 据此 + values-en 等目录生成 locale config,Android 13+ 系统设置中
-# 会显示 RainyToken 的独立语言选项(简体中文 / English)
-unqualifiedResLocale=zh-CN
+# 默认(无 qualifier)资源对应的语言:英文(国际回退语言)
+# 非中文/英文系统语言会回退到默认英文资源;中文系统走 values-zh
+# AGP 据此 + values-zh 目录生成 locale config,Android 13+ 系统设置中
+# 会显示 RainyToken 的独立语言选项(English / 简体中文)
+unqualifiedResLocale=en
diff --git a/app/src/main/res/values-en/strings.xml b/app/src/main/res/values-en/strings.xml
deleted file mode 100644
index ffdbb6a..0000000
--- a/app/src/main/res/values-en/strings.xml
+++ /dev/null
@@ -1,478 +0,0 @@
-
-
-
- AI Usage Panel
- OpenCode Go usage + DeepSeek balance, auto-refresh
-
-
- Back
- Cancel
- Add Widget
- Got it
- Refresh
- Settings
- Delete
- Clear
- Save
- Go
- ◀ Prev
- Next ▶
- Add widget to home screen
- View details
- View usage details
- Raw data
- Sync usage data
- I\'m logged in, save
- Keep waiting
-
-
- Loading…
- Unknown error
- All models
-
-
- 👈 Select a service to view details
- Tap a card on the left
- Settings
- Credentials
- About RainyToken
- Tips
- Debug log
- Usage details
- Overview
- Raw data
- Charts
-
-
- Not set up
- Configured
- Expired
- Re-login
- Refresh failed
- No data
- Pending
- OK
- Not set up · Tap to add
- Configured · Valid
- Expired · Tap to reconfigure
- Needs re-verification
- Manual entry mode
- Credential set
- No credential
- Loading
- Latest
- Cached
- Failed
- Awaiting input
-
-
- AI Balance Overview
- Never fetched
- Updated just now
- Updated %1$d min ago
- Updated %1$d h ago
- Updated %1$s
- 💡 Long-press a card to reorder
- ⚠ %1$s
- Stored locally & encrypted, nothing is uploaded
- Add home screen widget?
- This will ask the launcher to add the RainyToken widget. Some systems may still show their own confirmation dialog.
- Shortcut permission denied. Please allow it in system settings and try again.
- The launcher rejected the request. Please check launcher permissions.
- This launcher does not support in-app adding. Long-press home → Widgets → find RainyToken.
-
-
- Tap to configure credentials
- Pull to refresh
- Service currently unavailable
- %1$s%2$s used this month
- Remaining
- · %1$s used / %2$s total
- %1$s used
- 5h used
- · %1$s
- Resets in %1$s
- REST API · ¥
- WebView fetch · 5h quota
- JSON API · $
- ChatGPT Plus · Codex quota
- Cookie fetch · Cloud quota
-
-
- d
- h
- m
-
-
- 5 hours
- 5h
- 5h usage
- 5-hour rolling
- This week
- This month
- Monthly
- Usage
- Usage window%1$s
- Usage window
-
-
- OpenCode Usage
- CommandCode Usage
- %1$d records
- Tap to sync
- Input tokens
- Output tokens
- Reasoning tokens
- Total cost
- Cache read %1$s
- Cache write %1$s
- No data yet · tap 🔄 to sync
- ✓ %1$d new records
- tap to switch
- All times in UTC+0
- Switched to UTC+8, charts shown in Beijing time
- Switched to UTC+0, charts shown in UTC
- $%1$s spent / $%2$s total
- $%1$s remaining
- Extra credits
- By model
- By day (UTC+0)
- %1$d models
- %1$d
- Start time
- End time
-
-
- Spending (USD)
- API requests
- Token usage
- Output
- Input (miss)
- Cache hit
-
-
- Time
- Model
- Input(cache)
- Output
- Cost
-
-
- All
- Last 5 hours
- Last 12 hours
- Last 24 hours
- Today
- Yesterday
- Last 7 days
- Last 30 days
- This month
- Custom
- Custom day
- Custom month
- Custom range
-
-
- A tiny tool to check AI balances.\nCredentials are encrypted locally — nothing is uploaded.
- View all %1$d hidden tips
- Inspect token refresh, network requests and other debug records
-
-
- ✓ Login state configured (%1$d cookies)
- How to get the Cookie?
- 1. Open the login page below in desktop Chrome
- 2. Sign in with GitHub / Google (won\'t be blocked)
- 3. After login, press F12 → Application → Cookies
- 4. Copy all cookies of the site and paste them above
- Format: name1=value1; name2=value2
- How to get OpenCode Go credentials?
- 1. Open opencode.ai/auth in desktop Chrome
- 2. Sign in with GitHub / Google (Google won\'t block Chrome)
- 3. You\'ll land on the dashboard, URL looks like:
- https://opencode.ai/workspace/{id}/go
- 4. Copy the {id} segment → workspaceId
- 5. F12 → Application → Cookies
- 6. Find the cookie named auth under opencode.ai
- 7. Copy its Value field → auth cookie
- Note: only the auth cookie is needed, not the whole cookie string
- How to get CommandCode Go credentials?
- 1. Open https://commandcode.ai and sign in with GitHub
- ▸ Get API Key (required):
- Avatar (top right) → Settings → API Keys → Create a Key
- ▸ Get all cookies (for usage records):
- F12 → Application → Cookies → commandcode.ai
- Select all cookies and copy the whole string
- Paste it below — no need to pick them one by one
- Tip: balance works without cookies, usage records will just be empty.
- How to get Codex auth.json?
- 1. Run codex-oauth-proxy or
- codex-proxy in a terminal to sign in to ChatGPT
- 2. The credential file is saved at:
-
-
- Saved
- Credentials saved
- Connected! Balance: %1$s %2$s
- Connected, credentials saved
- API Key cannot be empty
- Invalid JSON format
- Service rejected this credential (401/403)
- Credentials changed during test
- Too many requests (429)
- Server error (%1$d)
- Network error: %1$s
- , previous credential restored
- , credential changed, rollback skipped
- Test failed. %1$s%2$s
- Testing is not supported for this service
- Both auth cookie and workspaceId are required
- Cookie cannot be empty
- Credential not configured
- Credential missing or expired
- Credential invalid, please reconfigure in Settings
- Credential invalid, please log in again
- Credentials changed, reloading
- Credentials changed, please retry
- Network error, please check your connection
- Network error
- Server error (HTTP %1$d)
- Too many requests%1$s
- , retry in %1$d seconds
- Usage activation is not supported
- Please select a model first
- No cookie captured, please make sure you\'re logged in
- No login URL configured
- URL should start with %1$s
- Authorization failed: %1$s
- State mismatch, please retry
- Callback missing authorization code
- Token exchange failed, check the debug log
-
-
- ✓ Usage activated
- ✓ Activation successful
- Request result
- Error: %1$s
- Response body:\n%1$s
- Model: %1$s
- Response ID: %1$s
- Reply:
- (empty)
- (no reply content)
- (response parsing failed, but the request was sent)
- Usage: prompt=%1$s completion=%2$s total=%3$s tokens
- Usage: input=%1$s output=%2$s tokens
- Token refresh failed: %1$s
-
-
- Sign in to %1$s
- Done logging in?
- If you finished signing in but the page didn\'t redirect, tap the button below to grab the cookie and save your session.
-
-
- No log entries yet\nRefresh Codex usage and debug info will show up here
-
-
- OpenCode Go · Usage
- DeepSeek balance
- Auto refresh
- %1$s · Quota
- %1$s · %2$s
- Updated %1$s
- No data
- Refreshing…
-
-
- Reorder cards by long-press
- Long-press a card to reorder it
- Long-press any service card on the home screen and drag it wherever you like. The order is saved automatically.
- Widget top-left opens the app
- Tap the widget\'s top-left mark to open the app
- The RainyToken › mark at the top-left of the widget opens the app. Tapping elsewhere switches services.
- Tap charts for details
- Tap a chart bar to see that time slot
- Tap or slide on the usage charts to inspect the exact values of a time slot.
- Chart titles are clickable
- Tap a chart title for a per-model breakdown
- Tapping a chart card title (e.g. "Spending") shows a per-model breakdown dialog.
- Switch chart timezone
- Usage details can toggle UTC+0 / UTC+8
- The usage details page can toggle between UTC+0 and UTC+8; chart labels follow along.
- CCGO clear & resync
- CCGO details can clear cache and resync
- The "Clear" button on the CCGO usage details page deletes local cache and re-fetches everything.
- View usage details
- Service cards link to usage charts
- Configured service cards show a "View usage details" entry at the bottom that opens the charts.
- Browse raw data
- Top-right of usage details opens raw records
- "Raw data" at the top-right of usage details lists every record with pagination.
- Pull-to-refresh syncs usage
- Pull to refresh syncs balances and usage
- Pull-to-refresh on the home screen refreshes balances and also syncs OCGO / CCGO usage records.
- Credential guides
- Credential pages include step-by-step guides
- The "How to get" button at the bottom of credential pages walks through every service step by step.
- Clipboard auto-import
- Codex supports one-tap import from clipboard
- The Codex credential page supports "Auto-import from clipboard": paste auth.json and it fills in with one tap.
- Jump to a page number
- Raw data page accepts a page number
- The raw data page lets you enter a page number to jump directly — no need to flip through pages.
- Widget auto-refresh
- Swipe to the widget and it auto-refreshes
- The widget refreshes balances when you swipe to it, or tap the ↻ button manually.
-
-
- %1$d
- Pick a date
- Pick a month (any day)
- Start date
- End date
- Spending breakdown
- Request breakdown
- Token breakdown
- Clear data
- This clears all cached CommandCode usage and re-syncs. It takes a few seconds.
- Continue?
- Confirm (%1$ds)
- Yes, clear
- Close
- From %1$s
- To %1$s
- Apply custom range
- OK
- End date cannot be earlier than start date %1$s
- Time %1$s:%2$s
- No data
- Total: %1$s
- Total
- Records
- Cache read
- Cache write
- Cache token breakdown
- ※ Cache reads are included in "Input tokens"
- %1$d calls
- MMM d, EEEE
- %1$d calls · $%2$s
- Raw data
- Cache write (5m)
- Cache write (1h)
- Cost (USD)
- Cost (raw)
-
-
- ~/.config/codex-oauth-proxy/auth.json
- 3. Open it with a text editor,
- copy everything and paste it above
- JSON example:
- {"tokens": {
- "access_token": "...",
- "refresh_token": "...",
- "expiresAt": 1783727108252
- }}
- Tip: the app auto-refreshes the token after import,
- no manual updates needed.
- Ollama Pro credentials
- Copy the full cookie from your browser. After logging into ollama.com/settings, find the Cookie header in DevTools → Network and copy it.
- Update credentials
- Save credentials
- Test & save
- Open Ollama Settings in browser
- Copy login URL to clipboard
- One-tap usage API Key (optional)
- With an Ollama Cloud API Key, the details page can send one request to activate usage stats. Get it at ollama.com/settings → API Keys.
- ollama-xxx or sk-xxx
- Save API Key
- OpenCode Go credentials
- Needs both auth cookie and workspaceId. The app fetches the dashboard via OkHttp and parses 5h/week/month usage.
- Auto-import from clipboard
- The {id} segment of the dashboard URL
- auth Cookie value
- F12 → Cookies → opencode.ai → Value of auth
- How to get these two?
- Open login page in browser
- With an OpenCode Zen API Key, the details page can send one request to activate usage stats. Get it at opencode.ai/settings → API Keys.
- CommandCode Go credentials
- Needs an API Key (for balance). Session Cookie (optional) for usage records, copied from browser DevTools. Balance works without it.
- Generate at Settings → API Keys
- Session Cookie (optional)
- F12 → Cookies → commandcode.ai → select all & paste
- How to get API Key and Cookie?
- Enter API Key
- Credentials are encrypted with Android Keystore (AES-256 GCM) and stored in local DataStore.
- Update
- Codex / ChatGPT Plus credentials
- OAuth login fetches credentials automatically. You can also paste auth.json manually.
- 🔐 OAuth login (recommended)
- ── or import manually ──
- Full auth.json content
- Paste the full {"tokens": {...}} JSON
- Import & save
- How to get auth.json?
- Paste session
- Google OAuth blocks the in-app WebView, so log in with a browser and paste the cookie here.
- Cookie string
- Save cookie
-
-
- Failed to parse data: %1$s
- Weekly
- Model call count
- Cached data · %1$s
- Showing the last successfully fetched balance
- %1$s%2$s spent this month
- Balance breakdown
- Granted balance
- Top-ups
- Loading model list...
- Select model
- Refresh model list
- Activating...
- Retry usage activation
- ⚡ One-tap usage activation
- Refresh balance
- Log in again
- Configure credential
- Current balance
- 5h live usage
- Monthly balance
- Session usage
- Please select a model
- Error details:
- API response:
- Copy
- *** (length %1$d) ***
- %1$s***%2$s (length %3$d)
- Bad cookie format, expected name1=value1; name2=value2
- %1$d cookies saved
- Please paste the auth.json content
- auth.json is missing access_token or refresh_token
- Codex credential saved; token auto-refreshes when expiring
- Parse failed: %1$s
- Connected! Balance: $%1$s
- API Key saved
- Connected! Session: %1$s%% · %2$s
- Credential deleted
- Clipboard is empty
- Recognized workspaceId and auth cookie
- Recognized workspaceId, please paste the auth cookie too
- Recognized auth cookie, please paste the workspaceId too
- No valid credential recognized
-
-
- Codex OAuth Login
- Exchanging token...
- Retry
- Headless login
- 1. Tap "Open in browser" or copy the link below to a browser\n2. Complete login & authorization on the OpenAI page\n3. The browser redirects to a localhost address (page not loading is normal)\n4. Copy the full URL from the address bar and paste it below\n5. Tap "Submit callback URL"
- Authorization link
- Open in browser
- Copy link
- ── paste the callback URL after login ──
- Callback URL
- http://localhost:1455/auth/callback?code=...
- Submit callback URL
- Regenerate auth link
- Preparing authorization...
-
\ No newline at end of file
diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml
new file mode 100644
index 0000000..cc3d234
--- /dev/null
+++ b/app/src/main/res/values-zh/strings.xml
@@ -0,0 +1,481 @@
+
+
+
+ AI用量面板
+ OpenCode Go 用量 + DeepSeek 余额,自动刷新
+
+
+
+
+ 返回
+ 取消
+ 确认添加
+ 我知道了
+ 刷新
+ 设置
+ 删除
+ 清除
+ 保存
+ 跳转
+ ◀ 上一页
+ 下一页 ▶
+ 添加小组件到桌面
+ 查看详情
+ 查看用量详情
+ 详细数据
+ 同步用量数据
+ 我已登录,保存
+ 继续等待
+
+
+ 加载中…
+ 未知错误
+ 全部模型
+
+
+ 👈 选择服务查看详情
+ 点击左侧卡片即可
+ 设置
+ 凭据管理
+ 关于 RainyToken
+ 使用小技巧
+ 调试日志
+ 用量详情
+ 总统计
+ 详细数据
+ 统计图表
+
+
+ 未配置
+ 已配置
+ 已过期
+ 需重登
+ 刷新失败
+ 未获取
+ 待获取
+ 正常
+ 未配置 · 点击添加
+ 已配置 · 凭据有效
+ 已过期 · 点击重新配置
+ 需要重新验证
+ 手动输入模式
+ 凭据已配置
+ 未配置凭据
+ 加载中
+ 最新
+ 缓存
+ 失败
+ 待输入
+
+
+ AI 余额一览
+ 从未获取
+ 刚刚更新
+ %1$d 分钟前更新
+ %1$d 小时前更新
+ %1$s 更新
+ 💡 长按卡片可拖拽排序
+ ⚠ %1$s
+
+ 本地加密存储,不上传任何数据
+ 添加桌面小组件?
+ 确认后会请求桌面启动器添加雨晴Token小组件。部分系统仍会弹出系统确认窗口。
+ 桌面快捷方式权限已被拒绝,请在系统设置中允许后重试
+ 桌面未接受添加请求,请检查启动器权限
+ 当前桌面不支持应用内添加,请在桌面长按 → 小组件 → 查找雨晴Token
+
+
+ 点击配置凭据
+ 下拉刷新
+ 服务当前不可用
+ 本月已用 %1$s%2$s
+ 剩余
+ · 已用 %1$s / 共 %2$s
+ %1$s 已用
+ 5h 已用
+ · %1$s
+ %1$s 后重置
+ REST API · ¥
+ WebView 抓取 · 5h 配额
+ JSON API · $
+ ChatGPT Plus · Codex 额度
+ Cookie 抓取 · Cloud 配额
+
+
+ 天
+ 小时
+ 分
+
+
+ 5 小时
+ 5h
+ 5h 用量
+ 5 小时滚动
+ 本周
+ 本月
+ 每月
+ 用量
+ 用量窗口%1$s
+ 用量窗口
+
+
+ OpenCode 用量
+ CommandCode 用量
+ %1$d 条记录
+ 点击同步
+ 输入 Token
+ 输出 Token
+ 推理 Token
+ 总花费
+ 缓存读取 %1$s
+ 缓存写入 %1$s
+ 暂无数据,点击 🔄 同步
+ ✓ 新增 %1$d 条
+ 点击切换
+ 所有时间按 UTC+0 计算
+ 已切换到 UTC+8,图表按北京时间显示
+ 已切换到 UTC+0,图表按世界协调时显示
+ 已用 $%1$s / 共 $%2$s
+ 剩余 $%1$s
+ 额外充值
+ 按模型统计
+ 按天统计(UTC+0)
+ %1$d 个模型
+ %1$d 个
+ 开始时间
+ 结束时间
+
+
+ 消耗金额 (USD)
+ API 请求次数
+ Token 消耗
+ 输出
+ 输入(未命中)
+ 命中缓存
+
+
+ 时间
+ 模型
+ 输入(缓存)
+ 输出
+ 成本
+
+
+ 全部
+ 最近5小时
+ 最近12小时
+ 最近24小时
+ 今天
+ 昨天
+ 最近7天
+ 最近30天
+ 当月
+ 自定义
+ 自定义天
+ 自定义月
+ 自定义时间
+
+
+ 统一查询 AI 余额的小工具。\n本地加密存储凭据,不上传任何数据。
+ 查看全部 %1$d 条隐藏操作
+ 查看 token 刷新、网络请求等调试记录
+
+
+ ✓ 已配置登录态(%1$d 个 Cookie)
+ 如何获取 Cookie?
+ 1. 在桌面 Chrome 打开下方登录入口
+ 2. 用 GitHub / Google 登录(不会被拦截)
+ 3. 登录后按 F12 → Application → Cookies
+ 4. 复制该站点下的所有 Cookie 粘贴到上面输入框
+ 格式:name1=value1; name2=value2
+ 如何获取 OpenCode Go 凭据?
+ 1. 桌面 Chrome 打开 opencode.ai/auth
+ 2. 用 GitHub / Google 登录(Google 不会拦截 Chrome)
+ 3. 登录后跳转到 dashboard,URL 形如:
+ https://opencode.ai/workspace/{id}/go
+ 4. 复制 URL 中的 {id} 段 → workspaceId
+ 5. F12 → Application → Cookies
+ 6. 找到域名 opencode.ai 下名为 auth 的 Cookie
+ 7. 复制它的 Value 字段 → auth cookie
+ 注意:只填 auth 一个 Cookie 即可,不要整个 Cookie 字符串
+ 如何获取 CommandCode Go 凭据?
+ 1. 打开 https://commandcode.ai 并登录 GitHub
+ ▸ 获取 API Key(必填):
+ 右上角头像 → Settings → API Keys → 创建一个 Key
+ ▸ 获取全部 Cookie(用于用量记录):
+ F12 → Application → Cookies → commandcode.ai
+ 选中所有 Cookie,复制整个 Cookie 字符串
+ 粘贴到下方输入框即可,无需逐个挑选
+ 提示:不填 Cookie 也能正常查看余额,只是用量记录为空。
+ 如何获取 Codex auth.json?
+ 1. 在终端运行 codex-oauth-proxy 或
+ codex-proxy,完成 ChatGPT 登录
+ 2. 凭证文件保存在:
+
+
+ 已保存
+ 已保存凭据
+ 连接成功!余额: %1$s %2$s
+ 连接成功,凭据已保存
+ API Key 不能为空
+ JSON 格式错误
+ 服务拒绝该凭据 (401/403)
+ 测试期间凭据已变更
+ 请求过于频繁 (429)
+ 服务端错误 (%1$d)
+ 网络错误:%1$s
+ ,已恢复原凭据
+ ,检测到凭据已变化,未执行回滚
+ 测试失败。%1$s%2$s
+ 暂不支持测试此服务
+ auth cookie 和 workspaceId 都需要填写
+ Cookie 不能为空
+ 凭据未配置
+ 凭据未配置或已过期
+ 凭据无效,请在设置中重新配置
+ 凭据无效,请重新登录
+ 凭据已变更,正在重新加载
+ 凭据已变更,请重新操作
+ 网络异常,请检查网络
+ 网络异常
+ 服务端异常 (HTTP %1$d)
+ 请求过于频繁%1$s
+ ,请 %1$d 秒后重试
+ 不支持激活用量
+ 请先选择模型
+ 未抓到 Cookie,请确认已登录
+ 未配置登录 URL
+ URL 应以 %1$s 开头
+ 授权失败: %1$s
+ State 不匹配,请重试
+ 回调缺少授权码
+ Token 交换失败,请查看调试日志
+
+
+ ✓ 用量已激活
+ ✓ 激活成功
+ 请求结果
+ 错误: %1$s
+ 响应内容:\n%1$s
+ 模型: %1$s
+ 响应 ID: %1$s
+ 回复:
+ (空)
+ (无回复内容)
+ (响应解析失败,但请求已发出)
+ 用量: prompt=%1$s completion=%2$s total=%3$s tokens
+ 用量: input=%1$s output=%2$s tokens
+ token 刷新失败:%1$s
+
+
+ 登录 %1$s
+ 完成登录了吗?
+ 如果你已经在页面上完成登录但页面没有跳转,可点击下方按钮让我抓取 Cookie 并保存登录态。
+
+
+ 暂无日志记录\n刷新 Codex 用量后这里会出现调试信息
+
+
+ OpenCode Go · 用量
+ DeepSeek 余额
+ 自动刷新
+ %1$s · 额度
+ %1$s · %2$s
+ 更新 %1$s
+ 暂无数据
+ 刷新中…
+
+
+ 长按卡片拖拽排序
+ 长按首页卡片可以拖拽排序
+ 在首页长按任意服务卡片即可拖拽到想要的位置,排序会自动保存。
+ 小组件点左上角进 APP
+ 小组件左上角标识可打开 APP
+ 桌面小组件左上角 RainyToken › 标识可以点击打开应用,其它区域点击切换服务。
+ 图表点击查看详情
+ 点击图表柱子可查看时段详情
+ 在用量图表上点击或滑动手指,可查看对应时段的详细数值。
+ 图表标题可点击
+ 点击图表标题弹出按模型明细
+ 图表卡片标题(如「消耗金额」)点击后会弹出按模型拆分的明细。
+ 切换图表时区
+ 用量详情页可切换 UTC+0 / UTC+8
+ 用量详情页顶部可切换 UTC+0 / UTC+8,图表标签会跟随切换。
+ CCGO 清除并重新同步
+ CCGO 详情页可清除缓存重新同步
+ CCGO 用量详情页右上角「清除」可删除本地缓存并重新拉取全部数据。
+ 查看用量详情
+ 服务卡片底部可进入用量图表
+ 有凭据的服务卡片底部会出现「查看用量详情」入口,点击进入图表统计。
+ 原始数据浏览
+ 用量详情页右上角可查看原始记录
+ 用量详情页右上角「详细数据」可查看每条原始调用记录,支持分页跳转。
+ 下拉刷新联动用量
+ 下拉刷新会同步余额和用量
+ 首页下拉刷新不仅刷新余额,还会自动同步 OCGO / CCGO 用量记录。
+ 凭据获取教程
+ 凭据页底部有获取教程
+ 凭据编辑页底部的「如何获取」按钮有针对每个服务的详细操作步骤。
+ 剪贴板自动导入
+ Codex 支持从剪贴板一键导入
+ Codex 凭据页支持「从剪贴板自动导入」,粘贴 auth.json 后一键填入。
+ 详细数据页码跳转
+ 原始数据页可输入页码直跳
+ 原始数据页底部可输入页码直接跳转,数据量大时不必逐页翻。
+ 小组件自动刷新
+ 划到小组件会自动刷新余额
+ 桌面小组件划到负一屏时会自动刷新余额,也可手动点 ↻ 按钮刷新。
+
+
+ %1$d次
+ 选择日期
+ 选择月份(任意一天)
+ 开始日期
+ 结束日期
+ 消费明细
+ 调用次数明细
+ Token 明细
+ 清除数据
+ 此操作将清除所有 CommandCode 用量本地缓存并重新同步,需要几秒钟完成。
+ 是否继续?
+ 确认(%1$ds)
+ 确认清除
+ 关闭
+ 从 %1$s
+ 至 %1$s
+ 应用自定义范围
+ 确定
+ 结束日期不能早于开始日期 %1$s
+ 时间 %1$s:%2$s
+ 暂无数据
+ 合计: %1$s
+ 总计
+ 记录数
+ 缓存读取
+ 缓存写入
+ 缓存 Token 细分
+ ※ 缓存读取已计入「输入 Token」
+ %1$d 次调用
+ MM月dd日 EEEE
+ %1$d 次 · $%2$s
+ 原始数据
+ 缓存写入(5m)
+ 缓存写入(1h)
+ 成本(USD)
+ 成本(Raw)
+
+
+ ~/.config/codex-oauth-proxy/auth.json
+ 3. 用文本编辑器打开该文件,
+ 复制全部内容粘贴到上方输入框
+ JSON 格式示例:
+ {"tokens": {
+ "access_token": "...",
+ "refresh_token": "...",
+ "expiresAt": 1783727108252
+ }}
+ 提示:导入后 APP 会自动刷新 token,
+ 不需要手动更新。
+ Ollama Pro 凭据
+ 需要从浏览器复制完整 Cookie。登录 ollama.com/settings 后,在 DevTools → Network → 请求头里找到 Cookie 行复制。
+ 更新凭据
+ 保存凭据
+ 测试并保存
+ 在浏览器中打开 Ollama Settings
+ 复制登录 URL 到剪贴板
+ 一键激活用量 API Key(可选)
+ 填入 Ollama Cloud API Key 后,可在详情页一键发送请求激活用量统计。从 ollama.com/settings → API Keys 获取。
+ ollama-xxx 或 sk-xxx
+ 保存 API Key
+ OpenCode Go 凭据
+ 需要 auth cookie + workspaceId 两个值。APP 会用 OkHttp 抓 dashboard 并自动解析 5h/周/月 三档用量。
+ 从剪贴板自动导入
+ dashboard URL 中的 {id} 段
+ auth Cookie 值
+ F12 → Cookies → opencode.ai → auth 的 Value
+ 如何获取这两个值?
+ 在浏览器中打开登录入口
+ 填入 OpenCode Zen API Key 后,可在详情页一键发送请求激活用量统计。从 opencode.ai/settings → API Keys 获取。
+ CommandCode Go 凭据
+ 需要 API Key(拉余额)。Session Cookie(可选)在浏览器 DevTools 复制,用于拉用量记录。不填也可正常查看余额。
+ 从 Settings → API Keys 生成
+ Session Cookie(可选)
+ F12 → Cookies → commandcode.ai → 全选复制粘贴即可
+ 如何获取 API Key 和 Cookie?
+ 请输入 API Key
+ 凭据会使用 Android Keystore (AES-256 GCM) 加密后存储到本机 DataStore。
+ 更新
+ Codex / ChatGPT Plus 凭据
+ 推荐使用 OAuth 登录自动获取凭据。也可手动粘贴 auth.json 内容。
+ 🔐 OAuth 登录(推荐)
+ ── 或手动导入 ──
+ auth.json 完整内容
+ 粘贴 {"tokens": {...}} 完整 JSON
+ 导入并保存
+ 如何获取 auth.json?
+ 粘贴登录态
+ Google OAuth 会拒绝 APP 内置 WebView,所以请用浏览器登录后把 Cookie 粘到这里。
+ Cookie 字符串
+ 保存 Cookie
+
+
+ 数据解析失败: %1$s
+ 每周
+ 模型调用次数
+ 缓存数据 · %1$s
+ 显示的是上次成功获取的余额
+ 本月消费 %1$s%2$s
+ 余额构成
+ 赠送余额
+ 自费充值
+ 加载模型列表...
+ 选择模型
+ 刷新模型列表
+ 激活中...
+ 重试激活用量
+ ⚡ 一键激活用量
+ 刷新余额
+ 重新登录
+ 配置凭据
+ 当前余额
+ 5h 实时用量
+ 月度余额
+ Session 用量
+ 请选择模型
+ 错误详情:
+ API 响应内容:
+ 复制
+ *** (长度 %1$d) ***
+ %1$s***%2$s (长度 %3$d)
+ Cookie 格式错误,应为 name1=value1; name2=value2
+ 已保存 %1$d 个 Cookie
+ 请粘贴 auth.json 内容
+ auth.json 缺少 access_token 或 refresh_token
+ 已保存 Codex 凭据,token 到期后会自动刷新
+ 解析失败:%1$s
+ 连接成功!余额: $%1$s
+ API Key 已保存
+ 连接成功!Session: %1$s%% · %2$s
+ 凭据已删除
+ 剪贴板为空
+ 已识别 workspaceId 和 auth cookie
+ 已识别 workspaceId,请再粘贴 auth cookie
+ 已识别 auth cookie,请再粘贴 workspaceId
+ 未识别到有效凭据
+
+
+ Codex OAuth 登录
+ 正在交换 Token...
+ 重试
+ 无头模式登录
+ 1. 点击「在浏览器中打开」或复制下方链接到浏览器\n2. 在 OpenAI 页面完成登录和授权\n3. 浏览器会跳转到一个 localhost 地址(页面打不开是正常的)\n4. 复制浏览器地址栏的完整 URL 粘贴到下方输入框\n5. 点击「提交回调 URL」
+ 授权链接
+ 在浏览器中打开
+ 复制链接
+ ── 登录后粘贴回调 URL ──
+ 回调 URL
+ http://localhost:1455/auth/callback?code=...
+ 提交回调 URL
+ 重新生成授权链接
+ 正在准备授权...
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 13603a5..81830e8 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,482 +1,484 @@
-
- 雨晴Token
- AI用量面板
- OpenCode Go 用量 + DeepSeek 余额,自动刷新
- 雨晴喵
- RainyToken
+
+雨晴Token
+雨晴喵
+RainyToken
+RainyToken · v1.0
+
+
+ AI Usage Panel
+ OpenCode Go usage + DeepSeek balance, auto-refresh
- 返回
- 取消
- 确认添加
- 我知道了
- 刷新
- 设置
- 删除
- 清除
- 保存
- 跳转
- ◀ 上一页
- 下一页 ▶
- 添加小组件到桌面
- 查看详情
- 查看用量详情
- 详细数据
- 同步用量数据
- 我已登录,保存
- 继续等待
+ Back
+ Cancel
+ Add Widget
+ Got it
+ Refresh
+ Settings
+ Delete
+ Clear
+ Save
+ Go
+ ◀ Prev
+ Next ▶
+ Add widget to home screen
+ View details
+ View usage details
+ Raw data
+ Sync usage data
+ I\'m logged in, save
+ Keep waiting
- 加载中…
- 未知错误
- 全部模型
+ Loading…
+ Unknown error
+ All models
- 👈 选择服务查看详情
- 点击左侧卡片即可
- 设置
- 凭据管理
- 关于 RainyToken
- 使用小技巧
- 调试日志
- 用量详情
- 总统计
- 详细数据
- 统计图表
+ 👈 Select a service to view details
+ Tap a card on the left
+ Settings
+ Credentials
+ About RainyToken
+ Tips
+ Debug log
+ Usage details
+ Overview
+ Raw data
+ Charts
- 未配置
- 已配置
- 已过期
- 需重登
- 刷新失败
- 未获取
- 待获取
- 正常
- 未配置 · 点击添加
- 已配置 · 凭据有效
- 已过期 · 点击重新配置
- 需要重新验证
- 手动输入模式
- 凭据已配置
- 未配置凭据
- 加载中
- 最新
- 缓存
- 失败
- 待输入
+ Not set up
+ Configured
+ Expired
+ Re-login
+ Refresh failed
+ No data
+ Pending
+ OK
+ Not set up · Tap to add
+ Configured · Valid
+ Expired · Tap to reconfigure
+ Needs re-verification
+ Manual entry mode
+ Credential set
+ No credential
+ Loading
+ Latest
+ Cached
+ Failed
+ Awaiting input
- AI 余额一览
- 从未获取
- 刚刚更新
- %1$d 分钟前更新
- %1$d 小时前更新
- %1$s 更新
- 💡 长按卡片可拖拽排序
+ AI Balance Overview
+ Never fetched
+ Updated just now
+ Updated %1$d min ago
+ Updated %1$d h ago
+ Updated %1$s
+ 💡 Long-press a card to reorder
⚠ %1$s
- RainyToken · v1.0
- 本地加密存储,不上传任何数据
- 添加桌面小组件?
- 确认后会请求桌面启动器添加雨晴Token小组件。部分系统仍会弹出系统确认窗口。
- 桌面快捷方式权限已被拒绝,请在系统设置中允许后重试
- 桌面未接受添加请求,请检查启动器权限
- 当前桌面不支持应用内添加,请在桌面长按 → 小组件 → 查找雨晴Token
+ Stored locally & encrypted, nothing is uploaded
+ Add home screen widget?
+ This will ask the launcher to add the RainyToken widget. Some systems may still show their own confirmation dialog.
+ Shortcut permission denied. Please allow it in system settings and try again.
+ The launcher rejected the request. Please check launcher permissions.
+ This launcher does not support in-app adding. Long-press home → Widgets → find RainyToken.
- 点击配置凭据
- 下拉刷新
- 服务当前不可用
- 本月已用 %1$s%2$s
- 剩余
- · 已用 %1$s / 共 %2$s
- %1$s 已用
- 5h 已用
+ Tap to configure credentials
+ Pull to refresh
+ Service currently unavailable
+ %1$s%2$s used this month
+ Remaining
+ · %1$s used / %2$s total
+ %1$s used
+ 5h used
· %1$s
- %1$s 后重置
+ Resets in %1$s
REST API · ¥
- WebView 抓取 · 5h 配额
+ WebView fetch · 5h quota
JSON API · $
- ChatGPT Plus · Codex 额度
- Cookie 抓取 · Cloud 配额
+ ChatGPT Plus · Codex quota
+ Cookie fetch · Cloud quota
- 天
- 小时
- 分
+ d
+ h
+ m
- 5 小时
+ 5 hours
5h
- 5h 用量
- 5 小时滚动
- 本周
- 本月
- 每月
- 用量
- 用量窗口%1$s
- 用量窗口
+ 5h usage
+ 5-hour rolling
+ This week
+ This month
+ Monthly
+ Usage
+ Usage window%1$s
+ Usage window
- OpenCode 用量
- CommandCode 用量
- %1$d 条记录
- 点击同步
- 输入 Token
- 输出 Token
- 推理 Token
- 总花费
- 缓存读取 %1$s
- 缓存写入 %1$s
- 暂无数据,点击 🔄 同步
- ✓ 新增 %1$d 条
- 点击切换
- 所有时间按 UTC+0 计算
- 已切换到 UTC+8,图表按北京时间显示
- 已切换到 UTC+0,图表按世界协调时显示
- 已用 $%1$s / 共 $%2$s
- 剩余 $%1$s
- 额外充值
- 按模型统计
- 按天统计(UTC+0)
- %1$d 个模型
- %1$d 个
- 开始时间
- 结束时间
+ OpenCode Usage
+ CommandCode Usage
+ %1$d records
+ Tap to sync
+ Input tokens
+ Output tokens
+ Reasoning tokens
+ Total cost
+ Cache read %1$s
+ Cache write %1$s
+ No data yet · tap 🔄 to sync
+ ✓ %1$d new records
+ tap to switch
+ All times in UTC+0
+ Switched to UTC+8, charts shown in Beijing time
+ Switched to UTC+0, charts shown in UTC
+ $%1$s spent / $%2$s total
+ $%1$s remaining
+ Extra credits
+ By model
+ By day (UTC+0)
+ %1$d models
+ %1$d
+ Start time
+ End time
- 消耗金额 (USD)
- API 请求次数
- Token 消耗
- 输出
- 输入(未命中)
- 命中缓存
+ Spending (USD)
+ API requests
+ Token usage
+ Output
+ Input (miss)
+ Cache hit
- 时间
- 模型
- 输入(缓存)
- 输出
- 成本
+ Time
+ Model
+ Input(cache)
+ Output
+ Cost
- 全部
- 最近5小时
- 最近12小时
- 最近24小时
- 今天
- 昨天
- 最近7天
- 最近30天
- 当月
- 自定义
- 自定义天
- 自定义月
- 自定义时间
+ All
+ Last 5 hours
+ Last 12 hours
+ Last 24 hours
+ Today
+ Yesterday
+ Last 7 days
+ Last 30 days
+ This month
+ Custom
+ Custom day
+ Custom month
+ Custom range
- 统一查询 AI 余额的小工具。\n本地加密存储凭据,不上传任何数据。
- 查看全部 %1$d 条隐藏操作
- 查看 token 刷新、网络请求等调试记录
+ A tiny tool to check AI balances.\nCredentials are encrypted locally — nothing is uploaded.
+ View all %1$d hidden tips
+ Inspect token refresh, network requests and other debug records
- ✓ 已配置登录态(%1$d 个 Cookie)
- 如何获取 Cookie?
- 1. 在桌面 Chrome 打开下方登录入口
- 2. 用 GitHub / Google 登录(不会被拦截)
- 3. 登录后按 F12 → Application → Cookies
- 4. 复制该站点下的所有 Cookie 粘贴到上面输入框
- 格式:name1=value1; name2=value2
- 如何获取 OpenCode Go 凭据?
- 1. 桌面 Chrome 打开 opencode.ai/auth
- 2. 用 GitHub / Google 登录(Google 不会拦截 Chrome)
- 3. 登录后跳转到 dashboard,URL 形如:
+ ✓ Login state configured (%1$d cookies)
+ How to get the Cookie?
+ 1. Open the login page below in desktop Chrome
+ 2. Sign in with GitHub / Google (won\'t be blocked)
+ 3. After login, press F12 → Application → Cookies
+ 4. Copy all cookies of the site and paste them above
+ Format: name1=value1; name2=value2
+ How to get OpenCode Go credentials?
+ 1. Open opencode.ai/auth in desktop Chrome
+ 2. Sign in with GitHub / Google (Google won\'t block Chrome)
+ 3. You\'ll land on the dashboard, URL looks like:
https://opencode.ai/workspace/{id}/go
- 4. 复制 URL 中的 {id} 段 → workspaceId
+ 4. Copy the {id} segment → workspaceId
5. F12 → Application → Cookies
- 6. 找到域名 opencode.ai 下名为 auth 的 Cookie
- 7. 复制它的 Value 字段 → auth cookie
- 注意:只填 auth 一个 Cookie 即可,不要整个 Cookie 字符串
- 如何获取 CommandCode Go 凭据?
- 1. 打开 https://commandcode.ai 并登录 GitHub
- ▸ 获取 API Key(必填):
- 右上角头像 → Settings → API Keys → 创建一个 Key
- ▸ 获取全部 Cookie(用于用量记录):
+ 6. Find the cookie named auth under opencode.ai
+ 7. Copy its Value field → auth cookie
+ Note: only the auth cookie is needed, not the whole cookie string
+ How to get CommandCode Go credentials?
+ 1. Open https://commandcode.ai and sign in with GitHub
+ ▸ Get API Key (required):
+ Avatar (top right) → Settings → API Keys → Create a Key
+ ▸ Get all cookies (for usage records):
F12 → Application → Cookies → commandcode.ai
- 选中所有 Cookie,复制整个 Cookie 字符串
- 粘贴到下方输入框即可,无需逐个挑选
- 提示:不填 Cookie 也能正常查看余额,只是用量记录为空。
- 如何获取 Codex auth.json?
- 1. 在终端运行 codex-oauth-proxy 或
- codex-proxy,完成 ChatGPT 登录
- 2. 凭证文件保存在:
+ Select all cookies and copy the whole string
+ Paste it below — no need to pick them one by one
+ Tip: balance works without cookies, usage records will just be empty.
+ How to get Codex auth.json?
+ 1. Run codex-oauth-proxy or
+ codex-proxy in a terminal to sign in to ChatGPT
+ 2. The credential file is saved at:
- 已保存
- 已保存凭据
- 连接成功!余额: %1$s %2$s
- 连接成功,凭据已保存
- API Key 不能为空
- JSON 格式错误
- 服务拒绝该凭据 (401/403)
- 测试期间凭据已变更
- 请求过于频繁 (429)
- 服务端错误 (%1$d)
- 网络错误:%1$s
- ,已恢复原凭据
- ,检测到凭据已变化,未执行回滚
- 测试失败。%1$s%2$s
- 暂不支持测试此服务
- auth cookie 和 workspaceId 都需要填写
- Cookie 不能为空
- 凭据未配置
- 凭据未配置或已过期
- 凭据无效,请在设置中重新配置
- 凭据无效,请重新登录
- 凭据已变更,正在重新加载
- 凭据已变更,请重新操作
- 网络异常,请检查网络
- 网络异常
- 服务端异常 (HTTP %1$d)
- 请求过于频繁%1$s
- ,请 %1$d 秒后重试
- 不支持激活用量
- 请先选择模型
- 未抓到 Cookie,请确认已登录
- 未配置登录 URL
- URL 应以 %1$s 开头
- 授权失败: %1$s
- State 不匹配,请重试
- 回调缺少授权码
- Token 交换失败,请查看调试日志
+ Saved
+ Credentials saved
+ Connected! Balance: %1$s %2$s
+ Connected, credentials saved
+ API Key cannot be empty
+ Invalid JSON format
+ Service rejected this credential (401/403)
+ Credentials changed during test
+ Too many requests (429)
+ Server error (%1$d)
+ Network error: %1$s
+ , previous credential restored
+ , credential changed, rollback skipped
+ Test failed. %1$s%2$s
+ Testing is not supported for this service
+ Both auth cookie and workspaceId are required
+ Cookie cannot be empty
+ Credential not configured
+ Credential missing or expired
+ Credential invalid, please reconfigure in Settings
+ Credential invalid, please log in again
+ Credentials changed, reloading
+ Credentials changed, please retry
+ Network error, please check your connection
+ Network error
+ Server error (HTTP %1$d)
+ Too many requests%1$s
+ , retry in %1$d seconds
+ Usage activation is not supported
+ Please select a model first
+ No cookie captured, please make sure you\'re logged in
+ No login URL configured
+ URL should start with %1$s
+ Authorization failed: %1$s
+ State mismatch, please retry
+ Callback missing authorization code
+ Token exchange failed, check the debug log
- ✓ 用量已激活
- ✓ 激活成功
- 请求结果
- 错误: %1$s
- 响应内容:\n%1$s
- 模型: %1$s
- 响应 ID: %1$s
- 回复:
- (空)
- (无回复内容)
- (响应解析失败,但请求已发出)
- 用量: prompt=%1$s completion=%2$s total=%3$s tokens
- 用量: input=%1$s output=%2$s tokens
- token 刷新失败:%1$s
+ ✓ Usage activated
+ ✓ Activation successful
+ Request result
+ Error: %1$s
+ Response body:\n%1$s
+ Model: %1$s
+ Response ID: %1$s
+ Reply:
+ (empty)
+ (no reply content)
+ (response parsing failed, but the request was sent)
+ Usage: prompt=%1$s completion=%2$s total=%3$s tokens
+ Usage: input=%1$s output=%2$s tokens
+ Token refresh failed: %1$s
- 登录 %1$s
- 完成登录了吗?
- 如果你已经在页面上完成登录但页面没有跳转,可点击下方按钮让我抓取 Cookie 并保存登录态。
+ Sign in to %1$s
+ Done logging in?
+ If you finished signing in but the page didn\'t redirect, tap the button below to grab the cookie and save your session.
- 暂无日志记录\n刷新 Codex 用量后这里会出现调试信息
+ No log entries yet\nRefresh Codex usage and debug info will show up here
- OpenCode Go · 用量
- DeepSeek 余额
- 自动刷新
- %1$s · 额度
+ OpenCode Go · Usage
+ DeepSeek balance
+ Auto refresh
+ %1$s · Quota
%1$s · %2$s
- 更新 %1$s
- 暂无数据
- 刷新中…
+ Updated %1$s
+ No data
+ Refreshing…
- 长按卡片拖拽排序
- 长按首页卡片可以拖拽排序
- 在首页长按任意服务卡片即可拖拽到想要的位置,排序会自动保存。
- 小组件点左上角进 APP
- 小组件左上角标识可打开 APP
- 桌面小组件左上角 RainyToken › 标识可以点击打开应用,其它区域点击切换服务。
- 图表点击查看详情
- 点击图表柱子可查看时段详情
- 在用量图表上点击或滑动手指,可查看对应时段的详细数值。
- 图表标题可点击
- 点击图表标题弹出按模型明细
- 图表卡片标题(如「消耗金额」)点击后会弹出按模型拆分的明细。
- 切换图表时区
- 用量详情页可切换 UTC+0 / UTC+8
- 用量详情页顶部可切换 UTC+0 / UTC+8,图表标签会跟随切换。
- CCGO 清除并重新同步
- CCGO 详情页可清除缓存重新同步
- CCGO 用量详情页右上角「清除」可删除本地缓存并重新拉取全部数据。
- 查看用量详情
- 服务卡片底部可进入用量图表
- 有凭据的服务卡片底部会出现「查看用量详情」入口,点击进入图表统计。
- 原始数据浏览
- 用量详情页右上角可查看原始记录
- 用量详情页右上角「详细数据」可查看每条原始调用记录,支持分页跳转。
- 下拉刷新联动用量
- 下拉刷新会同步余额和用量
- 首页下拉刷新不仅刷新余额,还会自动同步 OCGO / CCGO 用量记录。
- 凭据获取教程
- 凭据页底部有获取教程
- 凭据编辑页底部的「如何获取」按钮有针对每个服务的详细操作步骤。
- 剪贴板自动导入
- Codex 支持从剪贴板一键导入
- Codex 凭据页支持「从剪贴板自动导入」,粘贴 auth.json 后一键填入。
- 详细数据页码跳转
- 原始数据页可输入页码直跳
- 原始数据页底部可输入页码直接跳转,数据量大时不必逐页翻。
- 小组件自动刷新
- 划到小组件会自动刷新余额
- 桌面小组件划到负一屏时会自动刷新余额,也可手动点 ↻ 按钮刷新。
+ Reorder cards by long-press
+ Long-press a card to reorder it
+ Long-press any service card on the home screen and drag it wherever you like. The order is saved automatically.
+ Widget top-left opens the app
+ Tap the widget\'s top-left mark to open the app
+ The RainyToken › mark at the top-left of the widget opens the app. Tapping elsewhere switches services.
+ Tap charts for details
+ Tap a chart bar to see that time slot
+ Tap or slide on the usage charts to inspect the exact values of a time slot.
+ Chart titles are clickable
+ Tap a chart title for a per-model breakdown
+ Tapping a chart card title (e.g. "Spending") shows a per-model breakdown dialog.
+ Switch chart timezone
+ Usage details can toggle UTC+0 / UTC+8
+ The usage details page can toggle between UTC+0 and UTC+8; chart labels follow along.
+ CCGO clear & resync
+ CCGO details can clear cache and resync
+ The "Clear" button on the CCGO usage details page deletes local cache and re-fetches everything.
+ View usage details
+ Service cards link to usage charts
+ Configured service cards show a "View usage details" entry at the bottom that opens the charts.
+ Browse raw data
+ Top-right of usage details opens raw records
+ "Raw data" at the top-right of usage details lists every record with pagination.
+ Pull-to-refresh syncs usage
+ Pull to refresh syncs balances and usage
+ Pull-to-refresh on the home screen refreshes balances and also syncs OCGO / CCGO usage records.
+ Credential guides
+ Credential pages include step-by-step guides
+ The "How to get" button at the bottom of credential pages walks through every service step by step.
+ Clipboard auto-import
+ Codex supports one-tap import from clipboard
+ The Codex credential page supports "Auto-import from clipboard": paste auth.json and it fills in with one tap.
+ Jump to a page number
+ Raw data page accepts a page number
+ The raw data page lets you enter a page number to jump directly — no need to flip through pages.
+ Widget auto-refresh
+ Swipe to the widget and it auto-refreshes
+ The widget refreshes balances when you swipe to it, or tap the ↻ button manually.
-
- %1$d次
- 选择日期
- 选择月份(任意一天)
- 开始日期
- 结束日期
- 消费明细
- 调用次数明细
- Token 明细
- 清除数据
- 此操作将清除所有 CommandCode 用量本地缓存并重新同步,需要几秒钟完成。
- 是否继续?
- 确认(%1$ds)
- 确认清除
- 关闭
- 从 %1$s
- 至 %1$s
- 应用自定义范围
- 确定
- 结束日期不能早于开始日期 %1$s
- 时间 %1$s:%2$s
- 暂无数据
- 合计: %1$s
- 总计
- 记录数
- 缓存读取
- 缓存写入
- 缓存 Token 细分
- ※ 缓存读取已计入「输入 Token」
- %1$d 次调用
- MM月dd日 EEEE
- %1$d 次 · $%2$s
- 原始数据
- 缓存写入(5m)
- 缓存写入(1h)
- 成本(USD)
- 成本(Raw)
+
+ %1$d
+ Pick a date
+ Pick a month (any day)
+ Start date
+ End date
+ Spending breakdown
+ Request breakdown
+ Token breakdown
+ Clear data
+ This clears all cached CommandCode usage and re-syncs. It takes a few seconds.
+ Continue?
+ Confirm (%1$ds)
+ Yes, clear
+ Close
+ From %1$s
+ To %1$s
+ Apply custom range
+ OK
+ End date cannot be earlier than start date %1$s
+ Time %1$s:%2$s
+ No data
+ Total: %1$s
+ Total
+ Records
+ Cache read
+ Cache write
+ Cache token breakdown
+ ※ Cache reads are included in "Input tokens"
+ %1$d calls
+ MMM d, EEEE
+ %1$d calls · $%2$s
+ Raw data
+ Cache write (5m)
+ Cache write (1h)
+ Cost (USD)
+ Cost (raw)
-
+
~/.config/codex-oauth-proxy/auth.json
- 3. 用文本编辑器打开该文件,
- 复制全部内容粘贴到上方输入框
- JSON 格式示例:
+ 3. Open it with a text editor,
+ copy everything and paste it above
+ JSON example:
{"tokens": {
"access_token": "...",
"refresh_token": "...",
"expiresAt": 1783727108252
}}
- 提示:导入后 APP 会自动刷新 token,
- 不需要手动更新。
- Ollama Pro 凭据
- 需要从浏览器复制完整 Cookie。登录 ollama.com/settings 后,在 DevTools → Network → 请求头里找到 Cookie 行复制。
- 更新凭据
- 保存凭据
- 测试并保存
- 在浏览器中打开 Ollama Settings
- 复制登录 URL 到剪贴板
- 一键激活用量 API Key(可选)
- 填入 Ollama Cloud API Key 后,可在详情页一键发送请求激活用量统计。从 ollama.com/settings → API Keys 获取。
- ollama-xxx 或 sk-xxx
- 保存 API Key
- OpenCode Go 凭据
- 需要 auth cookie + workspaceId 两个值。APP 会用 OkHttp 抓 dashboard 并自动解析 5h/周/月 三档用量。
- 从剪贴板自动导入
- dashboard URL 中的 {id} 段
- auth Cookie 值
- F12 → Cookies → opencode.ai → auth 的 Value
- 如何获取这两个值?
- 在浏览器中打开登录入口
- 填入 OpenCode Zen API Key 后,可在详情页一键发送请求激活用量统计。从 opencode.ai/settings → API Keys 获取。
- CommandCode Go 凭据
- 需要 API Key(拉余额)。Session Cookie(可选)在浏览器 DevTools 复制,用于拉用量记录。不填也可正常查看余额。
- 从 Settings → API Keys 生成
- Session Cookie(可选)
- F12 → Cookies → commandcode.ai → 全选复制粘贴即可
- 如何获取 API Key 和 Cookie?
- 请输入 API Key
- 凭据会使用 Android Keystore (AES-256 GCM) 加密后存储到本机 DataStore。
- 更新
- Codex / ChatGPT Plus 凭据
- 推荐使用 OAuth 登录自动获取凭据。也可手动粘贴 auth.json 内容。
- 🔐 OAuth 登录(推荐)
- ── 或手动导入 ──
- auth.json 完整内容
- 粘贴 {"tokens": {...}} 完整 JSON
- 导入并保存
- 如何获取 auth.json?
- 粘贴登录态
- Google OAuth 会拒绝 APP 内置 WebView,所以请用浏览器登录后把 Cookie 粘到这里。
- Cookie 字符串
- 保存 Cookie
+ Tip: the app auto-refreshes the token after import,
+ no manual updates needed.
+ Ollama Pro credentials
+ Copy the full cookie from your browser. After logging into ollama.com/settings, find the Cookie header in DevTools → Network and copy it.
+ Update credentials
+ Save credentials
+ Test & save
+ Open Ollama Settings in browser
+ Copy login URL to clipboard
+ One-tap usage API Key (optional)
+ With an Ollama Cloud API Key, the details page can send one request to activate usage stats. Get it at ollama.com/settings → API Keys.
+ ollama-xxx or sk-xxx
+ Save API Key
+ OpenCode Go credentials
+ Needs both auth cookie and workspaceId. The app fetches the dashboard via OkHttp and parses 5h/week/month usage.
+ Auto-import from clipboard
+ The {id} segment of the dashboard URL
+ auth Cookie value
+ F12 → Cookies → opencode.ai → Value of auth
+ How to get these two?
+ Open login page in browser
+ With an OpenCode Zen API Key, the details page can send one request to activate usage stats. Get it at opencode.ai/settings → API Keys.
+ CommandCode Go credentials
+ Needs an API Key (for balance). Session Cookie (optional) for usage records, copied from browser DevTools. Balance works without it.
+ Generate at Settings → API Keys
+ Session Cookie (optional)
+ F12 → Cookies → commandcode.ai → select all & paste
+ How to get API Key and Cookie?
+ Enter API Key
+ Credentials are encrypted with Android Keystore (AES-256 GCM) and stored in local DataStore.
+ Update
+ Codex / ChatGPT Plus credentials
+ OAuth login fetches credentials automatically. You can also paste auth.json manually.
+ 🔐 OAuth login (recommended)
+ ── or import manually ──
+ Full auth.json content
+ Paste the full {"tokens": {...}} JSON
+ Import & save
+ How to get auth.json?
+ Paste session
+ Google OAuth blocks the in-app WebView, so log in with a browser and paste the cookie here.
+ Cookie string
+ Save cookie
-
- 数据解析失败: %1$s
- 每周
- 模型调用次数
- 缓存数据 · %1$s
- 显示的是上次成功获取的余额
- 本月消费 %1$s%2$s
- 余额构成
- 赠送余额
- 自费充值
- 加载模型列表...
- 选择模型
- 刷新模型列表
- 激活中...
- 重试激活用量
- ⚡ 一键激活用量
- 刷新余额
- 重新登录
- 配置凭据
- 当前余额
- 5h 实时用量
- 月度余额
- Session 用量
- 请选择模型
- 错误详情:
- API 响应内容:
- 复制
- *** (长度 %1$d) ***
- %1$s***%2$s (长度 %3$d)
- Cookie 格式错误,应为 name1=value1; name2=value2
- 已保存 %1$d 个 Cookie
- 请粘贴 auth.json 内容
- auth.json 缺少 access_token 或 refresh_token
- 已保存 Codex 凭据,token 到期后会自动刷新
- 解析失败:%1$s
- 连接成功!余额: $%1$s
- API Key 已保存
- 连接成功!Session: %1$s%% · %2$s
- 凭据已删除
- 剪贴板为空
- 已识别 workspaceId 和 auth cookie
- 已识别 workspaceId,请再粘贴 auth cookie
- 已识别 auth cookie,请再粘贴 workspaceId
- 未识别到有效凭据
+
+ Failed to parse data: %1$s
+ Weekly
+ Model call count
+ Cached data · %1$s
+ Showing the last successfully fetched balance
+ %1$s%2$s spent this month
+ Balance breakdown
+ Granted balance
+ Top-ups
+ Loading model list...
+ Select model
+ Refresh model list
+ Activating...
+ Retry usage activation
+ ⚡ One-tap usage activation
+ Refresh balance
+ Log in again
+ Configure credential
+ Current balance
+ 5h live usage
+ Monthly balance
+ Session usage
+ Please select a model
+ Error details:
+ API response:
+ Copy
+ *** (length %1$d) ***
+ %1$s***%2$s (length %3$d)
+ Bad cookie format, expected name1=value1; name2=value2
+ %1$d cookies saved
+ Please paste the auth.json content
+ auth.json is missing access_token or refresh_token
+ Codex credential saved; token auto-refreshes when expiring
+ Parse failed: %1$s
+ Connected! Balance: $%1$s
+ API Key saved
+ Connected! Session: %1$s%% · %2$s
+ Credential deleted
+ Clipboard is empty
+ Recognized workspaceId and auth cookie
+ Recognized workspaceId, please paste the auth cookie too
+ Recognized auth cookie, please paste the workspaceId too
+ No valid credential recognized
- Codex OAuth 登录
- 正在交换 Token...
- 重试
- 无头模式登录
- 1. 点击「在浏览器中打开」或复制下方链接到浏览器\n2. 在 OpenAI 页面完成登录和授权\n3. 浏览器会跳转到一个 localhost 地址(页面打不开是正常的)\n4. 复制浏览器地址栏的完整 URL 粘贴到下方输入框\n5. 点击「提交回调 URL」
- 授权链接
- 在浏览器中打开
- 复制链接
- ── 登录后粘贴回调 URL ──
- 回调 URL
+ Codex OAuth Login
+ Exchanging token...
+ Retry
+ Headless login
+ 1. Tap "Open in browser" or copy the link below to a browser\n2. Complete login & authorization on the OpenAI page\n3. The browser redirects to a localhost address (page not loading is normal)\n4. Copy the full URL from the address bar and paste it below\n5. Tap "Submit callback URL"
+ Authorization link
+ Open in browser
+ Copy link
+ ── paste the callback URL after login ──
+ Callback URL
http://localhost:1455/auth/callback?code=...
- 提交回调 URL
- 重新生成授权链接
- 正在准备授权...
-
\ No newline at end of file
+ Submit callback URL
+ Regenerate auth link
+ Preparing authorization...
+