Open-source project
ethomson/github4life avatar
ethomson/github4life

github4life: Your Contribution Graph as an Endless Four-Color Game of Life

Using your GitHub Contribution Graph as a four-color Game of Life.

101 stars19 forksJavaScriptMIT

At a glance

What is it?
A Node.js app that turns GitHub's contribution graph into an animated, never-ending Game of Life GIF, with a special mode for GitHub's image proxy.
Who is it for?
Adopt github4life if you want a quirky, visual toy that reuses your contribution data in a creative way, and you are comfortable running a small Node.js service or deploying to Heroku. Do not adopt it if you need a reliable, production-grade visualization tool, because it depends on screen-scraping GitHub's DOM and on browsers tolerating an infinite GIF.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Probably not. The repository last received commits 35 months ago, on December 4, 2023.
What is it written in?
Mainly JavaScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 4, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • ethomson/github4life101 ★ · +1
Star history
Repository2026-08-182026-10-04
ethomson/github4life100101

1 Stars in the last 47 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

A Contribution Graph That Refuses to Die

GitHub's contribution graph is a familiar grid of green squares, each representing how much you worked on a given day. github4life takes that grid and feeds it into a four-color variant of Conway's Game of Life. The result is an animated GIF that plays generation after generation, forever, until you close the tab or your browser runs out of RAM. The intended audience is developers who want a playful, visual payoff from their commit history. It is not a productivity tool or a data analysis dashboard. It is a toy, and it is honest about that. The README even jokes that the game will be sent to you until you close the window. That framing sets the right expectation: this is a novelty, not a serious utility.

The Decay Rule That Keeps the Board Interesting

Standard Conway's Game of Life has two states: alive or dead. A four-color variant, as referenced from the ConwayLife wiki, maps the four intensity levels of the contribution graph to four cell states. But the author noticed a problem. If you start with a heavily loaded contribution graph, the original rules cause rampant overpopulation, and the next generation becomes an empty board. To avoid that mass die-off, github4life modifies the rules. Instead of a cell dying immediately, it decays: a cell at intensity 4 becomes a cell at intensity 3. This produces a more visually interesting game when the starting board is dense. The decay rule is the core design decision. It changes the behavior from a binary life-or-death simulation to a gradual fade, which suits the gradient nature of contribution data. Without it, the project would be a dull flash of green followed by nothing.

How the Endless GIF Actually Works

The app relies on a quirk of the animated GIF format. A GIF does not need to declare its number of frames up front. You can keep sending frames, and most browsers will keep rendering them. github4life sets the frame delay to zero and renders a new frame every second, streaming them indefinitely. This is not a video format; it is a GIF that never ends. The README notes that this works until you close the window, the app crashes, or the browser runs out of RAM. That is a real constraint. Long-running sessions will accumulate frames in memory, and the browser will eventually choke. The app does not loop a finite video; it generates frames on the fly, so the server must stay alive and the network connection must stay open. This is a clever hack, but it is also a fragile one.

Camo Mode for GitHub's Image Proxy

GitHub does not link external images directly. It uses a service called camo, which downloads the image, caches it, and serves it from githubusercontent.com. You cannot cache an endless GIF. So github4life has a special camo mode. In this mode, the app renders a finite GIF with a fixed number of frames and delivers it as fast as possible, because camo enforces a 4-second timeout. The app caches these finite GIFs to avoid regenerating them on every request. This is a practical workaround, but it changes the experience: instead of an infinite animation, you get a short clip that stops. If you embed the GIF in a README on github.com, you will see the finite version, not the endless one. The README explicitly warns about this. Anyone who wants the true endless effect must visit the app's own URL, not a GitHub-hosted page.

Getting It Running: Dependencies and Setup

The README does not include installation instructions, but it identifies the runtime and the key libraries. It is a Node.js application. It uses two new libraries from the same author: contributions and dat-life. The contributions library parses the GitHub Contribution Graph by screen-scraping the DOM. The README admits this is 'a little better than hitting it over the head with regular expressions, but not much.' dat-life plays the Game of Life, including two- and four-color variants and the decay mode. The gifencoder package generates the GIF frames. To run it, you would clone the repository, install dependencies with npm, and start the Node process. There is no configuration file or command line flag mentioned. The homepage points to a Heroku deployment, so deployment to Heroku is likely the intended path. But the README gives no concrete steps, so you must infer the setup from the package.json, which is not shown in the material.

