Skip to content

About

๐Ÿฆ€ Animated pixel widgets for your GitHub profile: a pet that lives on your commits and a city built from them

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Latest commit

ย 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ProfileForge

Forge your GitHub profile with animated SVG widgets.

A pixel pet that lives on your commits, and a pixel city built from them.

A happy pixel crab jumping next to its RPG stats A pixel city skyline where every building is one week of contributions

Quick start

The easy way: open the configurator. Pick a species, theme and season, watch the live preview, and copy the two snippets it writes for you.

Or set it up by hand. Your profile README lives in a repo named after you: <username>/<username>. Pick one of two ways to set it up:

Option A: GitHub Action (recommended, no token needed)

The Action renders your widgets inside your own repo using the built-in GITHUB_TOKEN, so there's no server, no rate limits and nothing to deploy.

1. Add .github/workflows/profileforge.yml to your profile repo:

name: ProfileForge

on:
  schedule:
    - cron: "0 */6 * * *" # every 6 hours
  workflow_dispatch:

permissions:
  contents: write

jobs:
  pet:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: LobsterEnigma/ProfileForge@v1
        with:
          outputs: |
            profileforge/pet.svg
            profileforge/city.svg?widget=city

2. Run it once: Actions tab โ†’ ProfileForge โ†’ Run workflow.

3. Add them to README.md:

![My ProfileForge pet](./profileforge/pet.svg)
![My ProfileForge city](./profileforge/city.svg)

Customizing works the same everywhere: add options after a ?, separated by &. In the Action, each line of outputs is one card:

          outputs: |
            profileforge/pet.svg?name=Biscuit&species=gopher&theme=dark
            profileforge/city.svg?widget=city&season=winter&hide_border=true

With the API, the same options go into the URL: โ€ฆ/api/pet?user=you&name=Biscuit&theme=dark.

Keep your profile's history clean. By default every update is a commit on your main branch. Add branch: profileforge and the cards (and the care log) go to a profileforge branch instead, replaced by a single commit each run, so your main branch never gets a bot commit. Give it a branch of its own: tools like the contribution snake replace their output branch wholesale on every run.

      - uses: LobsterEnigma/ProfileForge@v1
        with:
          branch: profileforge
          outputs: |
            profileforge/pet.svg
            profileforge/city.svg?widget=city

Then point your README at that branch (and delete the old SVGs from main if you had some):

