skyline turns your GitHub contribution graph into an ASCII city. Every week of the year becomes a building, and every day you committed becomes a lit window. It comes with 12 color themes.
It does two things:
- Prints the city in your terminal
- Writes an animated SVG you can put on your GitHub profile README, where some windows flicker and the bright stars twinkle
- Buildings: each building is one week. Its height follows that week's total contributions on a log scale, so one huge week doesn't flatten everything else into the street.
- Windows: the windows cycle through that week's seven days, bottom to top. A day with no contributions leaves its window dark (
·). A day with contributions lights it up (▪). - Colors: window colors follow GitHub's four intensity levels, getting brighter as the day gets busier. Each theme has its own set of four.
- Antenna: your record week gets a little antenna on the roof.
- Labels: month names sit under the street.
Stars and flickering windows come from a fixed hash, so the city looks the same every time you run it with the same data.
- Go 1.25 or newer
- A GitHub token. skyline checks
GITHUB_TOKEN, thenGH_TOKEN, then falls back togh auth token. If you already use the GitHub CLI, you don't need to do anything.
go install github.com/pinkpixel-dev/skyline@latestOr run it from a clone:
git clone https://github.com/pinkpixel-dev/skyline.git
cd skyline
go run . your-usernameskyline your-usernameYour terminal needs truecolor support to show the real palette. Lip Gloss downsamples the colors on terminals that don't have it.
The full city is 106 columns wide. If your terminal is narrower, cut it down with -weeks:
skyline -weeks 30 your-usernameTo write an SVG instead of printing:
skyline -svg skyline.svg your-usernamePick a palette with -theme:
skyline -theme synthwave your-usernameThere are 12 of them: neon (the default), synthwave, matrix, amber, ice, sunset, toxic, vapor, crimson, mono, prism and rainbow. prism is a neon rainbow on a dark background, and rainbow is a classic rainbow on black. Run skyline -themes to see a color swatch for each one right in your terminal.
| Flag | Default | What it does |
|---|---|---|
-theme |
neon |
Color theme to use |
-themes |
List the built-in themes with a color swatch, then exit | |
-height |
14 |
Height of the tallest building, in rows |
-weeks |
53 |
How many recent weeks to draw |
-svg |
Write an animated SVG to this path instead of printing to the terminal |
Your profile README is in a repo named after your username (github.com/you/you). A small workflow can redraw the skyline every night and publish it to a separate output branch, so your main branch doesn't fill up with daily image commits.
-
Copy
examples/profile-workflow.ymlinto your profile repo as.github/workflows/skyline.yml. -
If you want a theme other than
neon, change-theme neonin the workflow's run line. -
Commit it, then open the Actions tab and run skyline once by hand so the
outputbranch exists. -
Add the image to your profile
README.md:
After that, it updates on its own every night.
The workflow uses the built-in Actions token by default. I'm not totally sure how much of your private activity that token can see, so if your city looks emptier than your real graph, try this:
- Create a classic personal access token with the
read:userscope. - Add it to your profile repo as a secret named
SKYLINE_TOKEN.
The workflow picks that secret up automatically when it exists.
The SVG draws the city with real text characters. GitHub shows profile images as plain <img> tags, so the city renders in whatever monospace font the viewer's system has. The glyphs I used (▪ · ▁ ╻ ━ ✦) are in most common monospace fonts, but a really minimal font could fall back for one or two of them.
The animations turn off for anyone who has reduced motion enabled.
go test ./...
go vet ./...The code is split into three pieces:
internal/githubfetches the contribution calendar from the GraphQL APIinternal/citylays out the scene as a grid of cells (buildings, windows, stars, street, labels)internal/renderdraws that grid as ANSI text or SVG, using one shared palette
Apache 2.0. See LICENSE.
Made with 💖 by Pink Pixel