Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including forecast-cli with all npm packages installed. Try it out:

var forecastCli = require("forecast-cli")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

forecast-cli v0.5.4

Gets the weather for you, and beautifully displays it in your terminal - using the API.


forecast-cli is a CLI tool for getting a beautifully formatted weather forecast in your terminal, using's API. You can configure it to use either degrees Celsius or Fahrenheit.


With npm:

npm install -g forecast-cli

Clone this project:

git clone


Usage: forecast [options] [placename]


--hourly       Hourly report for the next 48 hours
--units        Configure to use Fahrenheit or Celcius (default)
-h, --help     output usage information
-V, --version  output the version number


$ forecast
$ forecast "Cape Town"
$ forecast --hourly "Cape Town"
$ forecast --units

Default place name

Your last placename will be stored in


Default units

The default units are Celcius, and they too are stored in


The available options are

us: Fahrenheit (°F)
si: Celcius (°C)


This file holds your settings. Example:

  "place": "Cape Town",
  "units": "si"

When using Grunt to transpile to javascript

Add the following line to the top of the generated forecast-cli.js file:

#!/usr/bin/env node

White screenshot

White Screenshot

Black screenshot

Black Screenshot

Now you're prepared.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free