A terminal-based ASCII sky viewer that shows the Sun or Moon position based on your local time. Inspired by weathr.
- Real-time celestial arc — Sun/moon follows a smooth sine arc across the terminal
- Day/night cycle — Blue sky during day, dark sky with twinkling stars at night
- ASCII art — Sun with rays, moon, clouds, trees, houses on the horizon
- Colored rendering — Yellow sun, white moon, green ground, full RGB colors
- HUD bar — Live clock, day/night status, altitude %, arc progress
- Lightweight — No GPU needed; pure terminal rendering with
crossterm
# Ensure Rust is installed (https://rustup.rs)
rustup default stable
# Build and run
cd sky_viewer
cargo run| Key | Action |
|---|---|
q / Q |
Quit |
Esc |
Quit |
Ctrl+C |
Quit |
src/
├── main.rs — Terminal setup, event loop
├── time.rs — Local time from system clock
├── sky.rs — Day/night detection + progress
├── position.rs — Time → screen coordinates (sine arc)
└── render.rs — ASCII terminal rendering (crossterm)
- Reads your system clock via
chrono - Determines day (6 AM–6 PM) or night
- Maps current time to a position on a sine arc across the terminal
- Renders the scene: sky background, stars/clouds, sun/moon, horizon, ground, HUD
- Refreshes ~5 times per second with twinkling star animation
- Smooth sky color gradients (dawn/dusk transitions)
- Real sunrise/sunset via
sunrisecrate + lat/long - Animated clouds drifting across the sky
- CLI flags:
--simulate day,--simulate night,--time 14:30 - Weather integration (rain, snow ASCII animations)