Documentation

Open-Meteo + NWS CLI

weather-goat-pp-cli

Install

npx -y @mvanhorn/printing-press-library install weather-goat

Installs the CLI binary and the agent skill for Claude Code, Codex, Cursor, Gemini CLI, Copilot, and more. Add --cli-only or --skill-only for one half. Requires Node.

Documentation

The weather CLI that answers the questions you actually ask: Should I bike today? Do I need an umbrella for the walk home? Is there a tornado warning? Is this summer hotter than normal?

Powered by Open-Meteo (global forecasts, 80 years of history, air quality) and NWS (severe weather alerts). No API key required.

Created by @tmchow (Trevin Chow).

Authentication

Open-Meteo is a free API — no API key required. NWS alerts also require no authentication.

Quick Start

# 1. Set your default location
weather-goat-pp-cli config set-location "Seattle"

# 2. Check your setup
weather-goat-pp-cli doctor

# 3. Get a full weather brief (current conditions + forecast + alerts)
weather-goat-pp-cli

# 4. Should I bike today?
weather-goat-pp-cli go bike

# 5. Check air quality before going outside
weather-goat-pp-cli breathe

What Makes This Different

Every weather CLI shows you temperature and precipitation. Weather Goat answers the questions that actually drive decisions.

"Should I bike today?"go bike checks wind, rain, temperature, ice, and air quality. Returns GO, CAUTION, or STOP with specific reasons.

"Do I need an umbrella for the walk home?"go commute checks the forecast at your departure AND return times. "Clear this morning, rain by 5pm — take an umbrella."

"Is there a severe weather warning?"alerts pulls active NWS warnings (tornado, storm, flood, heat). watch polls every 60 seconds during active weather.

"Is this summer actually hotter than normal?"normal compares today to the historical average for this date. "Today is 8°F above average for April 11."

"Beach or mountains this weekend?"compare "Malibu" "Big Bear" shows side-by-side forecasts.

"Is the air quality safe to run in?"breathe shows AQI, pollen, UV, and whether it's safe to exercise outdoors.

Commands

Weather & Forecasts

CommandDescription
weather-goat-pp-cliMorning brief — current conditions, today's forecast, active alerts
forecastCurrent weather and daily forecast (temperature, precip, sunrise/sunset)
forecast hourlyHourly forecast for the next 48 hours
historyHistorical weather data for any date back to 1940
normalCompare today's temperature to the historical average
compareSide-by-side weather comparison of two locations

Activity Verdicts

CommandDescription
go walkWalking prep advice — umbrella, layers, sunscreen
go bikeGO/CAUTION/STOP for wind, rain, temperature, AQI
go hikeGO/CAUTION/STOP for thunderstorms, hypothermia, UV, wind
go commuteMorning vs evening forecast with umbrella advice
go driveGO/CAUTION/STOP for visibility, ice, wind, NWS warnings

Air Quality & Alerts

CommandDescription
air-qualityAQI, PM2.5, PM10, pollen, UV index
breatheAir quality + pollen + UV with exercise safety recommendation
alertsActive NWS weather alerts for a location or state
watchContinuously poll NWS alerts and print new ones

Location & Data

CommandDescription
geocodingSearch for a location by name and get coordinates
syncSync API data to local SQLite for offline access
analyticsRun analytics queries on locally synced data
exportExport data to JSONL or JSON
importImport data from JSONL file

Utilities

CommandDescription
config set-locationSave your default location
config set-commuteSave commute departure and return times
config showDisplay current configuration
doctorCheck CLI health and connectivity
apiBrowse all API endpoints
workflowCompound workflows combining multiple operations
authManage authentication tokens

Output Formats

# Human-readable (default in terminal, JSON when piped)
weather-goat-pp-cli forecast --latitude 47.6 --longitude -122.3

# JSON for scripting and agents
weather-goat-pp-cli forecast --latitude 47.6 --longitude -122.3 --json

# Filter to specific fields
weather-goat-pp-cli forecast --latitude 47.6 --longitude -122.3 --json --select temperature_2m,wind_speed_10m

# CSV output
weather-goat-pp-cli history --latitude 47.6 --longitude -122.3 --start-date 2024-01-01 --end-date 2024-01-31 --csv

# Compact output (key fields only, for agents)
weather-goat-pp-cli geocoding "Seattle" --compact

# Dry run — show the request without sending
weather-goat-pp-cli forecast --latitude 47.6 --longitude -122.3 --dry-run

# Agent mode — JSON + compact + no prompts in one flag
weather-goat-pp-cli go bike "Portland" --agent

Agent Usage

