- register and get your api-key from https://www.weatherapi.com, it's free, don't worry
- run in project directory
npm i
- run
chmod u+x weather.js
- create
.env
file and set api key, like in.env.example
- edit
custom_bash_commands.sh
, set directory to yourweather.js
file - add to your ~/.bashsrc next command:
source ~/.custom_bash_commands.sh
now simply type weather
in your terminal, and you'll get information!