Skip to main content

sourcehut GitHub mirror Codeberg mirror

builds.sr.ht status

d-yr

Using the Yr.no / MET.no weather API with Deno.

This project has both a CLI and functions to access Yr.no’s API.

Usage

import { Yr } from "https://deno.land/x/dyr/mod.ts";

Install CLI

deno install --allow-net=api.met.no,nominatim.openstreetmap.org -n yr https://deno.land/x/dyr/src/cli.ts

You have now installed d-yr as yr.

Setup

Run the project with:

# Current weather forecast for location
yr current Bergen
# OR forecast for location
yr forecast Bangkok