Leask

Introducing CodeStats

Leask

CodeStats showing GitHub activity, language statistics, coding time and AI usage

Introducing CodeStats! 😄

Many people add GitHub Readme Stats or GitHub Stats Extended to their GitHub profile or project README. Of course, these numbers don’t prove how skilled someone is. They’re just for fun, and a nice way to show what you’ve been working on.

I liked the idea, but I kept running into slow refreshes, failed requests and GitHub API limits. My statistics were also scattered across several cards. I wanted one place to bring them together, with a persistent cache that could keep the last successful result visible when an upstream service was having a bad day.

While waiting for Codex to finish an assignment, I started building my own version.

CodeStats combines data from GitHub, WakaTime, Codex, OpenRouter and Anthropic API in one card. You can enable whichever sources you use. GitHub activity, coding hours and AI token usage each keep their own meaning and reporting period.

The language table puts GitHub code bytes and WakaTime coding hours side by side. Related languages are grouped together, so it’s easier to see both the code in your repositories and where you actually spend your time. GitHub public and private statistics are supported according to the permissions of your token. Each source has its own cache and refresh time, and a failed refresh keeps its previous successful snapshot available.

It’s built for Cloudflare Workers with persistent storage and one-click deployment. You can also run it directly on Node.js. The card builder lets you choose sources, appearance and layout, then copy a Markdown snippet into your README. The default card has a transparent background, and credentials stay in your service configuration.

Thanks to GitHub Readme Stats and GitHub Stats Extended for the inspiration. CodeStats has its own collection, rendering and caching engine, and fetches statistics directly from the providers.

The project is open source on GitHub. If you’d like your own card, deploy a copy and give it a try. 😄

Categories Computers and Internet

Tags GitHub, Open Source, CodeStats