Pulse-Claude-Code-Analytics

Open-source Claude Code + OpenAI Codex (ChatGPT App) analytics and Discord Rich Presence. Factual cost, cache, context, and plan telemetry. Native Tauri, 100% local.

Apache-2.0·Rust·ai-tools / analytics / anthropic
4
Stars
1
Forks

Media

Last updated
Jul 23, 2026
Original upload
May 31, 2026
Language
Rust
License
Apache-2.0
Type
Tool

About this project

Open-source Claude Code + OpenAI Codex (ChatGPT App) analytics and Discord Rich Presence. Factual cost, cache, context, and plan telemetry. Native Tauri, 100% local.

Report
Description

See where your Claude Code and Codex usage actually goes.

The open-source Claude Code + OpenAI Codex (ChatGPT App) analytics dashboard and Discord Rich Presence for Claude Pro / Max / Teams and ChatGPT Plus / Pro / Business.Measure provider-aware cost, cache, context, and limits; catch runaway sessions; and send one-click fix prompts back to the active coding agent. Native desktop. 100 % local. Zero telemetry.

CI Release Latest Downloads License Stars Sponsor

Download  ·  What's New  ·  About  ·  Screenshots  ·  Features  ·  Docs  ·  Sponsor


  • Event-driven live telemetry — one versioned backend snapshot now hydrates the app, updates Discord, and persists analytics without recurring frontend polling or unchanged SQLite writes.
  • Factual Codex usage — semantic global and model quota windows, Credits, and absolute local reset timestamps match the data Codex exposes without inventing a five-hour window.
  • Discord you can shape — ten ordered presence fields, compact and descriptive presets, persistent privacy controls, and one backend-owned preview/publisher contract.
  • Responsive native UI — Dark and Light themes, self-hosted Inter Variable, keyboard-visible controls, and validated layouts down to 720x560.
  • Release integrity — Pulse pins codex-presence-core 1.0.0 to canonical v1.8.0, validates migrations and the Windows SPDX SBOM, and ships immutable checksummed assets.
  • No five-second console flashes — Codex Git branch probes use the shared Windows CREATE_NO_WINDOW launcher during Pulse's background refresh.
  • Canonical fix, immutable pin — Pulse vendors Codex Discord Rich Presence v1.7.6 by annotated tag, exact commit, and per-file SHA-256 hashes.
  • Adapters stay local — sync updates canonical Rust owners while Pulse process detection and Tauri adapters remain outside the vendored mirror.
  • Regression locked — CI rejects the old upstream pin and any periodic Git probe that bypasses the silent launcher.

Download v1.6.0  ·  Full changelog

You may pay for Claude Code every month, ChatGPT every month, or both: Claude Pro / Max / Teams on one side and ChatGPT Plus / Pro / Business on the other. Yet if someone asked "which session consumed the most context this week?" or "what percentage of my input was served from cache?" you probably could not answer with evidence.

