Repolode
Platane

Platane/snk

Generates an animated snake game from a GitHub user's contribution graph, exported as an SVG or GIF for profile READMEs.

Stars
6,176
Forks
2,314
Open issues
2
Last commit
19 days ago

What is it?

snk takes a GitHub user's contribution graph and turns it into a snake game. It computes a path that eats the contribution cells in an orderly way, then renders the result as an animated SVG or GIF.

The output can be refreshed automatically through a GitHub Action, for example on a daily cron schedule, which makes it a common addition to a GitHub profile README. Colors are configurable through palette presets or custom snake and dot colors, and separate light and dark variants can be generated for theme-aware embedding.

Besides the GitHub Action, the project provides an svg-only action for faster SVG generation and an npm package, generate-snake-animation, that also supports GitLab and Forgejo (Codeberg) accounts.

Key features

  • 01Builds a snake path that eats the cells of a user's contribution graph in order.
  • 02Exports animated SVG or GIF files.
  • 03Runs as a GitHub Action that can regenerate the image on a schedule.
  • 04Supports color presets and custom snake and dot colors.
  • 05Offers an npm package that also works with GitLab and Forgejo accounts.

Use cases

  • Adding an animated contribution graph to a GitHub profile README.
  • Generating light and dark versions of a snake animation for theme-aware READMEs.
  • Creating a snake animation from a Codeberg or GitLab contribution graph with the npm package.

Quick start

  1. 1

    Add the GitHub action to a workflow file using the uses line from the README

  2. 2

    Or try the npm package with npx

    npx generate-snake-animation@3 --forgejo_user codeberg.org/JasterV --output snake.svg?palette=codeberg

Things to know

  • The project does not accept pull requests, so changes should be discussed in an issue first.
  • The repository does not specify a license, so usage rights are unclear.

Topics

#github-profile#github-actions#svg#animation#contribution-graph#typescript#gif#github-contribution-graph#github-contributions#github-profile-readme

FAQ

What is snk?
Generates an animated snake game from a GitHub user's contribution graph, exported as an SVG or GIF for profile READMEs. snk takes a GitHub user's contribution graph and turns it into a snake game. It computes a path that eats the contribution cells in an orderly way, then renders the result as an animated SVG or GIF.
Is snk free to use? What license does it have?
snk has no declared license. Its code is public, but without a license you have no explicit permission to reuse it; ask the author before relying on it.
Is snk still maintained?
Actively maintained. The last commit to snk was on Oct 18, 2026.
What can I use snk for?
Adding an animated contribution graph to a GitHub profile README. Generating light and dark versions of a snake animation for theme-aware READMEs. Creating a snake animation from a Codeberg or GitLab contribution graph with the npm package.
How do I install snk?
Add the GitHub action to a workflow file using the uses line from the README Or try the npm package with npx: npx generate-snake-animation@3 --forgejo_user codeberg.org/JasterV --output snake.svg?palette=codeberg
Where can I get snk?
The source code and installation instructions are on GitHub: https://github.com/Platane/snk

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects