vibe-gauge
Health Uyari
- License รขโฌโ License: MIT
- Description รขโฌโ Repository has a description
- Active repo รขโฌโ Last push 0 days ago
- Low visibility รขโฌโ Only 7 GitHub stars
Code Basarisiz
- rm -rf รขโฌโ Recursive force deletion command in build.sh
Permissions Gecti
- Permissions รขโฌโ No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
๐ง Native macOS menu-bar monitor for AI coding: reaps orphaned MCP zombies, tracks 5h/weekly quota resets, and monitors Token & Prompt Cache hit rates. Pure Swift, zero dependencies.
VibeGauge ๐ง
The Native macOS Menu Bar Dashboard for Vibe Coders
Reap orphaned MCP zombie processes ยท Monitor AI quotas & 5h/weekly reset countdowns ยท Track Token costs & Prompt Cache hit rates in real time.
๐บ๐ธ English โข ๐จ๐ณ ็ฎไฝไธญๆ
ย
๐ก Why VibeGauge?
When using autonomous coding agents like Claude Code, OpenAI Codex, Google Antigravity (agy), or Grok CLI, developers encounter three recurring frustrations:
- ๐งโโ๏ธ Memory Leaks from Orphaned MCP Servers:
Every time an agent spins up or aborts, headlessnodeorpythonModel Context Protocol (MCP) server processes are left behind (PPID == 1). Over days of coding, dozens or hundreds of these zombie processes quietly hoard 5 GB to 10 GB of RAM, triggering heavy swap and system thermal throttling. - โณ Quota Blind Spots & "Reset Anxiety":
Each vendor uses a different quota model โ Claude's dynamic 5-hour rolling window and 7-day limits, Codex's weekly quotas, Gemini's credit pools. Wondering if your quota has reset or when you can code again usually requires hitting rate limits in the terminal or opening vendor dashboards. - ๐ Token Costs & Prompt Cache Black Hole:
How many tokens did you burn today? Is Prompt Caching actually hitting 95%+ to save your budget? How much thinking/reasoning token overhead was generated?
VibeGauge is built entirely with native Swift + AppKit + SwiftUI. It has zero third-party dependencies and no prompt or usage-log uploads. Usage analysis stays local; the Network tab makes only the trace requests documented below.
โจ Features
- ๐งน One-Click Orphaned MCP Reaper:
- Automatically identifies headless MCP servers (
PPID == 1, no listening ports, not on system whitelist, matches MCP signatures). - Multi-tier safety guards prevent accidental kills of legitimate dev tasks.
- One-click clearing of
~/.npm/_npxcache bloat. - Optional silent background sweep every 30 minutes.
- Automatically identifies headless MCP servers (
- โฑ๏ธ Unified AI Quota & Reset Timers:
- Claude: Captures subscription tier (Max 5x / Max 20x / Pro / Team), 5-hour percentage, 7-day quota, and exact countdown to reset.
- Codex: Detects primary
codexbucket usage, identifiesusage_limit_exceededexact unlock timestamps, and supports optional passwordless SSH synchronization from remote dev machines. - Gemini / Antigravity: Tracks official and 3rd-party quota pools with respective reset dates.
- Grok: Reads weekly credit usage and billing cycle reset boundaries.
- Local Model Probing: Detects running Ollama / LM Studio instances and active models.
- ๐ Today's Token Analytics & Prompt Cache ROI:
- Aggregated daily stats: hundreds of millions in context tokens, output tokens, and thinking/reasoning tokens.
- Real-time Prompt Cache hit rate calculations (e.g. 97.4% hit rate).
- Live inspector capturing the latest 3 interaction rounds (model name, latency, cache hit %, tokens).
- ๐ Built-in Transparent API Key Proxy (Optional):
- For direct API calls (e.g. routing Claude Code or scripts to GLM, DeepSeek, Kimi, MiniMax, OpenRouter).
- Runs a local proxy daemon on
127.0.0.1:18790with zero configuration needed. - Fetches plan tiers & remaining balances automatically while keeping keys strictly in memory.
- ๐ฅ๏ธ macOS Native Craftsmanship:
- Pure Swift native app โ starts instantly and sips minimal system resources.
- Menu bar icon shows live available memory percentage.
- Adaptive panel height with two-finger trackpad swipe to switch tabs smoothly.
๐ Quick Start
Method 1: Download Pre-built Binary (Recommended)
Universal app โ runs on Apple Silicon and Intel Macs with macOS 14+. The UI follows your system language (English / ็ฎไฝไธญๆ).
- Download the latest
VibeGauge.zipfrom GitHub Releases. - Unzip and drag
VibeGauge.appinto your/Applicationsfolder. - Launch it. The icon will appear in your top menu bar.
Tip: On first launch, if prompted by macOS Gatekeeper, click "Open Anyway" in
System Settings โ Privacy & Security. If you use menu-bar management utilities like Bartender or Ice, make sure VibeGauge isn't hidden in a collapsed drawer.
Method 2: Build from Source in 3 Seconds (Zero Dependencies)
No heavy Xcode installation required โ only macOS standard command line tools (swiftc):
# 1. Clone the repository
git clone https://github.com/MaxHaiCom/vibe-gauge.git
cd vibe-gauge
# 2. Build and bundle
./build.sh
# 3. Launch
open VibeGauge.app
Headless & CLI Flags
# Verify parsing logic and output a single terminal snapshot (no UI launched)
./VibeGauge.app/Contents/MacOS/VibeGauge --selftest
# Install / Uninstall the background API accounting proxy daemon
./VibeGauge.app/Contents/MacOS/VibeGauge --install-proxy
./VibeGauge.app/Contents/MacOS/VibeGauge --uninstall-proxy
๐ Data Sources & Freshness
All subscription tiers, quotas, and token metrics are read strictly from local session logs or vendor cache files:
| Provider | Plan Detection | Quotas & Reset Timestamps | Update Frequency |
|---|---|---|---|
| Claude | ~/.claude.json(e.g. max_5x, max_20x, pro) |
~/.claude/claude-usage.json(Statusline-intercepted 5h / 7d rates & reset points) |
Automatically updates on every dialogue round |
| Codex | ~/.codex/auth.json(JWT chatgpt_plan_type) |
Session jsonl rate_limits(Extracts exact unlock time from task_complete errors) |
Updates only when requests are actively sent |
| Gemini | Local auth token verification | ~/.cache/agy-hud/quota_cache.json(Split by primary & 3rd-party model pools) |
Refreshed by background helper while agy runs |
| Grok | ~/.grok/settings_cache.json |
~/.grok/logs/unified.jsonl(Latest billing credits config & period end) |
Periodically flushed by Grok CLI |
| Ollama | Local socket & process probe | Non-quota based (monitors active on-device models) | Instant live status |
๐ Note: Footnotes such as "Recorded 1h ago" represent the timestamp when the vendor CLI last refreshed its local log, not a lag in VibeGauge. VibeGauge's incremental delta-scanner runs in ~100ms when the panel is open.
Network and Historical Statistics
The panel has five tabs: Subscriptions / API / Statistics / Network / System.
- Network probes only each AI domain's
/cdn-cgi/traceendpoint (Anthropic, ChatGPT, OpenAI API and Grok), once per minute with fresh connections. Gemini has no trace endpoint; its route is shown only when the local clash connection table contains an active connection. Failures remain visible as unavailable. - The local clash API is read every 10 seconds (
clashAPI, defaulthttp://127.0.0.1:9090; optionalclashSecret). Only loopback addresses are accepted. Local interface, route and DNS information refresh every 30 seconds; byte counters are sampled at least two seconds apart. No network configuration is changed. - Every 10 minutes, an IPv6-only request to Cloudflare's trace endpoint checks IPv6 reachability, and local resolver addresses are checked for possible DNS leakage. These are indicators, not proof that all traffic follows the same route. Exit-change notifications are enabled by default, with a 10-minute cooldown per AI.
- Statistics reads local Claude, Codex and API proxy logs in the background, then updates incrementally every five minutes. Claude requests are deduplicated across files; Codex uses per-request usage when available and cumulative differences otherwise. Events are grouped by their timestamps in the local timezone.
- History is stored in
~/.config/vibegauge/usage-daily.json. Removing old logs retains their already-cached history; rewriting a file replaces its contribution. Session counts are distinct log files. CLI and API proxy sources can include the same call and are not deduplicated against each other. - API-equivalent cost uses only
~/.config/vibegauge/prices.json. Unpriced models are explicitly excluded; there are no built-in production prices. Token totals include cached input and output; reasoning tokens are part of output.
No prompts or usage logs are uploaded by these features. Network probes necessarily make the outbound requests described above. The optional existing API proxy and remote Codex synchronization retain their own behavior. --selftest skips remote SSH, exercises parsing and incremental-cache fixtures, and prints masked network and real historical summaries.
๐ ๏ธ API Key Accounting Proxy (Optional)
When routing terminal tools or scripts directly to AI provider endpoints, route requests through the local proxy to capture token analytics and credit balances:
Install Proxy Daemon:
Click "Install API Proxy" in the API tab, or run:./VibeGauge.app/Contents/MacOS/VibeGauge --install-proxyThe proxy listens on
127.0.0.1:18790.Zero-Config Routing:
Simply prefix your existing endpoint URL:# GLM (Zhipu AI) export ANTHROPIC_BASE_URL=http://127.0.0.1:18790/https://open.bigmodel.cn/api/anthropic # DeepSeek export OPENAI_BASE_URL=http://127.0.0.1:18790/https://api.deepseek.com/v1(One-liner to prepend the proxy to all ANTHROPIC_BASE_URL declarations in
~/.zshrc:)perl -pi.bak -e 's#(ANTHROPIC_BASE_URL=["\x27]?)(?!http://127\.0\.0\.1:18790/)(https?://)#$1http://127.0.0.1:18790/$2#' ~/.zshrcSupported Providers:
- GLM Coding Plan: Automatic tier & 5h/weekly quota tracking
- OpenRouter: Real-time remaining balance & credits calculation
- DeepSeek: Balance endpoint integration
- Kimi / MiniMax / Volcano Ark / MiMo: Streaming token usage accounting
โ๏ธ Configuration (Optional)
Everything works with zero config. These files and settings are only needed for the extras.
Price table โ ~/.config/vibegauge/prices.json. VibeGauge ships no built-in prices (they change too often; a wrong number is worse than none). Without it, "API-equivalent cost" is simply hidden.
mkdir -p ~/.config/vibegauge
curl -fsSL https://raw.githubusercontent.com/MaxHaiCom/vibe-gauge/main/Resources/prices.example.json -o ~/.config/vibegauge/prices.json
# then fill in per-million-token prices; model names match by longest prefix
Request-based plan limits โ ~/.config/vibegauge/plans.json (see Resources/plans.example.json). For coding plans that expose no usage API, quota = requests counted by the local proxy รท the limit you enter, always labelled estimated.
Advanced settings (defaults write com.haifeng.vibegauge <key> <value>, then restart the app):
| Key | Default | Purpose |
|---|---|---|
logRetentionDays |
30 |
Session logs older than this are offered for cleanup (min 7) |
clashAPI |
http://127.0.0.1:9090 |
Clash / mihomo / sing-box controller for the Network tab (loopback only) |
clashSecret |
โ | Controller secret, if you set one |
codexRemoteHost |
off | user@host with password-less SSH; merges Codex quota from another Mac |
๐๏ธ Uninstall
/Applications/VibeGauge.app/Contents/MacOS/VibeGauge --uninstall-proxy # only if you installed the proxy
rm -rf /Applications/VibeGauge.app ~/.config/vibegauge
defaults delete com.haifeng.vibegauge
If you enabled Launch at Login, turn it off in the menu first (or remove it in System Settings โ General โ Login Items). Remember to strip the http://127.0.0.1:18790/ prefix from any *_BASE_URL you pointed at the proxy.
๐ก๏ธ Privacy & Security
- ๐ 100% Local Execution: No analytics, no telemetry, no remote servers. Your token counts and usage data never leave your Mac.
- ๐ Zero Key Disk Logging: API keys processed by the local proxy remain strictly in volatile process memory for upstream balance checks. Recorded logs only store an 8-character SHA-256 fingerprint; URL query parameters are stripped.
- โ๏ธ Non-Intrusive: VibeGauge reads local logs and network settings, and makes the documented trace probes. It does not tamper with OAuth credentials, proxy your login sessions, or modify vendor or system network configurations.
- ๐ก๏ธ Whitelisted Safe Reaping: The process cleaner strictly enforces multi-criteria verification before terminating orphaned processes.
๐ค Contributing
Contributions, feature requests, and bug reports are warmly welcomed โ see CONTRIBUTING.md. Security issues: please report privately, see SECURITY.md.
- Discover a new MCP process pattern? Please open a PR to update the signature filters.
- Vendor changed their log format or introduced a new quota tier? Feel free to submit an issue.
๐ License
Released under the MIT License.
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi