WeatherCli 1.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global WeatherCli --version 1.1.0                
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local WeatherCli --version 1.1.0                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=WeatherCli&version=1.1.0                
nuke :add-package WeatherCli --version 1.1.0                

Installation

Download .NET Core 3.1 SDK. Once installed, run this command:

dotnet tool install -g weathercli

Get a free API key here.

Usage

Current weather command

Usage: weather current [options] <CityName>

Arguments:
  CityName      You can call by city name or city name, state code and country code

Options:
  -d|--default  Sets a default city name
  -k|--apikey   Sets an OpenWeatherMap API key

Example using the current weather command:

weather current sofia -k YOUR_API_KEY

Example of successful response:

Sofia
Mist -2°C
Feels like -5°C. mist
Wind 1.0m/s N, 1021hPa, Humidity: 92%
Visibility: 2.8km

Optionally, you can omit the API key. In order to do that, you have to set the environment variable.

How to do it in Windows:

For the current process:

set OPENWEATHERMAP_APIKEY=YOUR_API_KEY

For the user:

setx OPENWEATHERMAP_APIKEY YOUR_API_KEY
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.2.0 224 3/1/2024
1.1.0 512 12/2/2020
1.0.0 404 12/1/2020