See total tokens used and cost across all Grok CLI sessions in one live dashboard
Track lines of code added and removed by the Grok AI coding agent
Capture per-call API cost and token detail by proxying Grok CLI traffic
| daniel-farina/grokscope | 901d3/ditherxyr.js | ash310u/awesome-ai-stack | |
|---|---|---|---|
| Stars | 2 | 2 | 2 |
| Language | JavaScript | JavaScript | JavaScript |
| Last pushed | — | 2026-06-20 | — |
| Maintenance | — | Active | — |
| Setup difficulty | easy | moderate | easy |
| Complexity | 2/5 | 2/5 | 2/5 |
| Audience | developer | developer | vibe coder |
Figures from each repo's GitHub metadata at analysis time.
Reads local telemetry files the Grok CLI already writes, runs entirely on localhost.
grokscope is a monitoring tool for the Grok CLI, an AI coding agent made by xAI. The Grok CLI shows only the current conversation turn in its interface, so there is no built-in way to see how many tokens you have used across all sessions today, what your total cost is, or how many lines of code the agent has written. grokscope fills that gap by reading the telemetry files that Grok already writes locally to ~/.grok/sessions/ and presenting the data in a live dashboard. It has three components you can use independently or together. The web dashboard is a browser-based interface built with Vite and Express that shows tokens per session, lines of code added and removed, a tool usage histogram (which operations like read_file, search_replace, and write the agent uses most), and recent file edits. It updates live via Server-Sent Events. The CLI dashboard (grokscope-cli) is a terminal-based alternative for people who want the same information without switching to a browser. The reverse proxy (grokscope-tap) sits between the Grok CLI and the xAI API and captures detailed per-call data, input tokens, output tokens, cached input tokens, and cost in USD per API call, information the session files alone do not contain. Everything runs locally and binds only to 127.0.0.1. No data is uploaded anywhere. The backend is written in vanilla JavaScript using Express, and the frontend uses vanilla JavaScript without a charting library, bar charts are rendered as CSS divs. You would reach for this if you run the Grok CLI regularly and want visibility into token usage and cost across sessions.
A local monitoring toolkit that reads the Grok CLI's session files to show token usage, cost, and code changes in a live dashboard.
Mainly JavaScript. The stack also includes JavaScript, Express, Vite.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.