Pulse answers. It reads the local JSONL transcripts and runtime metadata written by Claude Code and Codex, then normalizes provider-specific facts without sending session data anywhere. Install, launch, and switch providers from the same desktop app:

  • A – F cache-health letter grade — trend-weighted, so you see the direction your cache efficiency is heading, not just today's number.
  • Opus-4.7-tokenizer aware — Opus 4.7's new tokenizer inflates tokens by up to 35 %; Pulse flags the inflation so you know when you're hitting limits faster than expected.
  • 1 M context GA pricing — flat per-token rate across the full 1 M window for Fable 5 · Mythos 5 · Opus 4.6 · Opus 4.7 · Opus 4.8 · Sonnet 4.6 · Sonnet 5 (per Anthropic's official pricing). Older betas (Sonnet 4 / 4.5, Opus 4 / 4.5) still get 2× input · 1.5× output · 2× cache at > 200 K. Pulse applies the correct math per-model so you compare sessions like-for-like. Plan-level Extra Usage on Pro / Max / Teams is tracked separately.
  • Inflection alerts — any session that blows past 2 × your rolling baseline gets flagged with context and a suggested fix.
  • Provider-aware fix prompts — every recommendation has a Copy Fix Prompt action labeled for the active provider: Fix with Claude Code or Fix with Codex.
  • Plan usage limits — live tracking of the windows each provider actually exposes, including Claude's Sonnet/Extra Usage telemetry and Codex's primary/secondary quota windows.
  • Release awareness — startup and 6-hour update checks surface new stable GitHub Releases inside the app without pretending a signed auto-installer exists before release metadata is published.
  • Discord Rich Presence — five-tier reasoning effort, live project / model / branch. Your flow state, on your profile.

One product, two factual lanes. Claude sessions keep Anthropic-specific model routing, cache TTL, Extra Usage, and statusline authority. Codex sessions use the canonical GPT catalog and current local App metadata, including GPT-5.6 Sol / Terra / Luna, independent reasoning and Standard/Fast modes, and 372K raw / 353.4K usable context. Unpublished Fast economics or missing cache-write telemetry stay partial or unavailable instead of becoming an invented multiplier.

Codex Discord Rich Presence has its own source-of-truth repo: xt0n1-t3ch/Codex-Discord-Rich-Presence. Pulse mirrors that Rust core into src/codex/ through checked sync scripts and CI freshness gates, so Codex support can move fast here while the standalone Rich Presence project keeps its own audience.

Written in Rust + Tauri 2 + Svelte 5. ≈ 12 MB on Windows, ≈ 18 MB on macOS. Cold-starts in under 200 ms. One-click installers for Windows (NSIS + MSI), macOS (DMG — Apple Silicon + Intel), and Linux (deb, rpm, AppImage). Apache-2.0 licensed (attribution required — see NOTICE). The data never leaves your machine.

Dashboard — at-a-glance cost · tokens · cache-hit ratio · plan limits · extra usage · activity heatmap.

Reports & Insights — provider-capable cache health · rule-based recommendations · cost inflection detection · one-click fix prompts for Claude Code or Codex.

Windows

irm https://raw.githubusercontent.com/xt0n1-t3ch/Pulse-Claude-Code-Analytics/main/scripts/install.ps1 | iex

Or grab an installer from the latest release:

AssetDescription
Pulse_x.y.z_x64-setup.exeNSIS installer — recommended
Pulse_x.y.z_x64_en-US.msiMSI installer

macOS

curl -fsSL https://raw.githubusercontent.com/xt0n1-t3ch/Pulse-Claude-Code-Analytics/main/scripts/install.sh | bash
AssetArchitecture
Pulse_x.y.z_aarch64.dmgApple Silicon (M1 / M2 / M3 / M4)
Pulse_x.y.z_x64.dmgIntel

Linux

curl -fsSL https://raw.githubusercontent.com/xt0n1-t3ch/Pulse-Claude-Code-Analytics/main/scripts/install.sh | bash
AssetDistro
pulse_x.y.z_amd64.debDebian / Ubuntu
pulse-x.y.z-1.x86_64.rpmFedora / RHEL
pulse_x.y.z_amd64.AppImageAny (portable)

From source

git clone https://github.com/xt0n1-t3ch/Pulse-Claude-Code-Analytics.git
cd Pulse-Claude-Code-Analytics
cd frontend && npm install && npm run build && cd ..
cd src-tauri && cargo tauri build

Analytics dashboard

Provider-owned cost mathPer session · day · model. Claude uses its published model/cache/Fast rules and authoritative statusline totals. Codex uses the vendored factual catalog, exposes completeness, and never invents unpublished Fast or cache-write economics.
A – F cache health gradeTrend-weighted hit ratio — cchubber-style. See your direction, not just your current number.
Model routing insightsOpus / Sonnet / Haiku split + "you could save $X by rerouting N sessions to Sonnet" estimate.
Inflection detectionAny session ≥ 2 × baseline cost-per-session gets flagged with context.
Recommendations engineEvery finding has a Copy Fix Prompt action routed to the active provider: Claude Code or Codex.
Plan usage limits5-hour window · weekly all-models · Sonnet-only · Extra Usage monthly spend. Auto-detects Pro / Max / Teams. Sound alert on Extra Usage spikes.
Heatmap · sparklines · chartsAll-local Chart.js. Zero network.
Reports exportBranded HTML + Markdown. One click.
OpenAI Codex supportCanonical GPT catalog with GPT-5.6 Sol / Terra / Luna, sourced API rates and Codex credits, exact/partial/unavailable cost status, 372K raw / 353.4K usable context, reasoning effort, and independent Standard/Fast display. One-click provider switch.
Codex RP upstream syncCodex Discord Rich Presence logic is mirrored from Codex-Discord-Rich-Presence with scripts and CI checks, instead of drifting as a private fork.

Discord Rich Presence

Live fieldsProject · git branch · model · reasoning effort · activity status.
Session timerElapsed since start. Persists through Discord restarts.
Reasoning tiersLow · Medium · High · Extra High · Max, plus Ultra where the selected Codex model exposes it.
Asset resolverMulti-tier — portal keys → Media Proxy → plain URLs → fallback.
Presets and privacyMinimal · Standard · Full, plus independent project, branch, model, activity, tokens, cost, limits, context, and systems controls.

Privacy & ownership

  • 100 % local. Your session data never leaves your machine. No telemetry, no phone-home, no cloud.
  • SQLite at ~/.claude/pulse-analytics.db — yours to inspect, export, back up, or delete.
  • Apache-2.0 licensed with required attribution. Fork it, audit it, ship your own version — just keep the NOTICE file and credit the original author per the license.
PulseGeneric dashboards
Opus 4.7 tokenizer awareness (flags inflated counts)
1 M context pricing correctly applied per model (GA flat vs. beta surcharge)
A – F cache health grade (trend-weighted)
Provider-aware Fix with Claude Code / Fix with Codex prompts
Zero-config — reads JSONL transcripts directlysetup required
Discord Rich Presence
Native desktop (Tauri 2 + Rust, no Electron bloat)
Open sourceApache-2.0varies

First launch → install Pulse → launch → it auto-detects local Claude Code and Codex state → choose a provider; sessions stream in live.

Discord Rich Presence → open the Discord tab → pick a preset (Minimal · Standard · Full) or customize fields → toggle on. Custom presence artwork in docs/discord-assets.md.

Reports → open the Reports tab → read the provider-capable analysis → click Copy Fix Prompt on any item → run it in the active provider. Export HTML / Markdown for your team.

  • Linux tray icon — system-tray quick toggles (Discord presence on/off, pause analytics, open dashboard) via Tauri's tray-icon feature. Parity with the Windows tray.
  • MCP server inventory — list every MCP server Claude Code has loaded for each session, with its tool count, per-tool invocation frequency, and an estimated token cost per tool call. Helps spot noisy MCPs silently inflating your context.
  • Budget-threshold desktop notifications — native OS notification when you cross configurable thresholds (e.g. "80 % of weekly limit", "Extra Usage just passed $150 of your $200 cap"). Replaces eyeballing the dashboard.
  • Custom Discord presence templates — save / share named field layouts beyond Minimal · Standard · Full. Export a preset as JSON; import one from a teammate.
  • Session replay — step through a past session's prompts and tool-call timeline with the same filters the live dashboard uses. Currently the data is there (JSONL traces) but there's no dedicated UI.
  • Smarter cost forecast — weekly-reset-aware projections with a confidence band, instead of today's linear daily-average multiplication.

Track on the project board.

PRs welcome. CONTRIBUTING.md has the dev setup, style guide, and release process. Please read the Code of Conduct first.

If Pulse saves you money (or sanity), sponsor its development:

Sponsor xt0n1-t3ch on GitHub

Every contribution goes toward faster releases, better analyzers, and keeping Pulse free and open-source forever.

Responsible-disclosure policy in SECURITY.md. Report privately via GitHub Security Advisories.

Apache-2.0 © 2026 xt0n1-t3ch. Use Pulse for anything (personal or commercial) — but per the license you must keep the copyright notice and the NOTICE file with original-author attribution in any redistribution or derivative work.


Windows + WSL session roots

Pulse is Windows-native by default. On Windows it does not launch wsl.exe while polling sessions, because broken WSL installs can raise OS-level crash dialogs. If you intentionally keep Claude/Codex transcripts inside WSL and want Pulse to scan them, opt in before launch:

$env:CC_PRESENCE_INCLUDE_WSL = "1"

Linux and macOS continue to use their native session paths; WSL path bridging remains available only through the explicit Windows opt-in.