Skip to content

Show your developer activity

Takuhon can summarize your developer activity — GitHub languages and contributions, WakaTime coding time, and a derived rank — as a dashboard on your profile and as an embeddable activity badge (SVG). It is opt-in: you turn it on in settings.activity, provide secrets out of band, and run a sync step that fetches a snapshot.

{
"settings": {
"activity": {
"enabled": true,
"github": { "username": "octocat" },
"wakatime": { "username": "octocat" },
"showRank": true
}
}
}
  • enabled is the master switch (default false); nothing renders until it is true.
  • github.username and wakatime.username choose whose stats to summarize. You can include just GitHub, just WakaTime, or both.
  • github.showLanguages / github.showContributions / wakatime.showCodingTime (all default true) and showRank let you trim what is shown.
  • refreshHintHours (1–168) is an advisory cadence; the real cadence is how often you run the sync step below.

Secrets are read from the environment — never from takuhon.json or flags:

VariableNeeded for
TAKUHON_GITHUB_TOKENOptional. Raises the GitHub rate limit and unlocks the contribution calendar (token-only). Languages work without it.
TAKUHON_WAKATIME_KEYRequired to read WakaTime coding time.

The synced metrics are stored outside takuhon.json, so the canonical profile stays free of volatile data.

Locally, run the sync command — it writes an activity.json beside your profile:

Terminal window
TAKUHON_WAKATIME_KEY= TAKUHON_GITHUB_TOKEN= takuhon activity sync ./takuhon.json

A sync that gathers no data keeps the last-known snapshot — a good activity.json is never overwritten with an empty one. Inspect what was stored with takuhon activity show.

On Cloudflare, a cron trigger runs the same sync on a schedule (set the secrets as Workers secrets) and stores the snapshot in KV alongside the profile.

Once a snapshot exists, Takuhon can render the activity card as an SVG badge in light and dark variants:

  • CLI: takuhon build writes dist/activity.svg and dist/activity-dark.svg whenever settings.activity.enabled is true and an activity.json sits beside the profile.
  • Cloudflare: GET /activity.svg?theme=light|dark serves the badge directly (public, cached). It returns 404 until activity is enabled and a snapshot exists.

Embed it in a GitHub profile README like any image:

![My activity](https://your-domain/activity.svg?theme=dark)

Run takuhon activity show to confirm a snapshot was stored, then check that the activity card appears on your profile page. On Cloudflare, request GET /activity.svg (the badge) or GET /api/activity (the snapshot as JSON).

WhereSyncBadge
CLItakuhon activity synctakuhon build → SVG files
Cloudflare✅ cron trigger → KVGET /activity.svg
Static export❌ no scheduled sync

For every settings.activity field and its constraints, see the schema reference.