This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass
What I Built
Night Sky Companion tells you what's overhead, with no internet connection at all.
Enter your location and press one button. The app works out which constellations are above your horizon, narrates their mythology using a local open-weight LLM, and gives you a single "look here" direction. Then it switches to a red-light palette to protect your night vision, and an optional pocket mode tells you to put the screen away and look up.
The whole on-screen experience takes under 15 seconds. The rest is you and the sky.
I built it for hikers, campers, and anyone who has stared at a dark sky and wondered what they were looking at, without needing a signal or a server farm to find out.
Demo
GitHub: https://github.com/vaibhav7549/Night-Sky-Companion
Here's what one scan returns:
text
🌙 NIGHT SKY COMPANION
─────────────────────────────────────
📍 Location: 28.61°N, 77.21°E
🌕 Moon: Waxing Crescent (17% illuminated)
✨ Most Prominent Constellations:
Andromeda (And) — 82° up, toward North
"Andromeda was a princess chained to a rock as a sacrifice
to a sea monster. Perseus rescued her and married her..."
Pegasus (Peg) — 74° up, toward South
"Pegasus is the winged horse that sprang from the blood
of Medusa when Perseus beheaded her..."
Cassiopeia (Cas) — 62° up, toward North
"Cassiopeia was a vain queen in Greek mythology..."
🔴 RED-LIGHT MODE ACTIVE: night vision preserved
📴 POCKET MODE: Put your phone down. The sky is still there.
Run it yourself:
bash
git clone https://github.com/vaibhav7549/Night-Sky-Companion.git
cd Night-Sky-Companion
python -m venv .venv
source .venv/bin/activate # macOS / Linux
source .venv/Scripts/activate # Windows (Git Bash)
pip install -r requirements.txt
ollama pull gemma2:2b
python -m streamlit run app.py
Then open http://localhost:8501.
How I Built It
Three open-source pieces do the heavy lifting:
Skyfield computes precise positions of stars and planets for any place and time. After a one-time download of the DE421 ephemeris (~17 MB) and the Hipparcos catalog (~53 MB), it needs no network. It also includes a constellation boundary map for fast lookups.
The Hipparcos star catalog has over 118,000 stars. I keep only those brighter than magnitude 3.0 (easily visible to the naked eye) and group them by constellation.
Ollama + Gemma 2B runs locally and turns my pre-written mythology notes into short, conversational narration and "look here" directions.
The pipeline:
Skyfield works out which bright stars are above the horizon for your latitude, longitude, and time.
The constellation map assigns each star to its constellation.
Gemma 2B writes a 2–3 sentence narration for each one, using the mythology notes as context.
The UI applies the red-light palette and, if you like, enters pocket mode.
The interface is Streamlit with a dark glassmorphism theme, an animated star field, altitude gauges, and compass chips. It all runs on CPU, with no GPU needed. No API keys, no network calls, and no data leaves your machine.
Why Open Innovation Matters
This project only works because the AI is open. Its whole purpose is to work where cloud APIs can't: a dark-sky site with no signal.
Offline: Skyfield's data is stored locally and Gemma runs through Ollama, so the app works on a mountain, in a desert, or at sea.
Private: Your GPS coordinates and observing times never leave your device. A cloud version would quietly build a map of every place you've ever stargazed.
Free: No subscription, no rate limits, no key to manage.
Modifiable: You can swap the model (Gemma, Llama, Mistral, Phi), add constellations, change the narration style, or translate the mythology. A closed API gives you none of that.
The tool works where you are, not where the vendor's servers are.
Prize Categories
Grand Prize: Touch Grass track
Best Use of Gemma: Gemma 2B runs locally via Ollama for all constellation narration.
Top comments (0)