{"id":4207,"date":"2026-11-24T23:18:34","date_gmt":"2026-11-24T23:18:34","guid":{"rendered":"https:\/\/www.gubatron.com\/blog\/?p=4207"},"modified":"2026-11-24T23:26:09","modified_gmt":"2026-11-24T23:26:09","slug":"tokenmon-from-a-grok-usage-meter-to-a-rust-port-for-windows","status":"publish","type":"post","link":"https:\/\/www.gubatron.com\/blog\/tokenmon-from-a-grok-usage-meter-to-a-rust-port-for-windows\/","title":{"rendered":"TokenMon: from a Grok usage meter to a Rust port for Windows"},"content":{"rendered":"<p>I keep a small menu bar app running all day that tells me how much of my AI allowances I&#8217;ve burned through: my Claude 5-hour session, my weekly pools, my Cursor billing cycle, my SuperGrok limits. It&#8217;s called <strong>TokenMon<\/strong>, and it started life as something much smaller, written by someone else.<\/p>\n<h2>It started as a Grok usage meter<\/h2>\n<p>On July 11, 2026, <a href=\"https:\/\/github.com\/faulknerpearce\">Austin Faulkner-Pearce<\/a> made the <a href=\"https:\/\/github.com\/tokenmonitor\/token_monitor\/commits\/master\/?since=2026-07-11&amp;until=2026-07-11\">first commit<\/a> of a project called <em>GrokUsage<\/em>: &#8220;a macOS menu bar app for SuperGrok weekly usage tracking&#8221;. One provider, one number in the menu bar, a daily chart. It did one thing, and it did it well.<\/p>\n<p>Then Austin shared it with family and friends, and that&#8217;s where it got interesting. People use different mixes of AI tools, and every service meters usage in its own way: rolling session windows, weekly pools, monthly billing cycles, credit balances, spending caps. The app grew a provider contract (session, usage client, poller, panel) so a new service is one folder and a registry entry. The Grok meter became a general one, and it became TokenMon. Today it tracks seven providers: ChatGPT (Codex), Claude, Cursor, Grokbot, OpenCode Go, OpenRouter and SuperGrok.<\/p>\n<h2>Then I joined<\/h2>\n<p>My first commit landed on August 6, a Makefile so the whole thing could be built, installed and released from the command line. Version 1.0.0 followed on August 19, and as I write this we&#8217;re at 1.13.2. If you want to look, it&#8217;s all open source: <a href=\"https:\/\/github.com\/tokenmonitor\/token_monitor\">github.com\/tokenmonitor\/token_monitor<\/a>.<\/p>\n<p>TokenMon is a native Swift app for the Mac. I decided to port it to Windows, and I decided to port it to Rust.<\/p>\n<h2>Why Rust, and why only Rust now<\/h2>\n<p>That decision wasn&#8217;t about TokenMon. It came from <a href=\"https:\/\/diariobitcoin.com\">DiarioBitcoin<\/a>. Our tooling there had grown up in three languages at once: Java, Go and Python. I started moving it to Rust by hand, and the history of that work is still in the repository: the Rust folder&#8217;s history begins on October 1, 2022, when I moved my first Rust experiments into the main repository, and it has more than 1,700 commits touching it today. Everything that used to run on three different stacks became one language, and in the process it saved us two extra servers.<\/p>\n<p>After that I stopped weighing languages. Every new project of mine is Rust, and TokenMon for Windows was going to be one too.<\/p>\n<h2>A port that can&#8217;t drift<\/h2>\n<p>The hard part of a port isn&#8217;t writing it, it&#8217;s keeping two apps behaving the same while both keep changing. So the Windows port is built around a rule: the Mac app&#8217;s tests are the specification. There&#8217;s a ledger that maps every one of the Mac app&#8217;s 924 tests to a Rust test. Right now 904 are ported, 19 are macOS-only by nature, and one is waiting on a decision. CI fails if a Swift test is added, renamed or deleted without the ledger being updated, and it fails if the Windows version number differs from the Mac one. Both apps ship the same version, 1.13.2.<\/p>\n<p>The Windows app is a Rust workspace of 11 crates, around 93,000 lines including tests, with more than 2,000 automated tests. It lives in the system tray, draws its panels with <a href=\"https:\/\/slint.dev\">Slint<\/a>, follows Windows&#8217; dark mode (or lets you pick), keeps your sign-ins encrypted with your Windows account through the Data Protection API, and updates itself. It installs from a per-user MSI with no admin rights, or runs from a portable zip. The macOS and Windows installers are built by composable GitHub Actions, unsigned for now, until we have the certificates to sign them.<\/p>\n<p style=\"text-align: center;\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4209\" style=\"max-width: 48%; height: auto;\" src=\"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2026\/11\/tokenmon-current.png?resize=420%2C814&#038;ssl=1\" alt=\"The TokenMon panel on Windows in the light theme, showing Claude usage: 5-hour and weekly limits, a daily budget chart, tokens and spend this month, and models this month.\" width=\"420\" height=\"814\" srcset=\"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2026\/11\/tokenmon-current.png?w=420&amp;ssl=1 420w, https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2026\/11\/tokenmon-current.png?resize=155%2C300&amp;ssl=1 155w\" sizes=\"auto, (max-width: 420px) 100vw, 420px\" \/> <img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4210\" style=\"max-width: 48%; height: auto;\" src=\"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2026\/11\/tokenmon-dark.png?resize=420%2C814&#038;ssl=1\" alt=\"The same TokenMon panel on Windows in the dark theme.\" width=\"420\" height=\"814\" srcset=\"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2026\/11\/tokenmon-dark.png?w=420&amp;ssl=1 420w, https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2026\/11\/tokenmon-dark.png?resize=155%2C300&amp;ssl=1 155w\" sizes=\"auto, (max-width: 420px) 100vw, 420px\" \/><\/p>\n<p style=\"text-align: center;\"><em>TokenMon on Windows, in light and dark. It follows the Windows app mode, or you can pick a theme in Settings.<\/em><\/p>\n<h2>What&#8217;s next<\/h2>\n<p>The Windows port lives on the <code>windows-port<\/code> branch and is heading upstream so both apps can live in one repository. Signing, once I have the accounts, is the next piece. If you use more than one AI tool and you&#8217;d like to see where your limits stand without opening five tabs, give TokenMon a try, and a big thank you to Austin for starting it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I keep a small menu bar app running all day that tells me how much of my AI allowances I&#8217;ve burned through: my Claude 5-hour session, my weekly pools, my Cursor billing cycle, my SuperGrok limits. It&#8217;s called TokenMon, and it started life as something much smaller, written by someone else. It started as a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4213,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[15],"tags":[],"class_list":["post-4207","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-code"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5Unzf-15R","jetpack-related-posts":[{"id":3064,"url":"https:\/\/www.gubatron.com\/blog\/new-frostwire-for-android-1-0-8-out\/","url_meta":{"origin":4207,"position":0},"title":"New FrostWire for Android 1.0.8 out","author":"gubatron","date":"June 1, 2013","format":false,"excerpt":"A new FrostWire for Android is out on Google Play. In this release we improved our search algorithm to include relevant search results that were being hidden in previous versions. We've also made use of Square's Picasso Image loading\/caching library for displaying all the images on the user interface, resulting\u2026","rel":"","context":"In \"Android\"","block_context":{"text":"Android","link":"https:\/\/www.gubatron.com\/blog\/tag\/android\/"},"img":{"alt_text":"Screenshot of the new FrostWire for Android navigation menu","src":"https:\/\/frostwire.files.wordpress.com\/2013\/05\/468570_620137218016084_1578847253_o.png?w=350&h=200&crop=1","width":350,"height":200},"classes":[]},{"id":4168,"url":"https:\/\/www.gubatron.com\/blog\/cloudllm-v0-10-from-a-simple-llm-wrapper-to-a-multi-agent-orchestration-framework\/","url_meta":{"origin":4207,"position":1},"title":"CloudLLM v0.10: from a simple LLM wrapper to a Multi-Agent Orchestration framework","author":"gubatron","date":"February 11, 2026","format":false,"excerpt":"February 11th, 2026 \u00a0 CloudLLM has evolved dramatically over three consecutive releases (v0.8.0 through v0.10.0) into a\u00a0comprehensive, production-ready platform for building autonomous multi-agent systems. What began as an LLM wrapper request-response pattern library has grown into a sophisticated orchestration engine with seven distinct collaboration modes, real-time event observability, atomic task\u2026","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/www.gubatron.com\/blog\/category\/ai\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2026\/02\/agent_orchestra.jpg?fit=1096%2C657&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2026\/02\/agent_orchestra.jpg?fit=1096%2C657&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2026\/02\/agent_orchestra.jpg?fit=1096%2C657&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2026\/02\/agent_orchestra.jpg?fit=1096%2C657&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2026\/02\/agent_orchestra.jpg?fit=1096%2C657&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":472,"url":"https:\/\/www.gubatron.com\/blog\/como-recuperar-la-barra-de-menu-en-el-explorador-de-archivos-de-vista\/","url_meta":{"origin":4207,"position":2},"title":"Como recuperar la barra de menu en el Explorador de Archivos de Vista","author":"gubatron","date":"February 25, 2007","format":false,"excerpt":"Por algun motivo los genios de Microsoft decidieron esconder por defecto la barra de menu del Explorador de archivos en Windows Vista. No solo escondieron un menu vital para al menos los primeros momentos con el sistema operativo, ya que muchos de nosotros siempre queremos hacer cosas como, mostrar archivos\u2026","rel":"","context":"In &quot;Geeklife&quot;","block_context":{"text":"Geeklife","link":"https:\/\/www.gubatron.com\/blog\/category\/geeklife\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4184,"url":"https:\/\/www.gubatron.com\/blog\/agentes-automatizacion-y-el-futuro-de-los-medios\/","url_meta":{"origin":4207,"position":3},"title":"Agentes, Automatizaci\u00f3n y el Futuro de los Medios","author":"gubatron","date":"March 9, 2026","format":false,"excerpt":"Explico c\u00f3mo converti una publicaci\u00f3n sobre Bitcoin en una operaci\u00f3n editorial fuertemente automatizada con modelos de IA, flujos agenticos y herramientas desarrolladas en Rust. Su relato no solo describe un salto de 20 a 80 art\u00edculos diarios, sino que tambi\u00e9n plantea una idea m\u00e1s ambiciosa: usar blockchain como memoria persistente\u2026","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/www.gubatron.com\/blog\/category\/ai\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2026\/03\/canuto-imagine-1773077597.jpg?fit=1200%2C720&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2026\/03\/canuto-imagine-1773077597.jpg?fit=1200%2C720&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2026\/03\/canuto-imagine-1773077597.jpg?fit=1200%2C720&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2026\/03\/canuto-imagine-1773077597.jpg?fit=1200%2C720&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2026\/03\/canuto-imagine-1773077597.jpg?fit=1200%2C720&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3228,"url":"https:\/\/www.gubatron.com\/blog\/first-impressions-of-the-dell-venue-8-pro-running-full-blown-windows-8-1-intel-atom\/","url_meta":{"origin":4207,"position":4},"title":"First impressions of the Dell Venue 8&#8243; pro running full blown Windows 8.1 (Intel Atom)","author":"gubatron","date":"February 2, 2014","format":false,"excerpt":"Check out the new Dell Venue 8\", this is a pretty cool $300 tablet that runs FULL blown Windows 8.1, so you can use like a full blown desktop. Then if you're not working, you can take it to the living room, bedroom, couch, wherever and have fun with it\u2026","rel":"","context":"In &quot;Review&quot;","block_context":{"text":"Review","link":"https:\/\/www.gubatron.com\/blog\/category\/review-2\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2873,"url":"https:\/\/www.gubatron.com\/blog\/get-frostwire-1-0-for-android\/","url_meta":{"origin":4207,"position":5},"title":"Get FrostWire 1.0 for Android","author":"gubatron","date":"November 22, 2012","format":false,"excerpt":"If you are getting an Android device this holiday season, we've spent the last 5 months building a must-have app for it. Install FrostWire via Google Play. Download the .apk installer. Here's a few things you can do with our completely re-designed and easy to use file sharing client and\u2026","rel":"","context":"In &quot;Android&quot;","block_context":{"text":"Android","link":"https:\/\/www.gubatron.com\/blog\/category\/android\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2026\/11\/tokenmon-light-dark.png?fit=1200%2C630&ssl=1","_links":{"self":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts\/4207","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/comments?post=4207"}],"version-history":[{"count":4,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts\/4207\/revisions"}],"predecessor-version":[{"id":4214,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts\/4207\/revisions\/4214"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/media\/4213"}],"wp:attachment":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/media?parent=4207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/categories?post=4207"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/tags?post=4207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}