Rudel

Open-source analytics for Claude Code and Codex sessions — a CLI uploads session transcripts to a self-hostable dashboard tracking token usage, session duration, activity patterns, and model usage.

286stars
16forks
MIT License
TypeScript

Rudel gives visibility into how Claude Code and Codex are actually being used: token consumption, session duration, activity patterns, and model choice, surfaced in a dashboard instead of scattered across terminal scrollback. A CLI installs hooks that run when a coding-agent session ends, uploading the transcript automatically (or in a batch for past sessions), and Rudel processes uploaded transcripts into analytics backed by ClickHouse.

While the fastest path is Rudel’s hosted cloud (a free account at rudel.ai), the project is genuinely self-hostable: the repo includes a Docker Compose setup, a Dockerfile, and a documented self-hosting guide describing a Bun server backed by Postgres (for auth) and ClickHouse (for session/analytics storage), deployable on any provider that can run those, not just the specific stack (ObsessionDB, Neon, Fly.io) used in the guide’s example.

MIT licensed, the project is a monorepo of apps/api, apps/cli, and apps/web, giving teams the same analytics whether they use the hosted version or run the full stack themselves.

What You Get

  • A CLI that auto-uploads Claude Code and Codex session transcripts via hooks triggered on session exit
  • A dashboard showing token usage, session duration, activity patterns, and model usage across sessions
  • Batch upload support for past sessions, not just ones captured going forward
  • A documented self-hosting path using Postgres (auth) and ClickHouse (analytics), deployable on any compatible provider

Common Use Cases

  • Tracking token usage and cost patterns across a team’s Claude Code and Codex sessions
  • Understanding coding-agent activity patterns (session length, frequency, model choice) to inform tooling decisions
  • Self-hosting coding-agent analytics instead of sending session transcripts to a third-party cloud
  • Onboarding a team onto shared visibility into AI-assisted coding usage via an invite-based organization dashboard

Under The Hood

Architecture Rudel is a Turborepo monorepo with apps/api (the Bun server handling ingestion and auth), apps/cli (the npm-installable client that registers session-end hooks), and apps/web (the analytics dashboard), plus shared packages/ including a ClickHouse schema-management package (ch-schema) used for applying analytics table migrations. Session transcripts land in ClickHouse with a materialized view computing analytics on insert, so dashboard queries read pre-aggregated data rather than recomputing analytics on every page load.

Tech Stack TypeScript and Bun for the server and CLI, Postgres for authentication/user data, ClickHouse for session transcript storage and analytics (with ReplacingMergeTree/SharedReplacingMergeTree table engines), and Docker/Docker Compose for self-hosted deployment. The documented reference stack uses ObsessionDB, Neon, and Fly.io, all chosen for their free tiers rather than being hard requirements.

Code Quality The project uses Biome for linting/formatting and release-please for automated versioning, both signals of a modern, CI-conscious TypeScript setup; combined with active, consistently maintained commit history, it reflects a reasonably disciplined small-team codebase.

What Makes It Unique Most coding-agent usage stays invisible in terminal scrollback; Rudel specifically hooks into Claude Code and Codex’s session lifecycle to capture and analyze that usage, and — unlike many hosted-analytics-first tools — backs it with a genuinely documented self-hosting path rather than open-sourcing just a thin client for a closed backend.

Self-Hosting

Licensing Model MIT licensed — the API, CLI, and web dashboard are all open source with no license key.

Self-Hosting Restrictions None found; the self-hosting guide describes the same architecture used in Rudel’s own production hosting, just with self-provisioned Postgres/ClickHouse/app-server infrastructure.

Cloud vs Self-Hosted Rudel’s hosted cloud at rudel.ai offers a free account as the fastest path to get started; self-hosting requires provisioning your own Postgres and ClickHouse instances but gives full control over where session data is stored.

License Key Required No.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack

No spam. Unsubscribe anytime.

Join 750+ subscribers
No spam. Unsubscribe anytime.

Search