A visual dashboard for monitoring Zhipu AI (GLM) Coding Plan usage with dark/light theme support.
- Token Usage Monitoring - Real-time token usage and percentage within a 5-hour sliding window
- MCP Usage Monitoring - Monthly MCP call quota usage
- Today's Stats - Call count and total token consumption in the last 24 hours
- Historical Trends - ECharts line chart showing 24-hour usage trends
- Manual Refresh - Click to fetch latest data immediately
- Auto Refresh - Configurable auto-refresh interval (30s / 1min / 5min / 10min)
- Theme Switching - Support system / dark / light themes
- Quota Warning - Warning state when usage exceeds 80%
- Vue 3 (Composition API)
- Vite
- ECharts / vue-echarts
- axios
- Node.js 18+
- pnpm (recommended)
# Clone the project
git clone https://github.com/your-username/codeplan-usage-dashboard.git
cd codeplan-usage-dashboard
# Install dependencies
pnpm install
# Start dev server
pnpm devVisit http://localhost:5173
pnpm buildBuild output is in dist directory.
-
Fork the repository
- Click Fork button to copy the project to your GitHub account
-
Deploy with Vercel
- Visit Vercel and login with GitHub
- Click Add New... → Project
- Select your forked
codeplan-usage-dashboardrepository - Click Deploy to complete deployment
# Install Vercel CLI
pnpm add -g vercel
# Enter project directory
cd codeplan-usage-dashboard
# Login to Vercel
vercel login
# Deploy
vercelBuild output in dist can be deployed to any static hosting platform:
- Netlify
- Cloudflare Pages
- GitHub Pages
- Aliyun OSS
- Tencent Cloud COS
- Visit Zhipu AI Open Platform
- Login and go to console
- Create or view API Key
- Configure API Key in dashboard settings
In settings panel you can configure:
- Auto Refresh: Enable/disable
- Refresh Interval: 30s / 1min / 5min / 10min
Settings are automatically saved to browser localStorage.
codeplan-usage-dashboard/
├── src/
│ ├── components/
│ │ ├── UsageCard.vue # Usage card component
│ │ ├── TrendChart.vue # ECharts trend chart
│ │ └── SettingsModal.vue # Settings modal
│ ├── composables/
│ │ └── useTheme.js # Theme management
│ ├── services/
│ │ └── glmApi.js # GLM API calls
│ ├── App.vue
│ └── main.js
├── api/
│ └── monitor.js # Vercel Serverless proxy
├── vercel.json # Vercel config
└── package.json
- API Key Storage: API Key is stored only in browser localStorage, never uploaded to any server
- Proxy Forwarding: API calls are forwarded through Vercel proxy server, please ensure compliance with Zhipu AI Terms of Service
- Usage Scope: For personal learning/entertainment only, do not use for commercial purposes
- Legal Risk: Ensure your usage complies with Zhipu AI and relevant laws/regulations
- API Key Security: API Key is stored in browser localStorage, do not expose in public
- CORS: Since Zhipu AI API doesn't support direct browser calls, production uses Vercel Serverless proxy
- Refresh Frequency: Set refresh interval based on actual needs to avoid excessive requests
MIT
