explaingit

baek-seunghyun/ai-coding-usage-card

Analysis updated 2026-05-18

23JavaScriptAudience · developerComplexity · 2/5LicenseSetup · moderate

TLDR

A self-hosted script that turns your local AI coding tool usage logs into an SVG profile card showing tokens burned and API-equivalent cost.

Mindmap

mindmap
  root((repo))
    What it does
      Reads local ccusage logs
      Generates SVG usage card
      Commits card to profile repo
    Tech stack
      JavaScript
      Node.js
      GitHub CLI
    Use cases
      Show AI coding usage on GitHub profile
      Track cost across multiple tools
      Track usage across multiple computers
    Audience
      Developers using AI coding tools
      GitHub profile customizers
    Card variants
      Full card
      Half card
      Grass heatmap card
    Setup
      Node 18 plus
      GitHub CLI login
      Daily cron or scheduler

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Show a live SVG card on your GitHub profile with your total AI coding token usage and cost.

USE CASE 2

Compare how much you have spent across Claude Code, Codex, Gemini CLI, and Copilot CLI.

USE CASE 3

Track daily AI tool usage across multiple computers without double counting.

USE CASE 4

Display a contribution-graph style heatmap of your daily AI coding cost.

What is it built with?

JavaScriptNode.jsGitHub CLI

How does it compare?

baek-seunghyun/ai-coding-usage-cardavbiswas/llm_visualizerccpt5/comfyui-berninistudio
Stars232323
LanguageJavaScriptJavaScriptJavaScript
Setup difficultymoderatemoderatemoderate
Complexity2/53/53/5
Audiencedeveloperdevelopervibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires Node 18+, GitHub CLI login, and existing local logs from a supported AI coding tool.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

AI Coding Usage Card is a self hosted GitHub profile card that shows off how many tokens, and roughly how much money, you have burned using AI coding tools like Claude Code, Codex, Gemini CLI, Copilot CLI, and OpenCode. It relies on ccusage, a tool that reads your local usage logs, and turns that data into an SVG image you commit into your own GitHub profile repository. There are no external accounts, no API keys, and no third party services involved. Everything is generated on your own machine from logs already sitting there. The script produces four card variants you can mix and match: a full card showing totals, cost in your chosen currencies, a breakdown of token types, activity stats, and per tool costs, a smaller half card with just totals and cost, a GitHub style contribution heatmap called the grass card showing 26 weeks of daily cost, and a combo card that merges the half and grass cards side by side. Costs are labeled as API equivalent, since subscription plans like Claude Max do not actually bill per token, so the number shown is what the same usage would have cost if paid for through the API instead. Setup requires Node 18 or newer and the GitHub CLI logged in with repository access. After forking the project and cloning it, you assign each computer a permanent unique device name, run a test command to generate the cards, then embed the resulting SVG files in your profile README. A daily scheduled task, using Task Scheduler on Windows or cron on macOS and Linux, reruns the script automatically so the card stays current. If you use more than one computer, each one gets its own device name and its own snapshot is merged into the combined card, so reruns do not double count usage. The author warns against copying AI tool log folders between computers, since usage cannot be reliably deduplicated that way. Colors, currencies, and layout are all adjustable by editing a short SVG template in the script. The README also documents a couple of gotchas: unescaped characters in dynamic text can break the SVG, and GitHub's image caching can make a freshly changed card appear stale for a few minutes. The project is released under the MIT license.

Copy-paste prompts

Prompt 1
Help me set up ai-coding-usage-card to track my Claude Code and Codex token usage.
Prompt 2
Write a cron job that runs usage-card.mjs daily and commits the updated SVG.
Prompt 3
Explain how this project avoids double counting usage when I run it on two computers.
Prompt 4
Show me how to customize the accent color and currencies in the generated usage card.

Frequently asked questions

What is ai-coding-usage-card?

A self-hosted script that turns your local AI coding tool usage logs into an SVG profile card showing tokens burned and API-equivalent cost.

What language is ai-coding-usage-card written in?

Mainly JavaScript. The stack also includes JavaScript, Node.js, GitHub CLI.

What license does ai-coding-usage-card use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is ai-coding-usage-card to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is ai-coding-usage-card for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.