DEV Community

Cover image for Visualizing Real-Time-Ish GitHub Activity on a Rotating ASCII Globe in the Terminal
Lee Reilly
Lee Reilly

Posted on

Visualizing Real-Time-Ish GitHub Activity on a Rotating ASCII Globe in the Terminal

GitHub Copilot CLI Challenge Submission

This is a submission for the GitHub Copilot CLI Challenge

What I Built

gh-firehose: A terminal-based, real-time-ish visualization of GitHub push activity rendered on a rotating ASCII globe. Similar to the fancy display in GitHub HQ, but maybe not quite as impressive LOL.

The app streams recent push events from the GitHub Events API and turns them into a "global pulse" view: while the Earth rotates, pushes show up as quick flashes over land*. It logs users encountered and topics encountered. It’s a lightweight, "leave it running in a terminal pane" kind of project.

* push locations made up... for now

How the world map is generated (the fun bit):

The globe is rendered from an equirectangular Earth landmask bitmap stored directly in code as ASCII. In main.go, earthBitmap is a 120×60 set of strings where # means land and . means ocean. Every frame:

  • renderGlobe(angle) iterates over each terminal cell in an 80×40 viewport.
  • It treats that viewport as a sphere by:
    • measuring each cell’s distance from the center (with a character aspect ratio compensation of ~2.1),
    • skipping cells outside the circle (transparent background),
    • projecting cells inside the circle onto a unit sphere (solving for nz = sqrt(1 - nx² - ny²)). It converts the sphere point into latitude/longitude:
    • lat = asin(-ny)
    • lon = atan2(nx, nz) + angle
  • It samples the earthBitmap via isLand(lon, lat) and draws:
    • # for land
    • . for ocean (chosen to give the sphere texture instead of a blank void)

This makes the globe feel “3D” while still being pure text, and rotation is just changing angle over time.

Picard telling Data to shut up

Do I understand one bit of that math? Nope. But AI told me, so it must be true! Right?

Demo

GIF of GH Firehose in action

Repo: https://github.com/leereilly/gh-firehose

Install: If you have GitHub CLI installed, just run the following:

gh extension install leereilly/gh-dungeons
gh firehose
Enter fullscreen mode Exit fullscreen mode

My Experience with GitHub Copilot CLI

I treated GitHub Copilot CLI like an intern a fast, tireless pairing partner - describing the behavior I wanted at a high level and letting it scaffold, iterate, and refine the implementation in tight loops. It was especially great for experimenting with ideas I normally would’ve avoided, like spherical projection math 🤓

A few highlights:

  • Projection + rotation scaffolding: Copilot CLI generated and iterated on the core globe math (sphere projection, lat/lon conversion, rotation logic), which I then tuned for terminal character aspect ratios and visual polish.

  • Refactoring without losing momentum: Once the prototype worked, Copilot CLI helped restructure messy code into clean functions like renderGlobe() and isLand() while keeping everything behaving correctly.

  • Small-but-constant productivity boosts: From Go string builders to loops, clamping, coordinate transforms, and API plumbing, Copilot CLI handled the repetitive bits so I could focus on the fun visual side.

Do I fully understand all the projection math? Absolutely not LOL. But Copilot CLI got me to something that works — and looks cool — far faster than I would’ve on my own.

Take it for a spin (pun intended) yourself at https://github.com/leereilly/gh-firehose 🌍

Top comments (0)