返回排行榜

github/gh-skyline

Go

A GitHub CLI extension to generate a 3D model of your GitHub contribution history

3d3d-printinggithubgh-extensiongh-extensionscligogolangterminal
Star 增长趋势
Star
1.3k
Forks
96
周增长
Issues
13
8001k1.2k
2024年12月2025年6月2026年1月2026年7月
制品库Go Modulesgo get github.com/github/gh-skyline
README

GitHub Skyline (gh-skyline)

A GitHub CLI extension that generates 3D-printable STL files of your GitHub contribution graph.

Features

  • Generate a Binary STL file from GitHub contribution data for 3D printing
  • Customizable year selection (single year and multi-year)
  • Automatic authentication via GitHub CLI or specify a user
  • ASCII art loading preview of contribution data unique to each user and year
3D Print ASCII Art
Example GitHub Skyline Example of gh-skyline and ASCII art in the terminal

Usage

Prerequisites

The extension requires the gh CLI to be installed and in the PATH. The extension also requires the user to have authenticated via gh auth.

Installing

This project is a GitHub CLI extension. After installing the gh CLI, from a command-line run:

gh extension install github/gh-skyline

Extension Flags

You can run the gh skyline command with the following flags:

  • -d, --debug: Enable debug logging for more detailed output.
    • Example: gh skyline --debug
  • -h, --help: Show help for the command.
    • Example: gh skyline --help
  • -f, --full: Generate the contribution graph from the user's join year to the current year.
    • Example: gh skyline --full
  • -o, --output: Specify the output filename. If not provided, the default is {username}-{year}-github-skyline.stl.
    • Example: gh skyline --output my-skyline.stl
  • -u, --user: Specify the GitHub username. If not provided, the authenticated user is used.
    • Example: gh skyline --user mona
  • -y, --year: Specify the year or range of years for the skyline. Must be between 2008 and the current year.
    • Examples: gh skyline --year 2020, gh skyline --year 2014-2024
  • -w, --web: Open the GitHub profile for the authenticated or specified user.
    • Example: gh skyline --web, gh skyline --user mona --web
  • -a, --art-only: Show the ASCII art preview without generating an STL file.

Examples

Generate a skyline STL file that defaults to the current year for the authenticated user:

gh skyline

Generate a skyline for a specific year for the authenticated user:

gh skyline --year 2023

Generate a skyline for a specific user and year:

gh skyline --user mona --year 2023

Generate a skyline for a range of years for the authenticated user:

gh skyline --year 2014-2024

Generate a skyline from the user's join year to the current year:

gh skyline --full

Generate only the ASCII preview for a skyline:

gh skyline --art-only

Enable debug logging:

gh skyline --debug

By default, the CLI will create a {username}-{year}-github-skyline.stl file in your current directory. You can specify a different filename using the --output flag.

gh skyline --output my-skyline.stl

Open the GitHub profile for the authenticated user:

gh skyline --web

Open the GitHub profile for a specific user:

gh skyline --user mona --web

ASCII Art

The extension generates ASCII art in terminal while loading, a unique and fun way to visualise your contribution data while you wait! Each column represents one week. Days within each week are reordered vertically to create a "building" effect, with empty spaces (no contributions) at the top.

  • ' ' Empty/Sky: No contributions
  • '.' Future dates: What contributions could you make?
  • '░' Low level: Light contribution activity
  • '▒' Medium level: Moderate contribution activity
  • '▓' High level: Heavy contribution activity
  • '╻┃╽' Top level: Last block with contributions in the week (Low, Medium, High)

Visualizing your Skyline

Once you have generated your STL file, you can visualize it using 3D modeling or 3D printing software. But did you know that you can upload your STL file to a GitHub repository and view your Skyline there? For example, take a look at @chrisreddington's GitHub Skyline from 2011 - 2024.

Project Structure