Limitations: Screen Scraping, Memory, and the Camo Timeout

The most obvious weakness is the screen-scraping approach. The contributions library parses GitHub's HTML DOM, which can change without notice. If GitHub alters its markup, the parser breaks. The README itself downplays the robustness of this method. Another limitation is memory. The endless GIF accumulates frames in the browser, and the README explicitly says the game runs until the browser runs out of RAM. On a long session, that could be minutes or hours, but it will eventually fail. The camo mode mitigates the infinite GIF problem for GitHub-hosted images, but it introduces a 4-second timeout, which limits the number of frames you can deliver. Finally, the project appears unmaintained: no recent releases were retrieved, and the last push date is unknown. This means the screen-scraping parser may already be stale, and there is no active support. If you rely on this for a live demo, you must be prepared to fix it yourself.

Alternatives: Write Your Own or Use a Finite GIF

The obvious alternative is to write a small script that generates a finite GIF from your contribution data, using a standard Game of Life implementation. That avoids the infinite GIF hack and the camo problem entirely. You could use a library like gifencoder directly, render a fixed number of generations, and save the result as a normal file. This is a more robust approach because it does not depend on a streaming connection or browser behavior. Another alternative is to use a static visualization of your contribution graph, such as the built-in GitHub profile view, which is always up to date and requires no custom code. The difference is that a static view has no animation, while a finite GIF gives you the animation without the endless stream. The trade-off is that you lose the novelty of an infinite game, but you gain portability and reliability. The author chose the endless route for fun, not for practicality.

Maintenance and License

The project is licensed under the MIT license, which permits reuse and modification with attribution. The README states the copyright belongs to Edward Thomson. There is no indication of active maintenance: no recent releases, and the last push date is unknown. The dependencies, particularly the contributions library, are tied to GitHub's current HTML structure. If GitHub changes its page, the app will break silently. You would need to update the parsing logic yourself. The gifencoder package is a mature library, but the two custom libraries are likely small and may not receive updates. The cost of maintenance is low if you just want to run it for yourself, but it becomes higher if you want to deploy it publicly, because you must monitor GitHub's DOM changes and the Heroku instance's uptime. Given the MIT license, you can fork and patch it, but you should expect to do that work.

Editorial conclusion

Adopt github4life if you want a quirky, visual toy that reuses your contribution data in a creative way, and you are comfortable running a small Node.js service or deploying to Heroku. Do not adopt it if you need a reliable, production-grade visualization tool, because it depends on screen-scraping GitHub's DOM and on browsers tolerating an infinite GIF. Before using it, verify that the contributions library still parses GitHub's current HTML, and test the camo mode if you plan to embed the GIF in a README, since GitHub's image proxy imposes a 4-second timeout. The project is MIT-licensed and has not been updated recently, so treat it as a fun experiment, not a maintained dependency.

Frequently asked questions

How does github4life read my contribution graph?

It does not use an API. One of the two libraries it depends on takes the GitHub contribution graph by screen-scraping GitHub's own output and parsing the document, which the README describes as a little better than regular expressions but not much. Nothing in the application requests structured data.

Why does the simulation need a modified rule to work with a contribution graph?

Because the stock four-colour rule overpopulates on a busy board. A profile with many filled cells is mostly live, so the next generation suffers a mass die-off and comes out nearly empty. The fix is that a cell decays instead of dying, so intensity 4 becomes intensity 3, which keeps a heavily loaded graph evolving instead of collapsing.

What is camo mode in github4life?

It is the mode that works inside a GitHub README. GitHub downloads images, caches them on its own service and links to that, and that service has a timeout, so an endless GIF cannot be used. Camo mode renders a finite GIF with a fixed number of frames and delivers them as fast as possible, and the application caches those.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/ethomson-github4life.svg)](https://hysenlabs.com/projects/ethomson-github4life)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/ethomson-github4life.svg)](https://hysenlabs.com/projects/ethomson-github4life)