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.
1. Enable it in takuhon.json
Section titled “1. Enable it in takuhon.json”{ "settings": { "activity": { "enabled": true, "github": { "username": "octocat" }, "wakatime": { "username": "octocat" }, "showRank": true } }}enabledis the master switch (defaultfalse); nothing renders until it istrue.github.usernameandwakatime.usernamechoose whose stats to summarize. You can include just GitHub, just WakaTime, or both.github.showLanguages/github.showContributions/wakatime.showCodingTime(all defaulttrue) andshowRanklet you trim what is shown.refreshHintHours(1–168) is an advisory cadence; the real cadence is how often you run the sync step below.
2. Provide secrets out of band
Section titled “2. Provide secrets out of band”Secrets are read from the environment — never from takuhon.json or flags:
| Variable | Needed for |
|---|---|
TAKUHON_GITHUB_TOKEN | Optional. Raises the GitHub rate limit and unlocks the contribution calendar (token-only). Languages work without it. |
TAKUHON_WAKATIME_KEY | Required to read WakaTime coding time. |
3. Sync a snapshot
Section titled “3. Sync a snapshot”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:
TAKUHON_WAKATIME_KEY=… TAKUHON_GITHUB_TOKEN=… takuhon activity sync ./takuhon.jsonA 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.
4. Embed the badge
Section titled “4. Embed the badge”Once a snapshot exists, Takuhon can render the activity card as an SVG badge in light and dark variants:
- CLI:
takuhon buildwritesdist/activity.svganddist/activity-dark.svgwheneversettings.activity.enabledistrueand anactivity.jsonsits beside the profile. - Cloudflare:
GET /activity.svg?theme=light|darkserves the badge directly (public, cached). It returns404until activity is enabled and a snapshot exists.
Embed it in a GitHub profile README like any image:
Verify
Section titled “Verify”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).
Availability
Section titled “Availability”| Where | Sync | Badge |
|---|---|---|
| CLI | ✅ takuhon activity sync | ✅ takuhon build → SVG files |
| Cloudflare | ✅ cron trigger → KV | ✅ GET /activity.svg |
| Static export | ❌ no scheduled sync | — |
For every settings.activity field and its constraints, see the schema
reference.