Skip to content

Command line app built with Node.js to show the current weather and forecast in your terminal

Notifications You must be signed in to change notification settings

katebeavis/weather-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

weather-cli

A command line app to show the current weather and forecast in your terminal ☀️ ⛄ 🌈

To setup

git clone git@github.com:katebeavis/weather-cli.git && cd weather-cli
npm install
touch .env

In the .env file, add the following:

DARK_SKY_API_KEY=YOUR_API_KEY_HERE
DARK_SKY_URL=https://api.darksky.net/forecast
GOOGLE_PLACES_API_KEY=YOUR_API_KEY_HERE
GEOCODE_URL=https://maps.googleapis.com/maps/api/geocode/json
IP_DATA_API_KEY=YOUR_API_KEY_HERE
IP_DATA_URL=https://api.ipdata.co

Replace the DARK_SKY_API_KEY with your own from the Dark Sky API, GOOGLE_PLACES_API_KEY from the Google Maps API and IP_DATA_API_KEY from the Ipdata API.

Example usage

To see all available options:

weather --help

To get the weather for a given location:

weather today -l "London"

To get the 7 day forecast for a given location:

weather forecast -l "Princeton"

To get the weather for your current location, omit the -l flag and location string:

weather today

Temperaure displays in celsius as default but can be displayed in fahrenheit by adding the -f flag.

Acknowledgments

This app was originally based off the app built here.

About

Command line app built with Node.js to show the current weather and forecast in your terminal

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published