whalecap - npm
npm
Search<br>Sign UpSign In
whalecap<br>1.0.0 • Public • Published 3 days ago<br>Readme<br>Code Beta<br>8 Dependencies<br>0 Dependents<br>1 Versions<br>🐋 Whalecap
Local DeepSeek proxy that paces your spending to a monthly budget.
Load credits once on platform.deepseek.com. Whalecap spreads them safely across the month — no surprise bills, no hard cutoffs at the wrong moment. Works with opencode, Cline, Cursor, Aider, and any OpenAI-compatible tool.
How it works
opencode / Cline / Cursor / Aider<br>localhost:4000/v1 ← point your tools here<br>Whalecap (budget check → ledger write)<br>api.deepseek.com
Whalecap sits between your coding tools and DeepSeek. Your real API key never touches your tools — they talk to a local proxy that enforces a time-windowed budget and logs every request.
Install
npm install -g whalecap
Requires Node 18+.
Quick start
whalecap setup # one-time: API key, budget, installs opencode<br>whalecap # start the proxy + opencode web UI
Setup will:
Ask for your DeepSeek API key and monthly budget
Install opencode (the coding agent) if not already present
Write opencode's config to point at the Whalecap proxy
Optionally set up Tailscale for remote access from your phone
Start everything and open your browser
What runs
Service<br>URL<br>Purpose
opencode web<br>http://localhost:7878<br>AI coding agent (browser UI)
Whalecap proxy<br>http://localhost:4000/v1<br>DeepSeek API proxy + budget enforcer
Dashboard<br>http://localhost:3080<br>Spend monitor
Run whalecap any time to start all three.
Connecting other tools
Point any OpenAI-compatible tool at the proxy instead of DeepSeek directly:
Setting<br>Value
Base URL<br>http://localhost:4000/v1
API Key<br>shown during whalecap setup
Model<br>deepseek-v4-pro
Works with Cline, Cursor, Aider, Continue, and anything else that speaks the OpenAI chat completions API.
Remote access (phone / away from home)
During setup, Whalecap optionally installs Tailscale. Once connected, opencode web and the dashboard are reachable from any device on your tailnet:
http://:7878 ← opencode web<br>http://:3080 ← dashboard
Your Tailscale IP is shown each time you run whalecap.
Budget pacing
Whalecap divides your monthly budget into time windows and tracks spend per window. When a window is exhausted it waits for the next refill rather than blocking you entirely — requests are answered with a friendly in-chat message explaining when budget refills.
The dashboard at http://localhost:3080 shows remaining budget, window status, and a full request log.
Data
Everything is stored locally in ~/.whalecap/ledger.db (SQLite). Nothing is sent anywhere except your actual DeepSeek API requests.
License
MIT
Readme<br>Keywords<br>none
Package Sidebar<br>Install<br>npm i whalecap
DownloadsWeekly Downloads<br>163
Version<br>1.0.0
License<br>none
Last publish<br>3 days ago
Collaborators
wayepoint
Analyze security with SocketCheck bundle size View package health Explore dependencies<br>Report malware