dahan8473/snake-and-commits — explained in plain English
Analysis updated 2026-05-18
Add an animated Snake game version of your GitHub contribution graph to your profile README.
Automatically regenerate the animated graph on a schedule using a GitHub Actions workflow.
Choose or auto switch between light and dark color themes for the generated graph.
| dahan8473/snake-and-commits | 920linjerry-stack/capital-studio | adya84/ha-world-cup-2026 | |
|---|---|---|---|
| Stars | 16 | 16 | 16 |
| Language | Python | Python | Python |
| Setup difficulty | — | easy | easy |
| Complexity | — | 3/5 | 2/5 |
| Audience | developer | researcher | general |
Figures from each repo's GitHub metadata at analysis time.
Snake and Commits turns a GitHub profile's contribution graph, the grid of green squares showing how often someone commits code, into an actual playable looking game of Snake. Instead of a plain static image, the snake moves across the grid hunting down each filled in square as if it were food, growing longer with every one it eats, and the whole thing renders as an animated image that GitHub can display directly on a profile page. The snake's movement is not random. It uses a real pathfinding method to find the nearest unvisited commit square, avoids running into its own body, and if it gets boxed in with no reachable square left, it chases its own tail until space opens up again. The head glows brightly and the body fades toward the tail, and a small counter tracks how many commit squares have been eaten so far. Everything is drawn as pure animated SVG using CSS only, with no JavaScript, so it displays properly anywhere GitHub renders an image, and it also respects a user's reduced motion accessibility setting by falling back to a plain static graph. Setting it up does not require installing anything locally. A user adds a small GitHub Actions workflow file to their profile repository, the special repository named after their own username that GitHub shows at the top of a profile page. That workflow runs on a schedule, regenerates the snake image from the user's live contribution data, and publishes it, after which the user adds one line of markdown to their profile README pointing at the generated image. Four color themes are available, including a green GitHub style look and a matrix inspired dark theme, and separate light and dark versions can be shown automatically based on the viewer's system settings. The whole tool is a single Python file with no external dependencies beyond the standard library, and it can also be run locally with a GitHub token to generate the image by hand. It is released under the MIT license.
Snake and Commits turns a GitHub profile's contribution graph into an animated Snake game that eats each commit square, rendered as a zero dependency SVG via a scheduled GitHub Action.
Mainly Python. The stack also includes Python, GitHub Actions, SVG.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.