Skip to main content

linecast

Weather, tides, the sun, the moon, and maps, drawn for the terminal. The Old Farmer's Almanac meets Minitel.

Tests PyPI Python License: MIT

Terminal Trove Tool of The Week

linecast weather, sunshine, tides, and radar tiled on an Omarchy desktop

linecast turns free public data into six live, mouse-friendly terminal apps for macOS, Linux, and Windows. It is pure Python with no third-party dependencies (two on Windows), tries to match your terminal theme, and needs no accounts or API keys.

Command What it shows
linecast weather Current conditions, an hourly braille temperature curve, a seven-day forecast, air quality, how today compares with a normal day, and official alerts
linecast sunshine The sun on its daily arc, with the color of the sky, day length, and moon phase
linecast moon The moon as seen from where you are, with illumination, altitude, rise and set times, and the next full and new moons
linecast tides A tide curve shaded by daylight, the current water level, and the times of high and low tide
linecast radar Animated radar or satellite imagery for the whole world, warning polygons, temperature, and wind
linecast maps Street maps, terrain, and a globe you can spin, with live daylight and clouds, place search, and directions

Install

brew install linecast

Or with uv:

uv tool install linecast

pipx install linecast and pip install linecast work too, and there are community-maintained packages in the AUR and in nixpkgs (unstable channel, for now). linecast needs Python 3.10 or newer on macOS, Linux, or Windows. To try it before installing anything:

uvx linecast weather

Or with nothing but curl — get.sh runs linecast with whatever the machine has, down to plain python3:

curl -sL https://raw.githubusercontent.com/ashuttl/linecast/main/get.sh | sh

It opens weather; name another tool with sh -s sunshine, or pass flags with sh -s -- --metric.

On Windows

Use Windows Terminal; Git Bash and mintty see a pipe rather than a terminal, so they get static output. The install adds two packages: tzdata, because Windows has no IANA time zone database, and truststore, for TLS verification through the OS certificate store. Icons default to emoji in Windows Terminal; with a Nerd Font installed and selected, linecast icons nerd switches to the full set.

Using it

Every command opens in live mode when run in a terminal, set to where your IP address says you are unless you have saved a location.

linecast weather --location "Québec"
linecast radar --location 41.88,-87.63
linecast maps --view terrain --location "Innsbruck"
linecast maps --to "Portland Head Light" --profile bike

--print gives one static frame, and piped output gets one automatically. Weather, sunshine, moon, and tides also have --json, and a short --oneline for status bars.

an animated version of the hero screenshot, showing the weather radar moving

A closer look

Weather

The dashboard combines current conditions, hourly temperatures shaded by daylight, precipitation, daily ranges, air quality, and a line on how today compares with a normal day. Official alerts cover 45 countries; click one to read it in full, or press o to open it in your browser. In India, air quality is shown on the CPCB's National AQI scale.

weather dashboard

Sunshine and Moon

sunshine is inspired by the Apple Watch Solar face. The arc and sky move through dawn, day, dusk, and night, and the day length comes with how much longer or shorter it is than yesterday.

sunshine at midday sunshine at dusk

linecast sunshine --year draws a whole year instead of one day. Each column is a day, running from midnight at the top to midnight at the bottom, and every point in it takes the color of the sky at that hour. Sunrise and sunset are not drawn as lines; they are where the night colors meet the day colors. Point at a day to see its sunrise, sunset and day length, along with the time and the sky under the pointer. In live mode, y switches between the day view and the year view. --dst plots each day in its own clock, so the clock changes show as steps.

the year view for Westbrook, Maine, with the pointer on the December solstice

Near the poles the same chart turns into polar night and midnight sun. These are Longyearbyen and Vostok Station, at 78° north and 78° south.

the year view for Longyearbyen, Svalbard the year view for Vostok Station, Antarctica

moon draws the current phase as you would see it from your location, with the shadow falling where it really does, the maria shaded, and a halo around it. Scroll to move through time. linecast moon --oneline fits a status bar.

Point sunshine or moon somewhere across an ocean and the rise and set times come back in that place's local clock.

full Moon

Tides

The tide chart runs across several days and marks the highs, the lows, and the current predicted water level. Scroll to move through time.

Predictions come from the national services where they exist — NOAA in the US, the Canadian Hydrographic Service, Queensland Open Data, and the Hong Kong Observatory — and from Open-Meteo's global tide model everywhere else. An optional TideCheck key adds more named stations. linecast tides --nearby lists the closest stations; linecast tides --station <id or name> pins one.

tide chart

Radar

Radar animates recent observations and an hour of forecast over a braille basemap.

Real radar exists only where open composites are published: North America, Europe, and parts of East and Southeast Asia. Elsewhere, LibreWXR fills in with a precipitation model, and it looks like one. US warning polygons are drawn too, along with optional temperature and wind layers and hourly infrared satellite imagery.

Rain is drawn in colors taken from your terminal theme; if the theme is monochrome, so is the rain. There are a few fixed themes as well — dusk, ember, ink, and marangai — plus LibreWXR's server-rendered ones. Press t to switch.

linecast radar --theme dusk
linecast radar --layers temp,wind
linecast radar --layer satellite

--source librewxr, --source rainviewer, or --source iem pins one frame source instead of routing by location, for comparing what each shows over the same spot.

animated radar forecast over Glasgow

Maps

Maps draws the streets in braille over water, land, parks, and buildings filled in solid color.

In terrain view, the land is shaded by height and lit from one side, like a relief map. Coastlines, borders, water, and cities are drawn over it in braille; l toggles them and the labels.

Search with / and ask for directions with d. Directions open as a panel of turn-by-turn steps; arrow or click through them and the map flies along the route.

street map of Portland, Maine terrain map of the Alps around Innsbruck

Zoom all the way out and either view becomes a globe you can rotate by dragging, or set spinning with r. Two keys switch on the sky as it is right now: s shades the planet into actual daylight, with a creeping terminator and cities glowing on the night side, and c lays the current global cloud cover over it from live satellite imagery. linecast maps --view now opens straight to the full picture.

the globe as it is right now: live daylight and the terminator

Everything is a single key — ? shows this list in the app:

Keys
drag · wheel · hover pan, zoom at the pointer, identify what's under the cursor
+ - zoom
n back to the start view
v l street ↔ terrain · toggle labels & lines
s c daylight and night city lights · live cloud cover
r spin the globe
/ search places and addresses
d o p directions · set the origin · cycle travel mode
q quit
linecast maps --location "Portland, Maine" --zoom 0.01
linecast maps --view terrain --location 60.4,5.3 --zoom 8
linecast maps --view now
linecast maps --from "Gorham, Maine" --to "Portland Head Light" --profile foot

Make it yours

Settings live in ~/.config/linecast/config.json. For any of them, a command-line flag beats an environment variable, which beats the saved setting.

Location

Save one location for every command:

linecast location set "Portland, Maine"
linecast location set "westbrook, maine"
linecast location set 44.54,-68.42
linecast location
linecast location auto
linecast location search fayette

set takes a place name or exact lat,lng coordinates. A name is looked up once, on the spot, and the first match is saved; search lists the candidates when the first match might not be the right one. A command's --location flag or WEATHER_LOCATION wins over the saved location.

