morning

command module
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2026 License: AGPL-3.0 Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

morning

A one-screen daily briefing for your terminal. Weather, world news, and tech headlines — before the coffee cools.

morning in a terminal

CI Release Go Platforms API keys PRs

Install

go install github.com/epicshawty/morning@latest

Or take a single static binary from Releases — Linux, macOS, Windows, BSD, Solaris, AIX on amd64, arm64, arm, 386, riscv64, ppc64le, s390x and loong64. No runtime, no API keys, no signup.

Usage

morning

That is the whole thing. Location is detected from your IP unless you say otherwise.

The clock, the greeting and the temperature unit all follow the city you ask about: -city Los Angeles reports in PDT and °F, -city Tokyo in JST and °C. Your own clock is noted in brackets when the two differ.

Flag Default Meaning
-city <name> auto City to report on, e.g. -city Osaka
-units c|f|auto auto Temperature units; auto follows the city
-sections <list> all Any of weather,local,world,tech,fact
-limit <n> 5 Headlines per section (1–20)
-json off Machine-readable output
-plain off Force plain text
-color <mode> auto auto, always, never
-links <mode> auto Clickable headlines via OSC 8; auto enables them on a terminal
-width <n> terminal Wrap width
-no-cache off Bypass the 10-minute cache
-config <path> see below Config file
-version — Print version
Clicking

Every headline is a real terminal hyperlink (OSC 8), so Ctrl/Cmd-click or the terminal's own open-link action jumps straight to the article. Long headlines stay clickable on all their wrapped lines. It needs no configuration, works without colour, and is switched off automatically when output is not a terminal — nothing escapes into a pipe, a file, or CI logs. -links always|never overrides it.

In a pipe

Styling is dropped automatically when stdout is not a terminal, so this stays clean:

morning | grep -A3 TECH
morning -json | jq -r '.weather.temp_c'
morning -sections weather,tech >> ~/log/today.txt

Respects NO_COLOR.

Config

Optional. Written to ~/.config/morning/config.json on Linux and macOS, %AppData%\morning\config.json on Windows.

{
  "city": "Osaka",
  "units": "auto",
  "limit": 5,
  "sections": ["weather", "world", "tech", "fact"]
}

Flags override the file; the file overrides defaults. "units": "auto" (the default) follows the city; set "c" or "f" to pin it.

Data sources

Every source is keyless and public.

Section Source
Weather Open-Meteo (forecast, geocoding, sunrise/sunset)
Local news Google News RSS search, Bing News RSS as fallback
World BBC, NPR, Guardian, Al Jazeera RSS
Tech Hacker News API, Lobsters
On this day Wikimedia REST + Wikidata coordinates
Location ipinfo.io, then ip-api.com

Local history is the one section that is sometimes absent: Wikipedia's on-this-day list is global, so a nearby event is only shown when today actually has one. Matching takes both Wikidata coordinates within 50 km and the city's name in the article, so a randomly geolocated entity cannot pose as local news. When nothing local exists the section falls back to the worldwide list, unlabelled.

Responses are cached on disk for 10 minutes. A failing section degrades to a one-line notice; it never kills the briefing.

Build

git clone https://github.com/epicshawty/morning
cd morning
go build -trimpath -ldflags "-s -w -X main.version=$(git describe --tags --always)" -o morning .

Cross-compile without any extra toolchain:

GOOS=linux GOARCH=riscv64 go build .
GOOS=darwin GOARCH=arm64 go build .

Tests: go test ./...

License

AGPL-3.0-or-later. If you run a modified morning as a network service, you publish the source.

Documentation

Overview

Command morning prints a short daily briefing: weather, world news, tech headlines and one thing that happened on this day.

https://github.com/epicshawty/morning

Directories

Path Synopsis
internal
cache
Package cache is a tiny file cache so repeat runs are instant and upstream services are not hammered.
Package cache is a tiny file cache so repeat runs are instant and upstream services are not hammered.
config
Package config handles the optional on-disk settings file.
Package config handles the optional on-disk settings file.
facts
Package facts provides the "on this day" section from Wikimedia.
Package facts provides the "on this day" section from Wikimedia.
fetch
Package fetch is the single HTTP entry point for morning.
Package fetch is the single HTTP entry point for morning.
news
Package news aggregates keyless RSS feeds and the Hacker News API.
Package news aggregates keyless RSS feeds and the Hacker News API.
ui
Package ui renders the briefing in styled or plain form.
Package ui renders the briefing in styled or plain form.
weather
Package weather talks to Open-Meteo, which needs no API key.
Package weather talks to Open-Meteo, which needs no API key.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL