explaingit

d10n/tui-globe

19RustAudience · developerComplexity · 3/5LicenseSetup · easy

TLDR

A Rust library that draws a spinning 3D globe inside your terminal using braille dot characters, built as a Ratatui widget with public-domain map data baked in at compile time.

Mindmap

mindmap
  root((tui-globe))
    Rendering
      Braille characters
      Animated spinning
      Terminal only
    Map Data
      Natural Earth source
      Baked into binary
      No runtime files
    Detail Levels
      Coarse overview
      Medium standard
      Fine dense mesh
    Borders
      Country borders
      State borders
      Optional toggle
    Setup
      cargo install
      Python regen script
      Ratatui widget
    Licensing
      GPL-3.0 code
      Public domain data
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add a rotating globe animation to a terminal dashboard or CLI tool built with Ratatui

USE CASE 2

Display geographic context in a terminal app without needing a graphical window

USE CASE 3

Prototype a visually striking terminal UI component to impress users or stakeholders

USE CASE 4

Embed a low-dependency world map widget in a Rust terminal application

Tech stack

RustRatatuiBraille renderingNatural EarthPythonCargo

Getting it running

Difficulty · easy Time to first run · 5min

Run `cargo install tui-globe` to try the demo instantly. Adding it to your own Ratatui project requires adding the crate as a dependency. Regenerating map data needs a separate Python script.

GPL-3.0: free to use and modify, but if you distribute your app you must also share its source code under the same license. Map data is public domain with no restrictions.

In plain English

tui-globe is a Rust library that renders a spinning 3D globe inside a terminal window. Terminals can only display text characters, so this library uses braille characters (the dot-pattern symbols used in accessible text) to draw fine-detail graphics that approximate a smooth image. The result is an animated globe you can embed in terminal-based applications. It is built as a widget for Ratatui, which is a Rust framework for creating visual interfaces that run entirely in the terminal without a graphical window. Developers add tui-globe as a component in their own terminal apps to display a rotating Earth. The globe's geographic data comes from Natural Earth, a public domain dataset of coastlines and country borders. That data is baked into the compiled binary at build time, so the finished program does not need to download or read external map files at runtime. You can choose between three levels of detail (coarse for a minimal overview, medium for a standard view, or fine for a dense mesh) and can optionally include or exclude country and state/province border lines. Installing the demo is one command: cargo install tui-globe, which uses Rust's standard package manager. Regenerating the geometry data, if you want to use different source maps or adjust detail levels, requires a separate Python script with a few dependencies. The code is licensed under GPL-3.0. The bundled map data is public domain from Natural Earth.

Copy-paste prompts

Prompt 1
I want to add the tui-globe widget to my Ratatui app in Rust. Show me the minimal code to render a spinning globe at medium detail with country borders enabled.
Prompt 2
Using tui-globe in Rust, how do I switch between coarse, medium, and fine detail levels at runtime based on a user keypress in my Ratatui app?
Prompt 3
I installed tui-globe with cargo install tui-globe and ran the demo. Now show me how to embed it as one panel inside a split-layout Ratatui terminal UI alongside other widgets.
Prompt 4
Explain the GPL-3.0 license impact if I ship a commercial CLI tool that includes tui-globe as a dependency. What exactly do I have to release?
Prompt 5
Walk me through running the Python script to regenerate tui-globe's geometry data from a custom Natural Earth source file at a different detail level.
Open on GitHub → Explain another repo

← d10n on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.