With no location saved or passed, linecast falls back to IP geolocation: a single anonymous request to ipinfo.io (or to ipwho.is or GeoJS if it doesn't answer), which returns the rough position of your network connection — usually the right city, sometimes the wrong one, and off by a lot on a VPN or corporate network. The answer is cached for an hour. Save a location, or set any override, and the request is not made at all.

Units

Units follow the location: imperial in the United States, metric everywhere else. Either can be pinned for every command:

linecast units metric
linecast units imperial
linecast units
linecast units auto

Every view command takes --metric and --imperial; weather adds --celsius and --fahrenheit for the temperature alone. LINECAST_UNITS sets units for every command; WEATHER_UNITS and TIDES_UNITS override it for their one command.

Clock

The clock tries to follow the country: 12-hour in the United States, Canada, Australia, and the other places that write 6:50 pm, 24-hour everywhere else. Pin either for every command:

linecast clock 12
linecast clock 24
linecast clock
linecast clock auto

The time-showing commands take --12h and --24h for one run, and LINECAST_CLOCK sets it in the environment.

Language

Use --lang or LINECAST_LANG to pick the language. There are seventeen:

English, French, Spanish, German, Italian, Portuguese, Dutch, Polish, Norwegian, Swedish, Icelandic, Danish, Finnish, Japanese, Korean, Chinese, and Indonesian

linecast weather --lang fr
linecast radar --lang zh

In India, alerts go one step further: SACHET publishes many of them in the state language, and --lang hi, te, or, mr, or another Indian language code shows that regional text where it exists, while the rest of the app stays in English.

Color and icons

linecast asks the terminal for its palette so its colors belong in your theme. Set LINECAST_COLOR to truecolor, 256, 16, or none to choose the color mode yourself, or use the standard NO_COLOR variable.

Icons come in three sets: Nerd Font glyphs in terminals that bundle them (WezTerm, kitty, Ghostty), emoji in other terminals, and plain Unicode when output is piped. If you have installed a Nerd Font in Alacritty, foot, or iTerm2, linecast cannot tell, so say so once:

linecast icons nerd
linecast icons emoji
linecast icons plain
linecast icons
linecast icons auto

--icons and LINECAST_ICONS pick a set for one run, and linecast doctor shows a glyph from each so you can see what your font renders.

Short names

If you'd rather type weather than linecast weather, linecast link makes weather, sunshine, moon, tides, radar, and maps as links beside the linecast binary, skipping any name something else already owns; linecast link --remove takes them away. A shell alias does the same job.

Shell completion

# Bash
source <(linecast completion bash)

# Zsh
source <(linecast completion zsh)

# Fish
linecast completion fish | source

# Nushell
linecast completion nu | save -f ~/.config/nushell/completions/linecast_completions.nu
# in config.nu:
use ~/.config/nushell/completions/linecast_completions.nu *

Completion covers linecast <command> and the short names, for anyone who aliased or linked them.

When something looks wrong

linecast doctor
linecast doctor --offline
linecast doctor --json

linecast doctor reports the build, the settings and cache paths, what the terminal advertised, which settings are in force and where each came from, and whether each data provider answered. Secrets show as "(set)", never their value. --offline skips the probes; --json is the thing to paste into a bug report.

The six view commands and linecast doctor take --debug, which prints a line on stderr for each fallback taken along the way — a provider that did not answer, a tile that would not decode — and what was shown instead.

Environment variables
Variable Description
WEATHER_LOCATION Default location for location-aware commands, as lat,lng or a place name; overrides the saved location
WEATHER_UNITS metric or imperial for the weather command; overrides LINECAST_UNITS and the saved units
TIDE_STATION Default tide station ID
TIDES_UNITS metric or imperial for tide heights; overrides LINECAST_UNITS and the saved units
LINECAST_UNITS metric or imperial for every command; overrides the saved units
LINECAST_CLOCK 12 or 24; overrides the saved clock
LINECAST_TIDECHECK_KEY Optional TideCheck API key for global tide coverage
LINECAST_TIDECHECK_PAID Set to 1 on a paid TideCheck plan; the request tally then drops the 50-a-day free-tier cap
LINECAST_LANG UI language code: en, fr, es, de, it, pt, nl, pl, no, sv, is, da, fi, ja, ko, zh, or id
LINECAST_RADAR_THEME Default radar color theme
LINECAST_RADAR_SOURCE Pin the radar frame source: librewxr, rainviewer, or iem
LINECAST_RADAR_LAYER radar (default) or satellite, the imagery radar opens with
LINECAST_RADAR_LAYERS Overlays radar opens with, temp, wind, or both comma-separated
LINECAST_SUNSHINE_YEAR_PALETTE dial (default) for the Solar Dial colors in sunshine --year, or graph for the day view's own sky
LINECAST_LIBREWXR_URL Base URL of a self-hosted LibreWXR instance
LINECAST_VECTOR_TILES_URL TileJSON URL of a self-hosted street tile server, used instead of OpenFreeMap with no fallback
LINECAST_ELEVATION_URL Elevation tile source for maps: a bucket root holding terrarium/{z}/{x}/{y}.png, or a full tile URL template containing {z}, {x}, and {y}
LINECAST_ICONS icon set: nerd, emoji, or plain; overrides the saved icons (default: nerd where the terminal bundles the glyphs, emoji on other interactive terminals, plain when piped)
LINECAST_COLOR auto, truecolor, 256, 16, or none
LINECAST_THEME auto (default), or classic / legacy / off for the fixed palette
LINECAST_THEME_TIMEOUT_MS Terminal palette query timeout in milliseconds (default 100)
LINECAST_THEME_POLL Seconds between re-reading the terminal palette in live views, so a theme switch re-inks the view in place (default 2; 0 disables)
LINECAST_THEME_WATCH A file whose modification marks a desktop theme change, prompting an immediate re-read (default: Omarchy's current-theme marker; empty disables)
LINECAST_CACHE_DIR Directory for cached data, used exactly as given
LINECAST_MAPS_CACHE_MB Size the map tile cache is swept back to when maps starts (default 256)
LINECAST_CONFIG_DIR Directory for config.json, used exactly as given
NO_COLOR Any non-empty value disables ANSI colors
CLICOLOR / CLICOLOR_FORCE CLICOLOR=0 disables color; a non-zero CLICOLOR_FORCE keeps it on when output is not a terminal

Cached data lives in ~/Library/Caches/linecast on macOS and ~/.cache/linecast elsewhere; settings in ~/.config/linecast/config.json. Both honor the XDG_* variables, and the LINECAST_*_DIR variables above override everything.

Data sources and coverage
  • Locationipinfo.io for IP geolocation when no location is saved or passed, with ipwho.is and GeoJS as fallbacks; place names are geocoded by Open-Meteo, with Photon as a fallback.
  • WeatherOpen-Meteo for forecasts, geocoding, and air quality. Alerts come from the US National Weather Service, Environment Canada, China Meteorological Administration, DWD via Bright Sky, Hong Kong Observatory, Met Éireann, Japan Meteorological Agency, MET Norway, MetService New Zealand, MeteoAlarm (with its warning-region geometry vendored, © EUMETNET, CC BY 4.0), and SACHET (India's national alert aggregator).
  • Sunshine and Moon — computed on your device from the astronomical equations; the Moon's face is a vendored grayscale of NASA SVS's CGI Moon Kit (Lunar Reconnaissance Orbiter, public domain).
  • Tides — NOAA CO-OPS, Canadian Hydrographic Service, Queensland Open Data, Hong Kong Observatory, Open-Meteo's tide model as a global fallback, and optionally TideCheck.
  • RadarLibreWXR, with NEXRAD via Iowa Environmental Mesonet and RainViewer as fallbacks; warning polygons come from the US National Weather Service via IEM. The basemap is derived from Natural Earth.
  • Maps — terrain from AWS/Mapzen elevation tiles; streets and inland water from OpenFreeMap vector tiles (© OpenMapTiles © OpenStreetMap contributors), with the OpenStreetMap US Tileservice as a fallback (Tiles by OSM US); search from Photon and Nominatim; directions from FOSSGIS OSRM (© OpenStreetMap contributors); globe cloud cover from LibreWXR (CC BY 4.0) satellite imagery; terrain color picks its ramp from a vendored Köppen-Geiger climate grid (Beck et al. 2023, CC BY 4.0).

Contributing

Pull requests are welcome. ARCHITECTURE.md is the map of the code. The suite runs with uv run --with pytest pytest tests -q and the lint with uvx ruff check src tests scripts; both are meant to run without the network and without touching your home directory.

Lineage

3615 LINECAST

Prior art.

A Telic-Alcatel videotex terminal draws the weather, circa 1990. Photograph from the collection at minitel-alcatel.fr.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

linecast-2.2.2.tar.gz (5.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

linecast-2.2.2-py3-none-any.whl (5.7 MB view details)

Uploaded Python 3

File details

Details for the file linecast-2.2.2.tar.gz.

File metadata

  • Download URL: linecast-2.2.2.tar.gz
  • Upload date:
  • Size: 5.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for linecast-2.2.2.tar.gz
Algorithm Hash digest
SHA256 7a18100d59c9d1720fbb06bdb93dc427735a51c854cc3324c3aea5649fec9797
MD5 129b19c0e898cdb365707d329df605ee
BLAKE2b-256 01e4f4d19f2f4c799017c3c8d3b1100c3dc7ca6ac1d0c20c1c2d27a9e97f2930

See more details on using hashes here.

Provenance

The following attestation bundles were made for linecast-2.2.2.tar.gz:

Publisher: publish.yml on ashuttl/linecast

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file linecast-2.2.2-py3-none-any.whl.

File metadata

  • Download URL: linecast-2.2.2-py3-none-any.whl
  • Upload date:
  • Size: 5.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for linecast-2.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 88e80c95e2c7249a48dadbf13edc4c9c802532310671fe41d36760fa4fa88f0a
MD5 c26711f38adfc6b4d30a8476dc754e2c
BLAKE2b-256 6c0e603c0e56f9bd9e808bb5a7cff83af38f36234d8f4cbe021e62b309744b46

See more details on using hashes here.

Provenance

The following attestation bundles were made for linecast-2.2.2-py3-none-any.whl:

Publisher: publish.yml on ashuttl/linecast

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

2.3.2

2 files

2.3.1

2 files

2.3.0

2 files

This release

2.2.2 This release

2 files

2.2.1

2 files

2.2.0

2 files

2.1.0

2 files

2.0.0

2 files

1.17.0

2 files

1.16.1

2 files

1.16.0

2 files

1.15.2

2 files

1.15.1

2 files

1.15.0

2 files

1.14.0

2 files

1.13.0

2 files

1.12.0

2 files

1.11.0

2 files

1.10.1

2 files

1.10.0

2 files

1.9.2

2 files

1.9.1

2 files

1.9.0

2 files

1.8.0

2 files

1.7.0

2 files

1.6.0

2 files

1.5.0

2 files

1.4.2

2 files

1.4.1

2 files

1.4.0

2 files

1.3.1

2 files

1.3.0

2 files

1.2.7

2 files

1.2.6

2 files

1.2.5

2 files

1.2.4

2 files

1.2.3

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

1.1.10

2 files

1.1.9

2 files

1.1.8

2 files

1.1.7

2 files

1.1.6

2 files

1.1.5

2 files

1.1.4

2 files

1.1.3

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.7

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page