├── ascii/
│   ├── block.go: ASCII block character definitions for contribution levels
│   ├── block_test.go: Block character unit tests
│   ├── generator.go: Contribution visualization ASCII art generation
│   ├── generator_test.go: ASCII generation tests
│   ├── text.go: ASCII text formatting utilities
│   └── text_test.go: Text formatting unit tests
├── errors/
│   ├── errors.go: Custom error types and domain-specific error handling
│   └── errors_test.go: Error handling unit tests
├── github/
│   ├── client.go: GitHub API client for fetching contribution data
│   └── client_test.go: API client unit tests
├── logger/
│   ├── logger.go: Thread-safe logging with severity levels
│   └── logger_test.go: Logger unit tests
├── stl/
│   ├── generator.go: STL 3D model generation from contribution data
│   ├── generator_test.go: Model generation unit tests
│   ├── stl.go: STL binary file format implementation
│   ├── stl_test.go: STL file generation tests
│   └── geometry/
│       ├── geometry.go: 3D geometry calculations and transformations
│       ├── geometry_test.go: Geometry unit tests
│       ├── shapes.go: Basic 3D primitive shape definitions
│       ├── text.go: 3D text geometry generation
│       └── text_test.go: Text geometry unit tests
├── types/
│   ├── types.go: Shared data structures and interfaces
│   └── types_test.go: Data structure unit tests
└── main.go: CLI application entry point

Contributing

To contribute to the project, please read the instructions and contributing guidelines in CONTRIBUTING.md.

License

This project is licensed under the terms of the MIT open source license. Please refer to MIT for the full terms.

Mona Sans is licensed under the SIL Open Font License v1.1. Find more details at github/mona-sans.

golang/freetype is used as a dependency. Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). All rights reserved.

Acknowledgements

相关仓库
mrdoob/three.js

JavaScript 3D Library.

JavaScriptnpmMIT Licensejavascript3d
threejs.org
113.9k36.4k
DavidHDev/react-bits

An open source collection of animated, interactive & fully customizable React components for building memorable websites.

JavaScriptnpmOtheranimationscomponents
reactbits.dev
43.9k2.1k
FreeCAD/FreeCAD

Official source code of FreeCAD, a free and opensource multiplatform 3D parametric modeler.

C++GNU Lesser General Public License v2.1freecadengineering
freecad.org
32.3k5.8k
pmndrs/react-three-fiber

🇨🇭 A React renderer for Three.js

TypeScriptnpmMIT Licensereactthreejs
docs.pmnd.rs/react-three-fiber
31.5k1.9k
BabylonJS/Babylon.js

Babylon.js is a powerful, beautiful, simple, and open game and rendering engine packed into a friendly JavaScript framework.

TypeScriptnpmApache License 2.0webglwebgl2
babylonjs.com
25.8k3.7k
libgdx/libgdx

Desktop/Android/HTML5/iOS Java game development framework

JavaMavenApache License 2.0libgdxjava
libgdx.com
25.2k6.5k
4ian/GDevelop

🎮 Open-source, cross-platform 2D/3D/multiplayer game engine designed for everyone.

JavaScriptnpmOthergamejavascript
gdevelop.io
25k1.5k
ssloy/tinyrenderer

A brief computer graphics / rendering course

C++Otheropenglc-plus-plus
haqr.eu/tinyrenderer/
23.9k2.3k
lettier/3d-game-shaders-for-beginners

🎮 A step-by-step guide to implementing SSAO, depth of field, lighting, normal mapping, and more for your 3D game.

C++shaders3d
lettier.github.io/3d-game-shaders-for-beginners/index.html
19.8k1.5k
blender/blender

Official mirror of Blender

C++Otherb3danimation
developer.blender.org/docs/handbook/contributing/using_git/
19.3k3.1k
aframevr/aframe

:a: Web framework for building virtual reality experiences.

JavaScriptnpmMIT Licensevrwebvr
aframe.io
17.6k4.4k
CesiumGS/cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:

JavaScriptnpmApache License 2.03dgeospatial
cesium.com/cesiumjs/
15.5k3.9k