`curl`: Weather in your terminal

`curl`: Weather in your terminal

Hello reader! Welcome, let's start-

These components are fancy. — the right way to check curl the weather! is a console-oriented weather forecast service that supports various information
representation methods like terminal-oriented ANSI-sequences for console HTTP clients
(curl, httpie, or wget), HTML for web browsers, or PNG for graphical viewers.

Originally started as a small project, a wrapper for wego,
intended to demonstrate the power of the console-oriented services, became a popular weather reporting service, handling tens millions of queries daily.

You can see it running here:

Documentation | Usage | One-line output | Data-rich output format | Map view | Output formats | Moon phases | Internationalization | Windows issues | Installation

You can access the service from a shell or from a Web browser like this:

$ curl
Weather for City: Paris, France

/ Clear
.-. 10 – 11 °C
― ( ) ― ↑ 11 km/h
`-’ 10 km
/ 0.0 mm

Here is an actual weather report for your location (it’s live!):

(It’s not your actual location – GitHub’s CDN hides your real IP address with its own IP address,
but it’s still a live weather report in your language.)

Or in PowerShell:

Want to get the weather information for a specific location? You can add the desired location to the URL in your
request like this:

$ curl
$ curl
$ curl

If you omit the location name, you will get the report for your current location based on your IP address.

Use 3-letter airport codes in order to get the weather information at a certain airport:

$ curl # Weather for IATA: muc, Munich International Airport, Germany
$ curl # Weather for IATA: ham, Hamburg Airport, Germany

Let’s say you’d like to get the weather for a geographical location other than a town or city – maybe an attraction
in a city, a mountain name, or some special location. Add the character ~ before the name to look Up that special
location name before the weather is then retrieved:

$ curl
$ curl
$ curl

For these examples, you’ll see a line below the weather forecast output that shows the geolocation
results of looking Up the location:

Location: Vostok Station, станция Восток, AAT, Antarctica [-78.4642714,106.8364678]
Location: Tour Eiffel, 5, Avenue Anatole France, Gros-Caillou, 7e, Paris, Île-de-France, 75007, France [48.8582602,2.29449905432]
Location: Kilimanjaro, Northern, Tanzania [-3.4762789,37.3872648]

You can also use IP-addresses (direct) or domain names (prefixed with @) to specify a location:

$ curl
$ curl

To get detailed information online, you can access the /:help page:

Weather Units
By default the USCS units are used for the queries from the USA and the metric system for the rest of the world.
You can override this behavior by adding ?u, ?m or ?M to a URL like this:

$ curl # USCS (used by default in US)
$ curl # metric (SI) (used by default everywhere except US)
$ curl # metric (SI), but show wind speed in m/s

If you have several options to pass, write them without delimiters in between for the one-letter options,
and use & as a delimiter for the long options with values:

$ curl ‘’

It would be a rough equivalent of -m2 –lang nl for the GNU CLI syntax.

Supported output formats and views currently supports five output formats:

ANSI for the terminal;
Plain-text for the terminal and scripts;
HTML for the browser;
PNG for the graphical viewers;
JSON for scripts and APIs;
Prometheus metrics for scripts and APIs.

The ANSI and HTML formats are selected based on the User-Agent string.

To force plain text, which disables colors:

The PNG format can be forced by adding .png to the end of the query:

You can use all of the options with the PNG-format like in an URL, but you have
to separate them with _ instead of ? and &:

$ wget

Useful options for the PNG format:

t for transparency (transparency=150);
transparency=0..255 for a custom transparency level.

Transparency is a useful feature when weather PNGs are used to add weather data to pictures:

$ convert source.jpg
Read More
Share this on to discuss with people on this topicSign Up on now if you’re not registered yet.

About the author: Charlie
Fill your life with experiences so you always have a great story to tell

Get involved!

Get Connected!
One of the Biggest Social Platform for Entrepreneurs, College Students and all. Come and join our community. Expand your network and get to know new people!


No comments yet
Knowasiak We would like to show you notifications so you don't miss chats & status updates.
Allow Notifications