How to get weather details in Command Prompt, macOS or Linux Terminal

If you are a developer or a DevOps person working most of the time on command line interfaces (CLIs) such as Windows Command Prompt, or on Linux or macOS Terminals, and want to know how to get weather details of your city (or any city around the world) displayed using a command in console, here is how you can do it with a simple curl command to a website that provides a response in a very colourful and intuitive way.

Example: $ curl
Weather details using command line
Weather details using command line

✌️You can also create aliases for the curl so that instead of tying it always you can remember something a shortcut like temp: check out how - Custom Aliases Examples