Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

snk

> 开发工具
Open source

⬜ Generates a snake game from a github user contributions graph and output a screen capture as animated svg or gif

6.0K stars0 likes0 views
WebsiteGitHub

About

⬜ Generates a snake game from a github user contributions graph and output a screen capture as animated svg or gif

snk

Generates a snake game from a github user contributions graph

Pull a github user's contribution graph. Make it a snake Game, generate a snake path where the cells get eaten in an orderly fashion.

Generate a gif or svg image. Colors can be customized.

Available as github action. It can automatically generate a new image each day. Which makes for great github profile readme

Usage

github action

…

example with cron job

svg

If you are only interested in generating a svg (not a gif), consider using this faster action: uses: Platane/snk/svg-only@v3

dark mode

For dark mode support on github, use this special syntax in your readme.

xml
<picture>
  <source media="(prefers-color-scheme: dark)" srcset="github-snake-dark.svg" />
  <source media="(prefers-color-scheme: light)" srcset="github-snake.svg" />
  
</picture>

interactive demo

platane.github.io/snk

npm package

typescript
import { generateSnakeAnimation } from "generate-snake-animation";

const outputs = [
  {
    format: "svg",
    drawOptions: {
      // ..
    },
  },
];

const results = await generateSnakeAnimation(
  {
    platform: "github", // supports github, gitlab and forgejo (codeberg)
    username: "platane",
    githubToken: process.env.GITHUB_TOKEN,
  },
  outputs,
);

fs.writeFileSync("snake.svg", results[0]);

or with npx

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

Implementation

solver algorithm

Contribution Policy

This project does not accept pull request.

Reporting or fixing issues is appreciated, but change in the API or implementation should be discussed in issue first and is likely not going be greenlighted.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptgifgithub-actionsgithub-contribution-graphgithub-contributions

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具