$ show getagentseal/codeburn
CodeBurn is a local-first, cross-platform observability and cost management tool for AI coding assistants. It reads session logs from 40+ AI tools (Claude Code, Cursor, Copilot, Codex, Gemini, etc.) directly from the user's local disk, parses them, and attributes costs using a bundled pricing engine with fallbacks. The architecture is a modular monolith with a core TypeScript CLI engine and multiple platform-specific frontends (Electron desktop, Swift macOS menubar, Tauri Windows/Linux tray, VS Code extension, MCP server, and GNOME extension). The codebase demonstrates exceptional engineering discipline. It features a sophisticated versioned cache with cross-process locks and progressive hydration, a clean provider adapter pattern for ingesting heterogeneous data sources, and a robust quota monitoring system with strict error handling and credential safety. The test suite is extensive, covering parser edge cases, cache correctness, and cross-platform parity. The project is actively maintained with frequent releases and a large community (11k+ stars). The primary risk is the volatility of the external AI tool APIs it depends on for quota tracking and log formats, but the code is structured to handle this through its adapter pattern and comprehensive testing. It requires Node.js 22.13+.
The LLM identified 6 files worth highlighting for reuse:
Defines the core QuotaAdapter interface and orchestration logic. Each provider adapter (e.g., Kimi, Gemini, Copilot) implements a strict contract with injected dependencies (fetch, readFile, now), a connection state machine (disconnected/connected/transientFailure/terminalFailure), Retry-After backoff, and mandatory error sanitization that redacts tokens and NUL bytes from diagnostics. This pattern is directly reusable for any application needing to safely monitor external API usage limits.
Implements a versioned, sharded, cross-process cache with lock takeover and progressive hydration. Uses a heartbeat-based lock file protocol with stale PID recovery and atomic renames for crash safety. Supports bounded ranged loads and stub generation for fast cold starts. A textbook implementation of a robust local cache for concurrent processes.
Defines the Provider interface (discoverSessions, createSessionParser, probeRoots) for ingesting session data from 40+ AI coding tools. Each provider is a single file that handles its specific data format (JSONL, SQLite, JSON). This pattern is directly applicable to any system that needs to ingest data from multiple heterogeneous sources with a unified output schema.
A self-contained module for currency conversion. Fetches FX rates from the Frankfurter API, caches them locally, and provides formatting utilities. The Swift port (CurrencyState.swift) demonstrates the pattern is platform-agnostic. Clean separation of concerns and robust caching strategy.
Implements salt-pseudonymization for project names and paths to protect user privacy in the MCP server and sharing features. Uses HMAC-based hashing with a per-session salt. A clean, extractable pattern for any application that needs to expose data to external tools (LLMs, telemetry) without leaking sensitive filesystem paths.
Implements an append-only action journal for applying and reverting optimization suggestions. Features locked undo, drift detection, and backup/rollback on failure. A general-purpose pattern for safely applying state mutations with a reliable undo mechanism.