TokenOwl is a desktop application for tracking AI coding assistant costs by analyzing proxy data from CC Switch. It provides detailed usage analytics, budget management, and cost attribution across multiple AI providers.
- Dashboard — Real-time usage summary with cost, token count, and request statistics
- Cost Attribution — Break down costs by model, provider, and token type (input/output/cache)
- Budget Management — Set daily/weekly/monthly spending limits with configurable alert thresholds
- Provider Analytics — Track usage distribution and health across AI providers
- CC Switch Integration — One-click data sync from CC Switch proxy logs
- Tray Mini Mode — Compact always-on-top widget showing today's token usage and budget progress
- Data Export — Export usage data as CSV or JSON
- i18n — Full English and Chinese language support with system auto-detection
- Auto Update — Built-in update checker for new releases
| Layer | Technology |
|---|---|
| Framework | Tauri v2 |
| Frontend | React 19 + TypeScript |
| UI | TailwindCSS 4 + Radix UI + Lucide Icons |
| State | Zustand 5 |
| Charts | Recharts |
| i18n | i18next |
| Backend | Rust (rusqlite, tokio, reqwest) |
| Database | SQLite (bundled) |
# Clone the repository
git clone https://github.com/bluvenr/tokenowl.git
cd tokenowl
# Install dependencies
pnpm install
# Start development
pnpm tauri dev
# Build for production
pnpm tauri buildapp/
├── src/ # Frontend source
│ ├── components/ # React components
│ │ ├── dashboard/ # Dashboard widgets
│ │ └── settings/ # Settings tabs
│ ├── pages/ # Page components (App, TrayPopup)
│ ├── stores/ # Zustand state stores
│ ├── i18n/ # Translation files (en, zh-CN)
│ ├── lib/ # Utilities and API wrappers
│ └── styles/ # Global CSS
├── src-tauri/ # Rust backend
│ ├── src/
│ │ ├── commands/ # Tauri command handlers
│ │ ├── storage/ # SQLite database layer
│ │ ├── ccswitch/ # CC Switch integration
│ │ ├── pricing/ # Price registry
│ │ └── ...
│ ├── capabilities/ # Tauri v2 permissions
│ └── tauri.conf.json # Tauri configuration
└── public/ # Static assets