deniz.in

Markets

Weather

Loading weather

· via Hacker News – Front Page (native)

Astroterm is an open-source terminal planetarium with real-time ASCII star maps

Astroterm, a C program featured on Hacker News, turns the terminal into a live planetarium, plotting stars, planets, constellations and moon phases in ASCII for any date and location.

Astroterm is an open-source terminal planetarium with real-time ASCII star maps

A planetarium in plain text

Astroterm is an open-source application, written in C, that turns a terminal window into a working planetarium. According to the project's GitHub repository, which recently surfaced on Hacker News's front page, it plots the live positions of stars, planets and constellations as ASCII characters, and can just as easily render the sky for any other date, time and location, past or future.

Rather than approximating the heavens, the project presents itself as an accurate simulator constrained only by what character-cell graphics can convey. Alongside the starfield it can show the current phase of the moon, draw constellation stick figures, overlay an azimuthal grid and add colour.

Controls and capabilities

Command-line flags cover the essentials. Observers set latitude and longitude directly, or pass a city name that is looked up against a bundled list. An observation datetime is supplied in UTC; when omitted, the system clock is used. A magnitude threshold, 5.0 by default, decides which stars get drawn, and a stricter second threshold, 0.25, controls which of them receive text labels. Because magnitudes run backwards, with lower values meaning brighter objects, raising the threshold fills the sky with fainter stars.

Animation is configurable too: a frame-rate flag defaults to 24 fps and a speed multiplier, 1.0 by default, can compress hours of sky motion into seconds. Rendering options include Unicode glyphs and braille characters for constellation lines, plus an aspect-ratio override for terminals whose cell shape would otherwise squash the projection. The program can also generate Bash tab completions for itself.

The README illustrates the tool with two recipes. Cranking the speed to 10,000× at 64 fps over an equatorial city such as Singapore produces a "spinning globe" effect; the document notes that views from near the poles look quite different, because stars there circle the celestial pole instead of arcing from horizon to horizon. A second example reconstructs the heavens over the Kennedy Space Center at 8:00 UTC on 16 July 1969, the morning Apollo 11 launched — output the author says was cross-checked against the established planetarium package Stellarium.

Wide packaging for a niche tool

Installation options are unusually broad. Per the repository, astroterm ships in Arch Linux's extra repository and in Fedora's package repositories from version 40 onward, and it is available through Homebrew, Nix and Guix. Prebuilt executables cover Linux x86_64, macOS on both Intel and Apple Silicon, and Windows x86_64; Linux arm64 builds are said to be pending the availability of Ubuntu arm64 build runners, and building from source is documented as well.

Two quirks earn their own troubleshooting entries. Apparently curl does not follow the redirect to the latest GitHub release, so wget or the releases page is the recommended download route. And garbled Unicode output on Linux is treated as a locale problem, fixable by configuring a UTF-8 locale such as en_US.UTF-8.

Why it matters

Astroterm sits at the intersection of two traditions: the long culture of ASCII art and the surprisingly deep astronomy software available on Unix-like systems. What lifts it beyond novelty is that the simulation is genuinely time- and location-aware, computed by a small C program whose only display requirement is a text terminal — meaning it runs wherever a shell runs, including headless machines and SSH sessions. Its uptake in major distribution repositories suggests it is maintained to community standards rather than left as a curiosity. For stargazers, educators and developers who simply enjoy a well-crafted command-line toy, it offers a genuinely new way to look up from the prompt.

  • #open-source
  • #terminal
  • #astronomy
  • #cli
  • #ascii

Related posts