pp-weather-goat
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWeather Goat — Printing Press CLI
Weather Goat — Printing Press CLI
Prerequisites: Install the CLI
前置条件:安装CLI
This skill drives the binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:
weather-goat-pp-cli- Install via the Printing Press installer:
bash
npx -y @mvanhorn/printing-press install weather-goat --cli-only - Verify:
weather-goat-pp-cli --version - Ensure (or
$GOPATH/bin) is on$HOME/go/bin.$PATH
If the install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.23+):
npxbash
go install github.com/mvanhorn/printing-press-library/library/other/weather-goat/cmd/weather-goat-pp-cli@latestIf reports "command not found" after install, the install step did not put the binary on . Do not proceed with skill commands until verification succeeds.
--version$PATH本Skill基于二进制文件运行。在调用本Skill的任何命令前,必须确认CLI已安装。如果未安装,请先执行以下步骤:
weather-goat-pp-cli- 通过Printing Press安装器安装:
bash
npx -y @mvanhorn/printing-press install weather-goat --cli-only - 验证安装:
weather-goat-pp-cli --version - 确保(或
$GOPATH/bin)已添加到$HOME/go/bin环境变量中。$PATH
如果安装失败(无Node环境、离线等),可改用直接Go安装方式(要求Go 1.23+版本):
npxbash
go install github.com/mvanhorn/printing-press-library/library/other/weather-goat/cmd/weather-goat-pp-cli@latest如果执行时提示“command not found”,说明安装程序未将二进制文件添加到中。请在验证成功前不要执行Skill相关命令。
--version$PATHWhen to Use This CLI
何时使用本CLI
Reach for this when a user wants a weather lookup, storm or alert check, air-quality read, activity recommendation (bike, hike, walk, commute, drive) based on current conditions, or a "is today normal for this time of year" comparison. Particularly valuable as a morning-briefing source with (no args → current + today's forecast + active alerts for your configured home location).
weather-goat-pp-cliDon't reach for this when the user needs hyperlocal or commercial-grade meteorology (use a paid provider like Tomorrow.io or ECMWF), or for international severe-weather alerts (NWS is US-only).
当用户需要查询天气、风暴或预警信息、空气质量读数、基于当前天气的活动建议(骑行、徒步、步行、通勤、驾车),或者需要对比“今日天气是否符合当前季节常态”时,可使用本工具。尤其适合作为晨间简报工具,直接执行(无参数)即可获取配置的家庭所在地的当前天气+今日预报+活跃预警信息。
weather-goat-pp-cli以下情况不建议使用本工具:用户需要超本地化或商业级气象数据(请使用Tomorrow.io或ECMWF等付费服务商),或需要美国以外地区的恶劣天气预警(NWS仅覆盖美国)。
Unique Capabilities
独特功能
Activity verdicts — the differentiator
活动判定——核心差异化功能
-
— GO / CAUTION / STOP verdict for a specific activity, with reasoning.
go walk|bike|hike|commute|drive [location]Turns "look at the weather" into "what should I do." Each activity has its own thresholds.- walk — preparation advice (umbrella? jacket? sunscreen? layers?)
- bike — wind, rain, AQI, ice thresholds tuned for cycling
- hike — lightning, hypothermia risk, altitude UV
- commute — compares AM departure vs PM return weather (time-aware)
- drive — visibility, ice, wind gusts, NWS warnings
-
——针对特定活动给出GO/CAUTION/STOP判定,并附上理由。
go walk|bike|hike|commute|drive [location]将“查看天气”转化为“我该怎么做”。每项活动都有专属阈值。- walk ——提供准备建议(是否需要雨伞?外套?防晒霜?分层穿搭?)
- bike ——针对骑行场景优化的风速、降雨、AQI、结冰阈值
- hike ——雷电、低体温风险、高海拔紫外线情况
- commute ——对比早高峰出发与晚高峰返程的天气(时间感知型)
- drive ——能见度、结冰、阵风、NWS预警情况
Severe weather intelligence
恶劣天气智能监测
-
— Active NWS warnings: tornado, storm, flood, heat. Structured output with severity and area polygons.
alerts [location] -
— Poll NWS every 60 seconds during active severe weather. Prints new/updated alerts as they arrive. For running during a storm.
watch [location]
-
——获取活跃的NWS预警:龙卷风、风暴、洪水、高温。输出包含严重程度和影响区域多边形的结构化数据。
alerts [location] -
——在恶劣天气活跃期间,每60秒轮询NWS。当有新预警或预警更新时自动打印信息。适合在风暴期间持续运行。
watch [location]
Context and comparison
情境与对比分析
-
— Is today normal for this time of year? Compares today's high/low/precip against historical average for the same date.
normal [location] -
— Side-by-side forecast for 2+ locations. Useful for travel planning or "which city is the weather better this weekend."
compare <location1> <location2> [...] -
(or just
morning-briefwith no args, ifweather-goat-pp-cliwas run) — Current conditions + today's forecast + active NWS alerts in one call. The daily-kickoff command.config set-location
-
——今日天气是否符合当前季节常态?将今日的最高/最低气温、降水量与历史同期平均值对比。
normal [location] -
——同时展示2个及以上地点的预报。适用于旅行规划或对比“哪个城市本周末天气更好”。
compare <location1> <location2> [...] -
(或在执行
morning-brief后直接运行无参数的config set-location)——一次调用即可获取当前天气+今日预报+活跃NWS预警。作为每日启动命令使用。weather-goat-pp-cli
Air, UV, and pollen
空气、紫外线与花粉监测
-
— AQI + pollen + UV with an exercise recommendation.
breathe [location] -
— Detailed AQI with PM2.5, ozone, etc.
air-quality [location] -
— Reference for Open-Meteo weather code mappings (internal but useful when working with
weather_codesoutput).--json
-
——获取AQI+花粉+紫外线数据,并给出运动建议。
breathe [location] -
——获取包含PM2.5、臭氧等指标的详细AQI数据。
air-quality [location] -
——Open-Meteo天气代码映射参考(内部工具,但在处理
weather_codes输出时很有用)。--json
Command Reference
命令参考
Core:
- — Morning brief (requires
weather-goat-pp-clifirst, or passconfig set-location)[location] - — Multi-day forecast
weather-goat-pp-cli forecast [location] - — Active NWS severe weather
weather-goat-pp-cli alerts [location] - — Historical weather
weather-goat-pp-cli history [location]
Activity:
- —
weather-goat-pp-cli go <activity> [location],walk,bike,hike,commutedrive
Air / environment:
- — AQI + pollen + UV brief
weather-goat-pp-cli breathe [location] - — Detailed AQI
weather-goat-pp-cli air-quality [location]
Context:
- — Today vs historical average
weather-goat-pp-cli normal [location] - — Side-by-side
weather-goat-pp-cli compare <loc1> <loc2> - — Live NWS monitoring loop
weather-goat-pp-cli watch [location]
Config + utility:
- — Set home location
weather-goat-pp-cli config set-location <place> - — Resolve place names to coordinates
weather-goat-pp-cli geocoding <name> - — Verify connectivity
weather-goat-pp-cli doctor
核心命令:
- ——晨间简报(需先执行
weather-goat-pp-cli,或传入config set-location参数)[location] - ——多日天气预报
weather-goat-pp-cli forecast [location] - ——活跃NWS恶劣天气预警
weather-goat-pp-cli alerts [location] - ——历史天气数据
weather-goat-pp-cli history [location]
活动相关命令:
- ——支持
weather-goat-pp-cli go <activity> [location]、walk、bike、hike、commute活动类型drive
空气/环境相关命令:
- ——AQI+花粉+紫外线简报
weather-goat-pp-cli breathe [location] - ——详细AQI数据
weather-goat-pp-cli air-quality [location]
情境分析命令:
- ——今日与历史平均值对比
weather-goat-pp-cli normal [location] - ——多地点并排对比
weather-goat-pp-cli compare <loc1> <loc2> - ——NWS实时监测循环
weather-goat-pp-cli watch [location]
配置与工具命令:
- ——设置家庭所在地
weather-goat-pp-cli config set-location <place> - ——将地点名称解析为坐标
weather-goat-pp-cli geocoding <name> - ——验证网络连接
weather-goat-pp-cli doctor
Recipes
使用示例
"Should I bike to work today?"
“我今天适合骑车上班吗?”
bash
weather-goat-pp-cli go bike --agentReturns a structured GO/CAUTION/STOP verdict with reasoning — wind speed, precipitation, AQI, temperature, ice risk — weighted for cycling specifically.
bash
weather-goat-pp-cli go bike --agent返回结构化的GO/CAUTION/STOP判定及理由——针对骑行场景加权计算风速、降水、AQI、气温、结冰风险等因素。
Morning briefing after setting home location
设置家庭所在地后的晨间简报
bash
weather-goat-pp-cli config set-location "Seattle, WA"
weather-goat-pp-cli --agent # morning brief — no argsOnce location is saved, the no-arg invocation returns current conditions + today's forecast + active NWS alerts. Run from a shell startup script or cron at 7am.
bash
weather-goat-pp-cli config set-location "Seattle, WA"
weather-goat-pp-cli --agent # 晨间简报——无参数设置地点后,无参数调用即可返回当前天气+今日预报+活跃NWS预警。可在Shell启动脚本或Cron中设置为早上7点自动运行。
Travel decision — which city is better this weekend?
旅行决策——哪个城市本周末天气更好?
bash
weather-goat-pp-cli compare "Portland, OR" "San Francisco, CA" --days 3 --agentSide-by-side 3-day forecast for both. One glance picks the trip destination.
bash
weather-goat-pp-cli compare "Portland, OR" "San Francisco, CA" --days 3 --agent展示两个城市的3天并排预报,一眼即可选定旅行目的地。
Watch for severe weather during a warning
预警期间监测恶劣天气
bash
weather-goat-pp-cli watch --agent & # background poll every 60sRuns indefinitely; prints JSON events to stdout when alerts change. Pipe into a logging tool or Slack webhook for alerting.
bash
weather-goat-pp-cli watch --agent & # 后台每60秒轮询持续运行;当预警变化时向stdout输出JSON事件。可将输出管道到日志工具或Slack webhook实现告警。
Is today unusually hot?
“今天是不是异常炎热?”
bash
weather-goat-pp-cli normal --agentReturns today's high/low/precip alongside the 30-year historical average for the same calendar date. Easy "is this a heat wave" check.
bash
weather-goat-pp-cli normal --agent返回今日最高/最低气温、降水量,以及对应日历日期的30年历史平均值。轻松判断是否为热浪天气。
Auth Setup
认证设置
None required. Open-Meteo is free and unlimited; NWS is free and US-public-data. The command exists for consistency but is a no-op.
authOptional config:
- — override config file path
WEATHER_GOAT_CONFIG - Home location persisted to via
~/.config/weather-goat-pp-cli/config.tomlconfig set-location
无需认证。Open-Meteo免费且无使用限制;NWS为美国公共数据,免费使用。命令仅为保持一致性而存在,实际无操作。
auth可选配置:
- ——覆盖配置文件路径
WEATHER_GOAT_CONFIG - 家庭所在地通过持久化到
config set-location~/.config/weather-goat-pp-cli/config.toml
Agent Mode
Agent模式
Add to any command. Expands to . Use for forecast range on relevant commands, to bypass the 15-minute GET cache.
--agent--json --compact --no-input --no-color --yes--days N--no-cache在任何命令后添加参数。该参数等价于。在相关命令中使用指定预报范围,使用绕过15分钟GET缓存。
--agent--json --compact --no-input --no-color --yes--days N--no-cacheFiltering output
输出过滤
--selectbash
weather-goat-pp-cli <command> --agent --select id,name
weather-goat-pp-cli <command> --agent --select items.id,items.owner.nameUse this to narrow huge payloads to the fields you actually need — critical for deeply nested API responses.
--selectbash
weather-goat-pp-cli <command> --agent --select id,name
weather-goat-pp-cli <command> --agent --select items.id,items.owner.name使用该参数可将庞大的响应缩小到实际需要的字段——对于深度嵌套的API响应至关重要。
Exit Codes
退出码
| Code | Meaning |
|---|---|
| 0 | Success |
| 2 | Usage error |
| 3 | Location not found (geocoding failed) |
| 5 | API error (Open-Meteo or NWS issue) |
| 7 | Rate limited (very rare; Open-Meteo is unlimited) |
| 代码 | 含义 |
|---|---|
| 0 | 成功 |
| 2 | 使用错误 |
| 3 | 地点未找到(地理编码失败) |
| 5 | API错误(Open-Meteo或NWS故障) |
| 7 | 速率限制(非常罕见;Open-Meteo无限制) |
Installation
安装方式
bash
go install github.com/mvanhorn/printing-press-library/library/other/weather-goat/cmd/weather-goat-pp-cli@latest
weather-goat-pp-cli config set-location "Your City, ST"
weather-goat-pp-cli doctorbash
go install github.com/mvanhorn/printing-press-library/library/other/weather-goat/cmd/weather-goat-pp-cli@latest
weather-goat-pp-cli config set-location "Your City, ST"
weather-goat-pp-cli doctorMCP Server
MCP服务器
bash
go install github.com/mvanhorn/printing-press-library/library/other/weather-goat/cmd/weather-goat-pp-mcp@latest
claude mcp add weather-goat-pp-mcp -- weather-goat-pp-mcpbash
go install github.com/mvanhorn/printing-press-library/library/other/weather-goat/cmd/weather-goat-pp-mcp@latest
claude mcp add weather-goat-pp-mcp -- weather-goat-pp-mcpArgument Parsing
参数解析规则
Given :
$ARGUMENTS- Empty, , or
help→ run--helpweather-goat-pp-cli --help - → CLI;
install→ MCPinstall mcp - Activity queries ("should I bike/walk/hike...") →
go <activity> [location] --agent - Severe weather ("any tornado warnings", "storms coming") →
alerts [location] --agent - Comparison ("better weather in X or Y") →
compare <loc1> <loc2> --agent - Anything else → (or morning brief if no location passed and home is configured)
forecast [location]
针对:
$ARGUMENTS- 为空、或
help→ 执行--helpweather-goat-pp-cli --help - → 安装CLI;
install→ 安装MCPinstall mcp - 活动查询(“我适合骑车/步行/徒步吗...”) → 执行
go <activity> [location] --agent - 恶劣天气查询(“有龙卷风预警吗”“风暴要来吗”) → 执行
alerts [location] --agent - 对比查询(“X和Y哪个地方天气更好”) → 执行
compare <loc1> <loc2> --agent - 其他情况 → 执行(如果未传入地点且已配置家庭所在地,则执行晨间简报)
forecast [location]
Agent Workflow Features
Agent工作流功能
This CLI exposes three shared agent-workflow capabilities patched in from cli-printing-press PR #218.
本CLI提供三个从cli-printing-press PR #218移植的通用Agent工作流功能。
Named profiles
命名配置文件
Persist a set of flags under a name and reuse them across invocations.
bash
undefined将一组标志持久化为名称,并在多次调用中复用。
bash
undefinedSave the current non-default flags as a named profile
将当前非默认标志保存为命名配置文件
weather-goat-pp-cli profile save <name>
weather-goat-pp-cli profile save <name>
Use a profile — overlays its values onto any flag you don't set explicitly
使用配置文件——其值将覆盖未显式设置的标志
weather-goat-pp-cli --profile <name> <command>
weather-goat-pp-cli --profile <name> <command>
List / inspect / remove
列出/查看/删除
weather-goat-pp-cli profile list
weather-goat-pp-cli profile show <name>
weather-goat-pp-cli profile delete <name> --yes
Flag precedence: explicit flag > env var > profile > default.weather-goat-pp-cli profile list
weather-goat-pp-cli profile show <name>
weather-goat-pp-cli profile delete <name> --yes
标志优先级:显式标志 > 环境变量 > 配置文件 > 默认值。--deliver
--deliver
Route command output to a sink other than stdout. Useful when an agent needs to hand a result to a file, a webhook, or another process without plumbing.
bash
weather-goat-pp-cli <command> --deliver file:/path/to/out.json
weather-goat-pp-cli <command> --deliver webhook:https://hooks.example/inFile sinks write atomically (tmp + rename). Webhook sinks POST (or when is set). Unknown schemes produce a structured refusal listing the supported set.
application/jsonapplication/x-ndjson--compact将命令输出路由到stdout以外的目标。当Agent需要将结果传递到文件、webhook或其他进程时非常有用,无需额外管道配置。
bash
weather-goat-pp-cli <command> --deliver file:/path/to/out.json
weather-goat-pp-cli <command> --deliver webhook:https://hooks.example/in文件目标采用原子写入(先写入临时文件再重命名)。Webhook目标以格式POST(当设置时为格式)。未知协议会返回结构化拒绝信息,并列出支持的协议类型。
application/json--compactapplication/x-ndjsonfeedback
feedback
Record in-band feedback about this CLI from the agent side of the loop. Local-only by default; safe to call without configuration.
bash
weather-goat-pp-cli feedback "what surprised you or tripped you up"
weather-goat-pp-cli feedback list # show local entries
weather-goat-pp-cli feedback clear --yes # wipeEntries append to as JSON lines. When is set and either is passed or , the entry is also POSTed upstream (non-blocking — local write always succeeds).
~/.weather-goat-pp-cli/feedback.jsonlWEATHER_GOAT_FEEDBACK_ENDPOINT--sendWEATHER_GOAT_FEEDBACK_AUTO_SEND=true从Agent侧记录关于本CLI的即时反馈。默认仅本地存储;无需配置即可安全调用。
bash
weather-goat-pp-cli feedback "what surprised you or tripped you up"
weather-goat-pp-cli feedback list # 显示本地记录
weather-goat-pp-cli feedback clear --yes # 清空记录记录以JSON行格式追加到。当设置且传入参数或设置时,记录还会被POST到上游服务器(非阻塞——本地写入始终成功)。
~/.weather-goat-pp-cli/feedback.jsonlWEATHER_GOAT_FEEDBACK_ENDPOINT--sendWEATHER_GOAT_FEEDBACK_AUTO_SEND=true