![My ProfileForge pet](https://raw.githubusercontent.com/<you>/<you>/profileforge/profileforge/pet.svg)
![My ProfileForge city](https://raw.githubusercontent.com/<you>/<you>/profileforge/profileforge/city.svg)
Action inputs
Input Default Description
outputs profileforge/pet.svg One SVG per line, as path?params with the same params as the API.
github_user_name repo owner Whose widgets to render.
github_token ${{ github.token }} The built-in token can read public contributions.
commit true Commit and push the SVGs (only when they changed).
commit_message chore: feed the ProfileForge pet
branch Publish to this branch instead (e.g. profileforge), replaced by one commit each run, so main stays clean. Use a branch of its own; it can't be the branch the workflow runs on.
care false true gives your pet a house where visitors feed, bathe and play with it. See Let visitors care for it.
care_issue The house issue's number, if you opened it yourself. Otherwise the first run opens one.
care_actions feed,bath,play What visitors may do in the house.
dirt true false keeps your pet clean even if nobody bathes it. Always off without bath.
care_file profileforge/care.json Where the care log lives.

Step outputs: mood, level, stage (of the pet).

Option B: Deploy your own API to Vercel

Deploy with Vercel

The button forks this repo into your account and asks for a GITHUB_TOKEN. Create one here; the default public read-only access is enough. Then add one line to your README:

![My ProfileForge pet](https://<your-app>.vercel.app/api/pet?user=<your-login>)
![My ProfileForge city](https://<your-app>.vercel.app/api/city?user=<your-login>)

Handy if you want to embed widgets anywhere or serve several users. See Self-hosting for details.

๐Ÿฆ€ Pixel pet

It speaks your language

Your top language picks the species (pin one with species=):


๐Ÿฆ€ crab ยท Rust & everyone else

๐Ÿน gopher ยท Go

๐Ÿ snake ยท Python

๐Ÿ˜ elephant ยท PHP

๐Ÿฅ chick ยท JavaScript

๐Ÿข turtle ยท TypeScript

๐Ÿฆซ capybara ยท Java, Scala

๐Ÿฆฆ otter ยท Kotlin

๐Ÿฆ” hedgehog ยท C# (all spikes)

๐Ÿ™ octopus ยท C (a hand per pointer)

๐Ÿฆ‘ squid ยท C++ (eight arms, plus two)

๐ŸŒ snail ยท Shell (carries its own)

๐ŸฆŠ fox ยท Ruby

๐Ÿฆ swift ยท Swift

Each one lives somewhere that suits it (a beach with waves washing up the sand, a meadow with a burrow, a jungle, the savanna under Kilimanjaro, a farm with a red barn across the fields, a pond, a hot spring below Mount Fuji, a forest floor, a coral reef, a garden after rain, a pine wood, a tree with a birdhouse, the deep sea, a river), with a view to the horizon and a little neighbour of its own, and shares the city's world: the same season, and the same weather, so a hungry pet sits in the rain and a sleeping one in the fog.

It has moods

Your pet reacts to your recent contribution calendar:

Mood When
Happy 3+ day streak, or 15+ contributions this week
Idle Contributed in the last 3 days
Hungry 4โ€“13 days without contributions: it dreams of green squares
Sleeping 14+ quiet days: tucked in under a quilt with a nightcap, on a starry night

It evolves

XP = lifetime contributions + 2 ร— stars + 3 ร— followers, so levels never go down.

Stage Level
Egg 1โ€“2 (cracks as it gets close)
Baby 3โ€“14
Adult 15โ€“49
Legendary 50+ (gold, crown, sparkles)

It has a life of its own

  • It follows a routine that changes from day to day: walking, sniffing around, sitting, yawning, hopping, doing laps, and the odd nap.
  • It looks around, says the odd word (LGTM, WIP, 404โ€ฆ) and performs four tricks a day, taking turns, from 26: dancing, twirling, a backflip, a moonwalk, juggling, blowing a kiss, spinning until it's dizzy, hiccups, a magic trick, jump rope, a selfie, hunting down a bug, holding up a commit like treasure, bubblegum, singing, shipping code on a tiny laptop, a coffee break, rubber duck debugging (until a lightbulb goes on), watching a build compile, a party popper, nodding along in headphones, a slice of pizza in three bites, heart eyes, a sneeze, sticking its tongue out, or its species' signature move (crab bubbles, gopher digging, snake hissing, elephant spraying, chick pecking, turtle zoomies, a yuzu balanced on the capybara's head, a hedgehog roll, an octopus ink jet, a snail's slime trail, a fox's snow dive, a swift's loop-the-loop, a squid's jet, an otter floating on its back with a pebble). Tomorrow brings a different four.
  • It dresses for the weather: an umbrella in the rain, a knitted beanie in winter, and in autumn a leaf sometimes lands on its head before the wind takes it. Happy bounces kick up little puffs of dust.
  • After 30 days without contributions it runs away, leaving a note and a trail of footprints. Your next commit brings it home. Not your thing? Add runaway=false.

Every day could be special

Like a little frog that sends postcards from its travels, your pet has days worth checking in for. At most one surprise per day, picked from the date and your contributions:


๐ŸŽ„ Christmas

๐Ÿงง Lunar New Year

๐ŸŽƒ Halloween

๐Ÿฅฎ Mid-Autumn

โœ‰๏ธ A weekend trip

๐ŸŽ‚ Your GitHub birthday
  • Holidays, each with its own outfit and decorations: New Year ๐ŸŽ†, Lunar New Year ๐Ÿงง (with the year's zodiac), Valentine's Day ๐Ÿ’, ฯ€ Day ๐Ÿฅง (March 14), April Fools' ๐Ÿ™ƒ (your pet shows up as another species, in a fake-nose disguise), Programmer's Day ๐Ÿ’ป (the 256th day of the year), Mid-Autumn ๐Ÿฅฎ, Halloween ๐ŸŽƒ and Christmas ๐ŸŽ„.
  • Milestones: your account's GitHub birthday, a fresh level-up (and hatching, growing up, turning legendary), and a welcome back rainbow when you return after a week or more away.
  • Weekend trips: like a travelling frog, on a quiet weekend day your pet may be off somewhere, pinning up a postcard with itself in the photo. It has 58 destinations: 45 around the world (Beijing, Kyoto, Paris, Venice, Iceland, Giza, the Serengeti, New York, Machu Picchu, Sydney, Antarctica and more) and 13 only programmers have heard of (Localhost, The Cloud, Null Island, Stack Overflow, /dev/null, Rubber Duck Pondโ€ฆ). Each has its own stamp; now and then a friend jumps into the photo, it's a night shot, or the stamp is a rare golden one. The next day it's back home with a souvenir from the trip: hawthorn candy, a lucky cat, a croissant, a matryoshka, a llama plush, a penguin plushโ€ฆ
  • Rare days: a UFO beams it up (and brings it back), a pet from another language drops by to say hi, a butterfly lands on its nose in spring, or it wears shades in summer.

Everything is decided by the date and your data, so it needs no setup, and a card rendered twice on the same day is identical. Preview any of them with surprise= (e.g. /api/pet?user=demo&surprise=christmas) or in the configurator.

As much pet as you want

Every part of the pet-keeping is optional, so it works whether you want a pretty card or a real little companion:

You wantโ€ฆ Set
Just a card to show off nothing: no house, no dirt, no chores. Add runaway=false if you'll be away for a while.
Visitors can say hi, no upkeep care: true and dirt: false: feeding and playing, but it never gets dirty
Only some visits care_actions: feed,play (any of feed, bath, play)
The full pet care: true: visitors feed, bathe and play, and it gets smelly if nobody bathes it

Let visitors care for it

Turn on care and your pet gets a house: one issue in your profile repo where anyone can comment feed, bath or play. Your pet reacts with โค๏ธ, shows the visit on its card ("Fed by โ€ฆ"), and gets a food bowl, a ball or soap bubbles. Skip baths for too long and it gets smudged, then smelly, then flies start circling. ๐Ÿชฐ

Everything happens in that single issue, so your repo stays tidy: no new issues, no bot replies, just visitors' comments and reactions.

1. Add a comment trigger and permission to your workflow, and turn care on:

name: ProfileForge

on:
  schedule:
    - cron: "0 */6 * * *"
  workflow_dispatch:
  issue_comment:
    types: [created]

permissions:
  contents: write
  issues: write

# One run at a time, so visits never race each other.
concurrency:
  group: profileforge
  cancel-in-progress: false

jobs:
  forge:
    # Only comments in the pet's house (never on pull requests) start a run.
    if: github.event_name != 'issue_comment' || (!github.event.issue.pull_request && startsWith(github.event.issue.title, 'ProfileForge:'))
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: LobsterEnigma/ProfileForge@v1
        with:
          care: true
          outputs: |
            profileforge/pet.svg

Want less upkeep? Add dirt: false, or pick what visitors may do with care_actions: feed,play. The house only lists what's turned on, and other commands are treated as chat.

2. Run it once. It opens the house, an issue titled "ProfileForge: your pet's house ๐Ÿ ", and prints its link. Pin it if you like. Prefer to open the house yourself? Title it starting with ProfileForge: and pass its number as care_issue.

3. Link to the house under your pet:

[๐Ÿ  Visit my pet's house: ๐Ÿ– feed ยท ๐Ÿ› bath ยท ๐ŸŽพ play](https://github.com/you/you/issues/1)
How care stays safe
  • Comments are never trusted. Only a comment's first word is read, and only to match feed, bath or play (and a few synonyms) exactly. It's never echoed, rendered, logged or passed to a shell. Any other comment is simply chat and is left alone.
  • The pet answers with reactions, never with text: โค๏ธ done, ๐Ÿ‘€ already done today, ๐Ÿ˜• too busy.
  • Each comment is read exactly once. A cursor remembers the last comment read, so editing an old comment does nothing, and reactions come only after the new state is committed.
  • Limits: each visitor can do each action once a day, there are at most 60 visits a day in total, at most 30 per run, and bots are ignored.
  • The care log (care.json) is validated on every read. Unknown fields are dropped, sizes are capped, and a corrupted log simply starts over.
  • Tidy by design: issues opened from old-style links ("ProfileForge: feed") get a one-line pointer to the house and are closed. Your own issues are never touched.
  • Least privilege: the workflow only needs contents: write (to commit the SVGs) and issues: write (to react and open the house). Comments on pull requests never start a run, and the workflow always runs your default branch's code.

To turn it off, remove care: true and the issue_comment trigger.

It has RPG stats

  • Class: picked from your top language. Rust โ†’ Berserker, Haskell โ†’ Archmage, CSS โ†’ Bard, Shell โ†’ Necromancer, โ€ฆ (full list)
  • HP: how many of the last 14 days you contributed
  • EXP: progress to the next level
  • STR commits ยท INT PRs + reviews ยท CHA stars + followers ยท DEX issues (last year, log scale, 1โ€“99)

๐ŸŒƒ Pixel city

Your last year of contributions as a skyline on the water, mirrored in the bay. Every piece of it means something:

In the city From your data
๐Ÿข One building per week Height = that week's contributions, width = how many days you showed up
๐Ÿ’ก Lit windows How many days that week you contributed (at night they glow, and so does their reflection)
๐ŸŒณ A park A week with no contributions (trees, pines, flower beds)
๐Ÿ—ผ Neon sign on the tallest tower Your best week, lit up in your top language's color, with searchlights sweeping the night sky
๐Ÿ—๏ธ Crane on the far right This week, still under construction (if it's your best week yet, the crane is lifting the sign into place)
๐Ÿš— Traffic Your last 14 days; no commits means empty streets
๐Ÿ  Little houses Quiet weeks with 1โ€“3 contributions: the suburbs
๐Ÿพ Your pet on the sidewalk Strolling when happy, dozing when you've been away
๐ŸŒง๏ธ Rain, then fog 4+ days without contributions, then 14+ (same as the pet getting hungry, then sleepy)
๐ŸŽ† Fireworks A new best week, a 30+ day streak, or New Year
๐ŸŒ  Shooting star A 7+ day streak
๐ŸŒ™ The moon Today's real moon phase
๐Ÿ‚ The season Cherry blossoms in spring, fireflies in summer, falling leaves in autumn, snow in winter
๐ŸŽƒ Holidays Pumpkins and bats for Halloween, rooftop lights for Christmas, red lanterns for Lunar New Year

Six building styles (houses, classic, brick, glass, art-deco setbacks and spires) in five materials, hills, a hazy far-off city and a TV tower behind, a ferry and a sailboat on the bay (frozen in winter, with a polar bear, her cub and a seal on the ice), a hot-air balloon, a plane and birds heading home keep every skyline different, and all the randomness is seeded from your login, so no two cities look alike.

Light themes paint it at sunset, with the sun's path glittering on the water; dark themes at night, under the Milky Way and the moon. Seasons follow the date, flipped with hemisphere=south; pass season= to pin one yourself:


light

dark

sakura

gameboy

season=spring

season=winter

Options

Param Default Description
user required API only: whose widget to render. demo renders sample data. (The Action uses the repo owner.)
widget pet pet or city. Only needed in the Action; the API uses /api/pet and /api/city.
name the species' Your pet's name (max 16 chars). Defaults to Pinchy ๐Ÿฆ€, Gogo ๐Ÿน, Monty ๐Ÿ, Ellie ๐Ÿ˜, Chirpy ๐Ÿฅ, Shelly ๐Ÿข, Mocha ๐Ÿฆซ, Spike ๐Ÿฆ”, Inky ๐Ÿ™, Bash ๐ŸŒ, Ember ๐ŸฆŠ, Zippy ๐Ÿฆ, Plus ๐Ÿฆ‘ or Kody ๐Ÿฆฆ.
species from your language crab ยท gopher ยท snake ยท elephant ยท chick ยท turtle ยท capybara ยท hedgehog ยท octopus ยท snail ยท fox ยท swift ยท squid ยท otter
pet true City only: false keeps your pet off the streets.
runaway true false keeps your pet home after a month without contributions (it just sleeps).
theme auto auto ยท light ยท dark ยท dracula ยท gameboy ยท sakura
hide_border false true to drop the card border.
season from the date Pin spring ยท summer ยท autumn ยท winter instead of following the date.
hemisphere north south flips the automatic seasons (December is summer) and mirrors the city's moon.
mood, stage, trick, away, visit, dirt, surprise Previews only, with user=demo: force a mood, stage, trick, visit, dirt level (dirt=0โ€ฆ3) or surprise (christmas, postcard, ufoโ€ฆ). To stop your real pet getting dirty, use the Action's dirt: false input instead.

auto follows the viewer's light/dark setting: the pet's home gets stars and moonlit silhouettes, and the city switches from sunset to night. gameboy repaints the whole scene in the Game Boy's four greens.


light

dark

dracula

gameboy

sakura

FAQ

I pushed a change but my profile still shows the old card

GitHub caches README images for a few minutes. Wait a bit, then hard-refresh (Cmd/Ctrl + Shift + R). Opening the SVG file in your repo always shows the latest version.

The run fails with "Permission denied" or "403" when pushing

The workflow needs permissions: contents: write (and issues: write for care). If it's there and pushes still fail, your account or organization limits the built-in token: go to your profile repo's Settings โ†’ Actions โ†’ General โ†’ Workflow permissions and choose Read and write permissions.

My contribution count is lower than on my profile

The Action's built-in token only sees public activity. To include private contributions (as counts only, nothing about the repos), turn on Include private contributions on my profile in your GitHub profile settings. Only public repositories count towards languages and stars.

My pet changed species, or has an unexpected name

The species follows your top language, and each species has its own default name. Pin both, e.g. pet.svg?species=crab&name=Pinchy.

My pet disappeared

If there's a note on a stake, it ran away after 30 days without contributions. Your next commit brings it home, or add runaway=false so it never leaves.

If there's a postcard instead, it's just on a weekend trip: it only travels on weekend days you haven't contributed yet, and a commit brings it straight back on the next run.

Visitors commented in the house but nothing happened

Check that the workflow has the issue_comment trigger, issues: write, and care: true, and that the house issue's title starts with ProfileForge:. Only comments whose first word is an allowed command count. Each visitor can do each action once a day (they get ๐Ÿ‘€ after that), and the card updates a few minutes later (see the first question).

Self-hosting

Use the Deploy with Vercel button, or manually:

  1. Fork this repo and import it in Vercel (framework preset: Other, no build command).
  2. Add a GITHUB_TOKEN environment variable (create one, no extra permissions needed).
  3. Deploy. Your pet lives at https://<your-app>.vercel.app/api/pet?user=<login>, and ?user=demo works without a token.

Responses are cached for 4 hours, so your pet updates a few times a day.

Development

npm install
npm run dev        # http://localhost:3000: gallery of every widget, mood, stage and theme
npm test

GITHUB_TOKEN=... npm run dev also lets the gallery render real users. npm run site serves the configurator on http://localhost:3002; it bundles the same renderer for the browser, so its previews are the real thing. The Action is bundled into dist/action.js: after changing src/, run npm run build:action and commit dist/ (CI checks it). /zoom?x=4&user=demo&mood=idle (add &widget=city for the city) blows a card up for pixel-level inspection.

How it works

GitHub strips JavaScript from README images, so everything is plain SVG + CSS:

  • Sprites are ASCII grids (src/pet/species/crab.ts), compiled to one <path> per color with horizontal runs merged.
  • Frame animation swaps two layers with steps(1) opacity keyframes; movement uses nested <g>s so walking, jumping and breathing never fight over transform.
  • Floating hearts and Zzz use negative animation-delay, so the first frame already looks alive.
  • Randomness (window lights, rooftops, trees) is seeded from your login and the week's date, so the same data always renders byte-identical SVG and the Action never commits noise.
  • prefers-reduced-motion freezes everything.

Add a species ๐Ÿฆ€๐Ÿน๐Ÿ๐Ÿ˜๐Ÿฅ๐Ÿข๐Ÿฆซ๐Ÿฆฆ๐Ÿฆ”๐Ÿ™๐Ÿฆ‘๐ŸŒ๐ŸฆŠ๐Ÿฆ

Every pet is one file of ASCII art. Copy src/pet/species/crab.ts, redraw the grids (body, four eye styles, three mouths, two limb frames per mood), register it in index.ts, and check it at /zoom. Then map your language to it in BY_LANGUAGE, give it a home in pet/homes.ts (and a horizon in pet/backdrop.ts), a signature move in pet/life.ts and pet/behavior.ts, and a favourite food in pet/visits.ts. A Haskell sloth, a Lua moon rabbit, an R pirate parrot: all very welcome.

Roadmap

  • Species picked from your top language: fourteen so far, covering Rust, Go, Python, PHP, JavaScript, TypeScript, Java, Kotlin, C#, C, C++, Shell, Ruby and Swift
  • More species: Haskell, Lua, R, Dart, โ€ฆ
  • GitHub Action mode (generate the SVG in your own repo, no shared rate limits)
  • ๐ŸŒƒ Pixel city: your contribution graph as a skyline
  • Web configurator: build your card and copy the Markdown
  • Visitors can feed, bathe and play with your pet
  • Talk to your pet (AI, opt-in, with strict limits)

License

MIT

About

๐Ÿฆ€ Animated pixel widgets for your GitHub profile: a pet that lives on your commits and a city built from them

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages