Files
cost-dev/README.md
T

52 lines
2.0 KiB
Markdown

# Cost.dev — AI Coding Cost Optimizer
**v1 MVP** — A Chrome extension that helps developers track, budget, and control spending on AI coding tools.
## What it does (real features)
- **Manual usage logging**: Log spend per tool per day with notes.
- **Monthly dashboard**: See total spend, per-tool breakdown, daily trend list, and projected month-end bill.
- **Budget & alerts**: Set a monthly budget and alert threshold. Over-budget notifications via `chrome.alarms` + `chrome.notifications` (checked hourly).
- **Tool registry**: Add your AI tools (Claude Code, GitHub Copilot, Cursor, etc.) with estimated monthly cost and billing model (fixed / usage / hybrid).
- **Local-only storage**: All data lives in `chrome.storage.local` — no backend, no cloud, no accounts.
- **Empty-state handling**: Clean UI when no tools or data exist yet.
## What is real vs. manual / deferred
- **Real**: Manual entry, local storage, dashboard math, alarms/notifications, popup UI.
- **Manual**: All usage numbers must be entered by you. We do **not** auto-scrape billing pages because auth/DOM varies and breaks — the content script is a scaffold that detects you're on a supported page and may support quick-capture in a future version.
- **Deferred**: Chrome Web Store publishing, auto-import from APIs, paid tiers, backend sync, cross-device sync.
## Tech stack
- Vite + `@crxjs/vite-plugin` + TypeScript
- Manifest V3
- Permissions: `storage`, `alarms`, `notifications`
- Host permissions (content script): `cursor.com`, `github.com/copilot` (scaffold only, no auto-read in v1)
## Build
Requires `npm install --include=dev` because this environment runs with `NODE_ENV=production`.
```bash
npm install --include=dev
npm run build
```
The build output goes to `dist/`. Confirm `dist/manifest.json` exists.
## Load unpacked
1. Open `chrome://extensions`
2. Enable **Developer mode**
3. Click **Load unpacked**
4. Select the `dist/` folder
## Gitea
```bash
git push https://git.bunbunlabs.com/bunbun/cost-dev.git HEAD:refs/heads/main
```
Built by Bun Bun for BunBun Labs 🐰