Skip to content

feat(deepseek/usage): add usage command for platform.deepseek.com#2130

Closed
cypggs wants to merge 3 commits into
jackwener:mainfrom
cypggs:feat/deepseek-usage
Closed

feat(deepseek/usage): add usage command for platform.deepseek.com#2130
cypggs wants to merge 3 commits into
jackwener:mainfrom
cypggs:feat/deepseek-usage

Conversation

@cypggs

@cypggs cypggs commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Add deepseek usage command that reads usage data from https://platform.deepseek.com/usage.

Data sources:

  • Internal API (/api/v0/users/get_user_summary): balance, bonus balance, cumulative spend, monthly spend, monthly API calls, monthly tokens, token estimation
  • DOM extraction (time-dimension summary cards): period spend, API calls, tokens for the selected time range (default: last 7 days)

Output columns: balance, bonusBalance, cumulativeSpend, monthlySpend, monthlyApiCalls, monthlyTokens, currentTokenEstimation, timePeriod, periodSpend, periodApiCalls, periodTokens

$ opencli deepseek usage
- balance: '14.18'
  bonusBalance: '0.00'
  cumulativeSpend: '35.82'
  monthlySpend: '0.81'
  monthlyApiCalls: '1548'
  monthlyTokens: '7361577'
  currentTokenEstimation: '4726870'
  timePeriod: 近 7 天
  periodSpend: '0.72'
  periodApiCalls: '254'
  periodTokens: '6707719'

Tested locally — all columns populated correctly.

cypggs and others added 3 commits July 8, 2026 16:43
Replace the /code/console page with /membership/subscription?tab=quota so the command surfaces the total usage percentage plus 5h/7h rate limits, gift quota, and booster balance.

Co-Authored-By: Claude <noreply@anthropic.com>
…ve conflicts

Keep the PR's new implementation: read Kimi membership quota info from
/membership/subscription?tab=quota instead of /code/console, exposing
total/5h/7d/gift usage percentages, booster balance, and membership details.
Reads DeepSeek platform usage data from https://platform.deepseek.com/usage
via internal API (get_user_summary) for account-level data and DOM extraction
for time-dimension summary cards.

Output columns:
- balance / bonusBalance (充值/赠送余额)
- cumulativeSpend (累计消费金额)
- monthlySpend / monthlyApiCalls / monthlyTokens (本月数据)
- currentTokenEstimation (当前可用 Tokens 预估)
- timePeriod / periodSpend / periodApiCalls / periodTokens (时间维度)
@jackwener

Copy link
Copy Markdown
Owner

Closed as duplicate/stale after canonical merge of #2104. #2130 still points at old head 1d23b10; #2104 carried the reviewed maintainer delta at 5f7f0e4 and was squash-merged as c1ee31d.

@jackwener jackwener closed this Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants