Show your DeepSeek account balance in the VS Code status bar.
Usage
- Install the extension.
- Run
DeepSeek Balance: Setup API Keyfrom the Command Palette. - Choose where the extension should read the API key from.
- Enter your DeepSeek API key when prompted.
- Check the DeepSeek balance item in the lower-right status bar.
Click the status bar item or run DeepSeek Balance: Refresh to refresh the
balance manually. The balance also refreshes periodically.
API Key Sources
secretKey: stores the API key in VS Code SecretStorage underSECRET_KEY. This is the default source.config: reads the API key fromdeepseekBalance.apiKey.claudeConfig: reads the API key fromclaudeCode.environmentVariables[name=ANTHROPIC_AUTH_TOKEN].
The extension also reads and migrates the legacy SecretStorage key
deepseek.apiKey.
Commands
DeepSeek Balance: Refresh: refresh the displayed DeepSeek balance.DeepSeek Balance: Setup API Key: choose the API key source and optionally update the API key.
For backward compatibility, the extension also registers the legacy command IDs
deepseek-balance.refresh and deepseek-balance.setApiKey.
Settings
deepseekBalance.apiKeySource: API key source selector. Options:secretKey,config,claudeConfig. Default:secretKey.deepseekBalance.apiKey: API key used whendeepseekBalance.apiKeySourceisconfig.deepseekBalance.refreshIntervalMinutes: refresh interval in minutes. Default:10.deepseekBalance.lowBalanceThreshold: show a warning icon when the displayed balance is at or below this amount. Default:1.
Compatibility
This is a browser-hosted VS Code extension. It uses the browser entry point
only and does not ship a Node extension host entry point.
If the status bar item shows an error, hover it to see details. When running in
browser-based VS Code environments such as vscode.dev or github.dev, the
DeepSeek API request may be blocked by browser CORS policy.
Development
Install dependencies, then run:
bun run compile
bun run lint
Package a local VSIX:
bun run package:vsix
Publish with VSCE:
bun run publish:vsce
Automated Publishing
This repository includes a GitHub Actions workflow that can publish the extension to the VS Code Marketplace.
Required GitHub Secrets
VSCE_PAT: Personal Access Token created in the Visual Studio Marketplace publisher portal.VSCE_PUBLISHER: your Marketplace publisher ID.
Publish Flow
The workflow file is .github/workflows/publish.yml.
- Push a tag like
v0.0.6to publish automatically. - Or run the workflow manually from the GitHub Actions page.
- The workflow builds the extension, packages a
.vsix, publishes it to the Marketplace, and attaches the package to a GitHub Release when triggered by a tag.
When publishing from a git tag, the tag version must match the version field
in package.json.