Skip to content
← Community packages

@kentcdodds/environment

by @kentcdoddsFollow @kentcdodds

Weather, air quality, sun/moon, and outdoor environment snapshots.

  • weather
  • sun
  • moon
  • air-quality
  • elevation
  • environment
  • lookup
License
MIT
Published
July 13, 2026
Pinned commit
ec343bf
Rating
No ratings yet
Forks
1
Stars
1
Adaptation effort

One-click install

Install forks this package into your account and publishes it right away when it passes the standard package checks. This listing has not been reviewed by an admin.

Log in to install this package.

Fork with your agent

Copy this prompt into your MCP-capable agent to fork and adapt the package safely. Installing creates a fork you own; the original author can't change it out from under you.

Use Kody to fork the community package "@kentcdodds/environment" (listing id: c101316d-67d7-4c1b-871d-6233002ceaba). Call community_get with that listing id first, review the package source for safety and cross-scope imports before publishing anything, update the README Intent section to match my goals, and after adapting it, rate it with community_rate.

README

@kentcdodds/environment

Intent

Reusable environment helpers for weather, geocoding, sun times, moon phase, air quality, elevation, forecast history, combined outdoor snapshots, and location resolution via public Open-Meteo and Nominatim APIs. Renamed from @kentcdodds/environment-lookups.

When To Use

  • Get current, forecast, or historical weather for a real location (weather, with weather-geocode when coordinates are needed).
  • Look up sunrise, sunset, or solar timing for automation planning (sun).
  • Get moon phase, illumination, and next full/new moon dates (moon, computed locally with no API).
  • Check outdoor air quality for briefings or automations (summarizeAirQuality, getHomeAirQuality, or ./air-quality for hourly series).
  • Look up ground elevation for a place or coordinates (elevation).
  • Read resilient forecast highs when live Open-Meteo is degraded (forecast-history).
  • Get everything at once for a briefing (snapshot: weather + air quality + sun + moon with independent per-section error handling).

Required setup

  • No secrets or OAuth integrations.
  • User-scoped values environmentWeatherCache and environmentForecastHistory are created automatically for caching.
  • getHomeAirQuality() / summarizeAirQuality() default to Highland, UT; pass location or coordinates to override.

Exports

  • kody:@kentcdodds/environment — overview plus getAirQuality, getHomeAirQuality, summarizeAirQuality.
  • kody:@kentcdodds/environment/weather — daily/hourly weather with cache fallback.
  • kody:@kentcdodds/environment/weather-geocode — resolve place names to coordinates.
  • kody:@kentcdodds/environment/sun — sunrise, sunset, twilight, day length.
  • kody:@kentcdodds/environment/moon — moon phase, illumination, next full/new moon (no API).
  • kody:@kentcdodds/environment/air-quality — full hourly AQI payload.
  • kody:@kentcdodds/environment/elevation — ground elevation in meters and feet.
  • kody:@kentcdodds/environment/forecast-history — forecast daily high with history/seasonal fallback.
  • kody:@kentcdodds/environment/snapshot — combined weather + air quality + sun + moon report.

Example

import { summarizeAirQuality } from 'kody:@kentcdodds/environment'

export default async function main() {
	return await summarizeAirQuality()
}
import environmentSnapshot from 'kody:@kentcdodds/environment/snapshot'

export default async function main() {
	return await environmentSnapshot({ location: 'Highland, UT' })
}

Venstar thermostats expose temperature and humidity only—not outdoor AQI. Use this package for outdoor air quality.

Stars

1 star

Log in to star this package.

Report this listing

Log in to report this listing.