A Tamagotchi-style digital pet that lives or dies based on your GitHub commit activity. Feed it commits. Keep it alive. Don't let it die.
Live demo: https://commitchi.pages.dev/?u=Cludes
Try it: open commitchi.pages.dev and type any GitHub username.
Put your pet in your README - no fork, no setup, just change the username:
For a profile README that adapts to GitHub's light/dark theme:
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://commitchi.pages.dev/api/card?u=YOUR_USERNAME&theme=dark">
<img alt="My Commitchi" src="https://commitchi.pages.dev/api/card?u=YOUR_USERNAME">
</picture>Options: &theme=dark, &species=mooncat. That's it - the card stays live (30-min cache).
- Pixel-art pet on a Game Boy-style LCD inside a Tamagotchi device frame
- Mood, hunger, health, level, XP, and streak derived from your public commit activity
- Evolutions: egg, then a smaller baby, adult, a veteran with shades, and an elder with a crown + aura, as your level climbs
- Achievements: earn badges for streaks, commit counts, polyglot, and max level
- 12-week contribution heatmap (weekday-aligned) and a recent-commits feed
- Seven species mapped from your top language, with a per-user species override
- Light / dark theme (follows your OS by default), editable pet name, level-up toast
- Idle animations: gentle float/sway, egg wobble, feed hearts, ecstatic sparkles
- Compare mode: two pets side by side, crown to the happier one
- Download your pet card as a PNG, or share a direct link
- Dormant state for inactive accounts, rate-limit countdown, manual refresh, recent searches
- Accessible: reduced-motion support, focus rings, aria labels
- Auto-generated light + dark SVG cards for embedding in your GitHub profile README
Your pet's survival is tied to your commit history:
| Situation | Pet state |
|---|---|
| Committed today + long streak | Ecstatic |
| Committed in the last 2 days | Happy |
| 3 days since last commit | Content |
| 4-6 days | Hungry |
| 7-10 days | Sad |
| 11-20 days | Critical |
| 21+ days without a commit | Dead |
Your pet's species is determined by your most-used language:
| Language | Pet |
|---|---|
| JavaScript / TypeScript | Hamster |
| Python | Snake |
| Lua | Moon Cat |
| Rust | Crab |
| Go | Gopher |
| Ruby | Gem |
| Everything else | Blob |
Your pet's level, XP bar, and evolution stage grow with your total commit activity. A 12-week contribution heatmap and recent commit feed show on the device screen.
No setup needed. Visit:
https://commitchi.pages.dev/?u=YOUR_GITHUB_USERNAME
Tap SHARE YOUR PET to copy a direct link, or DOWNLOAD PNG to save the card.
The fastest way to embed your pet anywhere - no fork, no setup. A hosted instance is live, so anyone can embed their own card with one line (just change the username):
Query params: u (required), theme=dark, species=mooncat. Cards are edge-cached for
30 minutes. The same card builder powers the app, the profile SVG, and this endpoint.
- Go to dash.cloudflare.com - Workers & Pages - Create - Pages - Connect to Git, and pick this repo.
- Build settings:
- Framework preset: Vite
- Build command:
npm run build - Build output directory:
dist
- (Optional) Settings - Environment variables: add
GITHUB_TOKEN(a GitHub PAT, no scopes needed) to raise the API rate limit from 60/hr to 5000/hr. - Deploy. The function in
functions/api/card.jsis auto-routed to/api/card, so your card is athttps://<project>.pages.dev/api/card?u=USERNAME.
Also works on Vercel via
api/card.mjs- import the repo at vercel.com (it auto-detects Vite + theapi/function); the URL is thenhttps://<project>.vercel.app/api/card?u=USERNAME.
Create a repo named exactly your username (e.g. Cludes/Cludes) and add this to its
README.md. The <picture> element shows a dark-themed card in GitHub dark mode:
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://commitchi.pages.dev/api/card?u=YOUR_USERNAME&theme=dark">
<img alt="My Commitchi" src="https://commitchi.pages.dev/api/card?u=YOUR_USERNAME">
</picture>That's it - the card stays live (30-min cache), no fork or workflow needed.
Alternative: a committed SVG via GitHub Actions (no third-party host)
If you'd rather not depend on a hosted endpoint, fork this repo and let the included
Update Pet SVG Action run (daily at 06:00 UTC, or trigger it manually). It commits
commitchi.svg / commitchi-dark.svg, which you embed from
raw.githubusercontent.com/YOUR_USERNAME/commitchi/master/commitchi.svg.
You can have the Action insert that image line into your profile README for you, so you never touch it manually. Because the Action's built-in token can only write to this repo, you give it write access to your profile repo via a GitHub App:
- Create a GitHub App (owned by your account). Give it Repository permissions - Contents: Read and write. No webhook needed.
- Generate a private key for the app (downloads a
.pemfile), and note the numeric App ID. - Install the app on your account, granting it access to your
<username>/<username>profile repo. - In this repo: Settings - Secrets and variables - Actions, and add two secrets:
CLUDESAPP_ID- the App IDCLUDESAPP_PEM- the full contents of the.pemprivate key file
- Create your
<username>/<username>repo if you haven't.
On the next run, the profile job mints a short-lived installation token from the
app, clones your profile repo, and inserts the embed between
<!-- COMMITCHI:START --> / <!-- COMMITCHI:END --> markers. It is idempotent -
it only commits when the block is missing or changed. Without the CLUDESAPP_ID
secret, the job is skipped.
To regenerate the pet SVG locally:
COMMITCHI_USER=YOUR_USERNAME node scripts/generate-pet-svg.mjsFork this repo and deploy your own copy in two steps:
1. Fork this repo
Click the Fork button at the top right of this page.
2. Enable GitHub Pages
In your forked repo: Settings - Pages - Source - select GitHub Actions - Save.
That's it. Every push to main or master will auto-deploy. Your instance will be live at:
https://YOUR_USERNAME.github.io/commitchi/
The base path is detected automatically from the repo name - no config needed.
git clone https://github.com/Cludes/commitchi.git
cd commitchi
npm install
npm run devThen open http://localhost:5173 and enter any GitHub username.
| Command | What it does |
|---|---|
npm run dev |
Start the Vite dev server |
npm run build |
Production build to dist/ |
npm run lint |
ESLint over the project |
npm run test |
Run the Vitest unit tests once |
npm run test:watch |
Run Vitest in watch mode |
Unit tests cover the pure logic in src/utils/petCalculations.js (species, level, XP,
mood, streak, daily commits, evolution stage). CI (.github/workflows/ci.yml) runs lint,
tests, and build on every push and pull request.
You can pin a species regardless of language with ?species=mooncat (or the "swap" button
on the card); the choice is remembered per username. You can also preview any evolution
stage with ?stage=elder / ?level=7 or the on-card PREVIEW chips (preview is visual only -
it does not change your real card).
- Leaderboard / hall of fame - a public board of the liveliest pets (longest streaks, highest levels, rarest species). This needs a small backend with a datastore (e.g. Vercel KV / Upstash) and write-side abuse protection, so it is planned as a follow-up rather than part of the static app.
- Uses the public GitHub API - no authentication or API keys required
- The API allows 60 requests per hour per IP address unauthenticated
- Results are cached in your browser for 5 minutes to ease rate limits
- Only public commit activity is visible
- Activity data covers the last ~90 days of public events