LinuxCommandLibrary

ansiweather

Display weather information in the terminal

TLDR

Display a [f]orecast for the next seven days using metric [u]nits for a specific [l]ocation

$ ansiweather -u metric -f 7 -l [Rzeszow,PL]
copy

Display a [F]orecast for the next five days showing [s]ymbols and [d]aylight data for your current location
$ ansiweather -F -s true -d true
copy

Display today's [w]ind and [h]umidity data for your current location
$ ansiweather -w true -h true
copy

SYNOPSIS

ansiweather [-l LOCATION] [-u UNITS] [-f DAYS] [-s] [-a] [-h]

PARAMETERS

-l, --location=LOC
    Location to fetch weather for (e.g., London, ZIP code, or coordinates; default: auto-detect)

-u, --units=UNITS
    Units: metric, imperial, ukhybrid, or hybrid (default: hybrid)

-f, --forecast=DAYS
    Forecast days: 0-7 (default: 1)

-s, --symbol
    Use simple symbols instead of icons

-a, --ascii
    Display ASCII art instead of Unicode icons

-h, --help
    Show help and exit

DESCRIPTION

ansiweather is a lightweight, open-source command-line utility that fetches and displays current weather conditions and forecasts using vibrant ANSI escape codes for colors, directly in your Linux terminal. It pulls data from the wttr.in weather service, rendering information like temperature, wind, humidity, and precipitation in a visually appealing, compact format.

Key features include support for multiple unit systems (metric, imperial, ukhybrid, or hybrid), customizable forecast periods up to 7 days, and options to use simple symbols or ASCII art instead of Unicode icons for broader compatibility. No graphical interface is needed—perfect for servers, SSH sessions, or minimal desktops.

Installation is straightforward via GitHub clone, AUR (Arch), or distro packages. It depends on curl for HTTP requests and requires internet access. Output adapts to terminal capabilities, making it ideal for quick checks in scripts or ~/.bashrc aliases.

CAVEATS

Requires internet and curl(1); ANSI colors and Unicode need terminal support; auto-location may fail without IP geolocation.

DEPENDENCIES

curl for fetching data from wttr.in; no other runtime deps.

INSTALLATION

git clone https://github.com/ncarmon/ansiweather.git; or via AUR/pkg (e.g., ansiweather-git).

HISTORY

Created around 2017 by ncarmon13 on GitHub as a simple Bash script; gained popularity for minimalism; maintained with Go rewrite for better performance; widely used in dotfiles and tiling WM setups.

SEE ALSO

curl(1)

Copied to clipboard