{"slug": "horizon-a-local-ai-sky-planner-that-tells-you-when-to-step-outside", "title": "Horizon: a local AI sky planner that tells you when to step outside", "summary": "A developer built Horizon, an MIT-licensed open-source Python agent that combines Open-Meteo weather forecasts with Skyfield astronomy data to recommend the best one-to-three-hour window for going outside each day. The pipeline scores hourly blocks on comfort and sky visibility, then uses Gemma (via Ollama, OpenRouter, or AI Studio) to narrate a short alert, with optional SerpApi news, ElevenLabs voice, and MongoDB Atlas or SQLite storage stages. The project was submitted to the Hacktoberfest 2026 Open-Source AI Challenge, Week 1: Touch Grass.", "body_md": "This is a submission for the [Hacktoberfest Open-Source AI Challenge, Week 1: Touch Grass](https://dev.to/challenges/hacktoberfest-week1-2026-10-05).\n\n`#hf26challenge` `#devchallenge` `#opensource` `#ai`\n\n**Repository:** [github.com/bhushanvidhate-27/horizon](https://github.com/bhushanvidhate-27/horizon)\n\n**Live demo:** [horizon-bhushanvidhate-27.onrender.com](https://horizon-bhushanvidhate-27.onrender.com)\n\n**Horizon** is a daily outdoor planner that answers one simple question:\n\nWhen is the best time for me to go outside today, and what can I see in the sky?\n\nEnter a location and Horizon combines weather forecasts with astronomy data to recommend the best one-to-three-hour window for being outdoors. It considers temperature, rain probability, wind, cloud cover, UV, sunrise and sunset, Moon phase, visible planets, constellations, and upcoming sky events.\n\nThe result is intentionally short: a useful recommendation, a few things to look for, and a reason to put the phone away.\n\n**For example (real run for Hyderabad):**\n\n```\nYour best outside window is 04:00–07:00\n\nWeather: Clear sky, 26°C (feels 27°C), 0% chance of rain, wind 5 km/h, 0% cloud\nSun: up 06:08 / down 17:58\nMoon: New Moon (0% lit) — dark skies, ideal for stargazing\nLook up for: Aquila, Lyra, Cygnus, Sagittarius, Pegasus\n```\n\nHorizon chose that pre-dawn window because clear weather plus a New Moon creates the darkest, starriest conditions of the day. The scoring deliberately balances human comfort with what the sky actually has worth looking at.\n\nHorizon is for people who want a reason to get outside without another screen-heavy app.\n\nThe screen is only the starting point. The real goal is to close the tab and look up.\n\n**A daily outside alert & sky event planner.** Horizon tells you the best time\nto step outside today, what interesting things are happening in the sky, and\nthen nudges you to put the phone away and actually go look.\n\nIt's built with the **\"Touch Grass\"** spirit: a short interaction that leads to\na real-world experience. Ask once, then leave your phone in your pocket.\n\nSubmission for **Hacktoberfest 2026 — Open-Source AI Challenge, Week 1: Touch Grass**\nBrand-new project, built within the challenge window (Oct 5–11, 2026). Any commits\nafter the Oct 11, 2026 11:59 PM PDT deadline will be noted here as required.\n\nHorizon is an **MIT-licensed**, self-contained Python project. Its **core works with zero paid APIs**:\n\nOptional partner integrations are auto-detected and never required:\n\n```\nhorizon/\n├── agent.py      # pipeline: location → sky → weather → news → narration → voice → storage\n├── sky.py        # Skyfield astronomy\n├── weather.py    # Open-Meteo window scoring\n├── llm.py        # Gemma via Ollama / OpenRouter / AI Studio\n├── narrator.py   # deterministic fallback\n├── news.py       # SerpApi headlines\n├── voice.py      # ElevenLabs TTS\n├── storage.py    # MongoDB Atlas + SQLite fallback\n├── main.py       # FastAPI + REST API\n└── cli.py        # same pipeline from the terminal\n```\n\n**Run it yourself:**\n\n```\ngit clone https://github.com/bhushanvidhate-27/horizon && cd horizon\nuv venv && uv pip install -e \".[dev]\"\nuv run uvicorn horizon.main:app   # → http://localhost:8000\n```\n\nA small agent pipeline, one stage per concern:\n\n```\nlocation → sky → weather → news → narration → (voice) → storage\n```\n\n| Stage | What it does | Technology | \n|---|---|---|\n| Location | City → lat/long (cached) | Open-Meteo geocoding | \n| Sky | Sunrise/set, Moon, planets, constellations, meteors | **Skyfield** | \n| Calendar | New/full moons, meteor peaks, equinoxes, oppositions | **Skyfield** | \n| Weather | Scores every 1–3 h block for comfort + clear skies | **Open-Meteo** | \n| News | Rare sky-event headlines | **SerpApi** (optional) | \n| Narration | Turns facts into a warm human alert | **Gemma** (Ollama default) | \n| Voice | Spoken version of the alert | **ElevenLabs** (optional) | \n| Storage | Preferences + alert history | **MongoDB Atlas** / SQLite | \n| Tracing | One transaction per alert, span per stage | **Sentry** (optional) | \n\nGraceful degradation is intentional: missing keys never break the experience. The useful recommendation still appears using only open data and open weights.\n\n**Open data makes a real product possible for free.**\n\nWeather and astronomy are public knowledge. Open-Meteo and Skyfield let a weekend builder compute a genuinely useful recommendation without a billing account.\n\n**Open weights keep the intelligence inspectable.**\n\nNarration is the part most likely to hide bias or leak data, so it runs locally through Ollama by default. No prompt leaves the device unless you choose a hosted path. The model can be swapped with a one-line change.\n\n**Open source makes small tools durable.**\n\nHorizon is MIT-licensed and modular. If a provider changes, only one stage needs updating. The project stays understandable and improvable by anyone.\n\nThe most important output isn’t a model response — it’s *you, outside*.\n\n[Add your honest outdoor note here. Example:\n\n“I ran Horizon for Hyderabad on a clear New Moon morning. It recommended 04:00–07:00. I stepped outside just before 5 a.m. and could clearly see Lyra and Cygnus rising — exactly the dark-sky window it had chosen. That short interaction was the whole point.”]\n\nThis is the part I care about most: the screen interaction should be brief and the real-world experience longer.\n\n**Best Use of Gemma**\n\nHorizon uses Gemma to turn structured weather + sky data into warm, natural daily alerts. It runs locally through Ollama (open weights, no key) and also supports hosted paths. A deterministic template narrator keeps the app working when no model is reachable. (`horizon/llm.py`, `horizon/narrator.py`)\n\n**Best Use of Render**\n\nThe live Horizon demo is deployed on Render:\n\n[https://horizon-bhushanvidhate-27.onrender.com](https://horizon-bhushanvidhate-27.onrender.com)\n\n**Best Use of ElevenLabs**\n\nHorizon can turn each daily alert into a short spoken narration so you can listen while getting ready to go outside. Audio is cached by content hash. (`horizon/voice.py`)\n\n**Best Use of MongoDB Atlas**\n\nWhen configured with `MONGODB_URI`, Horizon stores location preferences and alert history in MongoDB Atlas, with SQLite available as a local fallback. (`horizon/storage.py`)\n\n**Best Use of SerpApi**\n\nHorizon can include recent astronomy and rare-sky-event headlines through SerpApi, adding fresh context to a daily recommendation. (`horizon/news.py`)\n\n**Best Use of Sentry**\n\nHorizon traces its pipeline stages in Sentry, including location lookup, sky calculations, weather scoring, narration, voice generation, and storage. (`horizon/agent.py`)\n\n**Best Use of DigitalOcean**\n\nThe repo ships a Dockerfile and a DigitalOcean App Platform spec (`.do/app.yaml`) with a `/api/health` health check.\n\n**Open-source + open-weight core**\n\nNo paid API is required for the core experience (Open-Meteo + Skyfield + Gemma).\n\n`pytest --cov`) — every network partner is monkey-patched so the suite runs in about a second offline.`ruff` + full test suite + packaging smoke test.\nBuilt with open data, open weights, and the sincere hope that you close this tab and go outside. 🌿\n\n", "url": "https://wpnews.pro/news/horizon-a-local-ai-sky-planner-that-tells-you-when-to-step-outside", "canonical_source": "https://dev.to/bhushan_vidhate/horizon-a-local-ai-sky-planner-that-tells-you-when-to-step-outside-1k70", "published_at": "2026-10-10 15:46:05+00:00", "updated_at": "2026-10-10 15:48:35.752342+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "large-language-models"], "entities": ["Horizon", "Skyfield", "Open-Meteo", "Gemma", "Ollama", "OpenRouter", "ElevenLabs", "Hacktoberfest"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/horizon-a-local-ai-sky-planner-that-tells-you-when-to-step-outside", "markdown": "https://wpnews.pro/news/horizon-a-local-ai-sky-planner-that-tells-you-when-to-step-outside.md", "text": "https://wpnews.pro/news/horizon-a-local-ai-sky-planner-that-tells-you-when-to-step-outside.txt", "jsonld": "https://wpnews.pro/news/horizon-a-local-ai-sky-planner-that-tells-you-when-to-step-outside.jsonld"}}