This CLI is designed for AI agent consumption:

  • Non-interactive — never prompts, every input is a flag
  • Pipeable--json output to stdout, errors to stderr
  • Filterable--select id,name returns only fields you need
  • Previewable--dry-run shows the request without sending
  • Confirmable--yes for explicit confirmation of destructive actions
  • Cacheable — GET responses cached for 5 minutes, bypass with --no-cache
  • Agent-safe by default — no colors or formatting unless --human-friendly is set
  • Progress events — paginated commands emit NDJSON events to stderr

Exit codes: 0 success, 2 usage error, 3 not found, 4 auth error, 5 API error, 7 rate limited, 10 config error.

Use as MCP Server

This CLI ships a companion MCP server for use with Claude Desktop, Cursor, and other MCP-compatible tools.

Claude Code

claude mcp add weather weather-goat-pp-mcp

Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "weather": {
      "command": "weather-goat-pp-mcp"
    }
  }
}

Cookbook

# Morning brief — what's the weather right now?
weather-goat-pp-cli

# Should I bike to work today?
weather-goat-pp-cli go bike

# Compare two cities for a weekend trip
weather-goat-pp-cli compare "San Francisco" "Los Angeles"

# Is this temperature unusual for this time of year?
weather-goat-pp-cli normal

# Check air quality before an outdoor run
weather-goat-pp-cli breathe

# Get NWS alerts for all of California
weather-goat-pp-cli alerts --state CA

# Watch for severe weather during a storm
weather-goat-pp-cli watch "Oklahoma City" --interval 30

# Historical weather on a specific date
weather-goat-pp-cli history --latitude 47.6 --longitude -122.3 --start-date 2024-07-04 --end-date 2024-07-04

# Commute forecast (set up times first)
weather-goat-pp-cli config set-commute 08:00 18:00
weather-goat-pp-cli go commute

# Hourly forecast as JSON for scripting
weather-goat-pp-cli forecast hourly --latitude 40.7 --longitude -74.0 --json

# Pipe activity verdict to another tool
weather-goat-pp-cli go drive --agent | jq '.verdict'

# Sync data locally for offline access
weather-goat-pp-cli sync

# Export synced data for analysis
weather-goat-pp-cli export --format jsonl > weather-backup.jsonl

Health Check

weather-goat-pp-cli doctor
  OK Config: ok
  WARN Auth: not required
  OK API: reachable
  config_path: ~/.config/weather-goat-pp-cli/config.toml
  base_url: https://api.open-meteo.com/v1

Configuration

Config file: ~/.config/weather-goat-pp-cli/config.toml

SettingDescription
WEATHER_CONFIGOverride config file path
WEATHER_BASE_URLOverride API base URL (for self-hosted Open-Meteo)

Config file fields:

FieldDescription
base_urlAPI base URL (default: https://api.open-meteo.com/v1)
latitudeDefault latitude for location-based commands
longitudeDefault longitude for location-based commands
location_nameDisplay name for the saved location
commute_depart_timeDeparture time for commute forecast (e.g., 08:00)
commute_return_timeReturn time for commute forecast (e.g., 18:00)

Self-Hosting

If you run a self-hosted Open-Meteo instance:

export WEATHER_BASE_URL=https://your-open-meteo-instance.example.com/v1

Or set base_url in your config file.

Troubleshooting

Authentication errors (exit code 4)

  • Open-Meteo is free and doesn't require authentication
  • Run weather-goat-pp-cli doctor to check connectivity

Not found errors (exit code 3)

  • Check the location name or coordinates are correct
  • Try weather-goat-pp-cli geocoding "city name" to verify coordinates

Rate limit errors (exit code 7)

  • The CLI auto-retries with exponential backoff
  • Open-Meteo allows 10,000 requests/day on the free tier
  • If persistent, wait a few minutes or use --rate-limit 1

No location configured

  • Run weather-goat-pp-cli config set-location "City Name" to save a default
  • Or pass a location inline: weather-goat-pp-cli go walk "Denver"

Sources & Inspiration

This CLI was built by studying these projects and resources:

Generated by CLI Printing Press

Agent workflow features

This CLI was patched to add these agent-workflow capabilities (see printing-press patch):

  • Named profiles — save a set of flags under a name and reuse them: weather-goat-pp-cli profile save <name> --<flag> <value>, then weather-goat-pp-cli --profile <name> <command>. Flag precedence: explicit flag > env var > profile > default.
  • --deliver — route command output to a sink other than stdout. Values: file:<path> writes atomically via tmp+rename; webhook:<url> POSTs as JSON (or NDJSON with --compact).
  • feedback — record in-band feedback about the CLI. Entries append as JSON lines to ~/.weather-goat-pp-cli/feedback.jsonl. When WEATHER_GOAT_FEEDBACK_ENDPOINT is set and either --send is passed or WEATHER_GOAT_FEEDBACK_AUTO_SEND=true, the entry is also POSTed upstream.

For agents: pass /documentation/weather-goat/agents.md to install this CLI from a prompt.