天气查询 workflow:通过 weather CLI 获取当前天气、指定日期天气或小时级预报。用户提到 weather、forecast、温度、降雨、体感或天气趋势时使用。
weather 是一个基于外部 CLI 的天气查询 workflow,通过 weather 命令获取当前天气、指定日期天气或 hourly forecast,并以 JSON stdio 形式返回结构化结果。
exec_command 调用 weather CLI。weather ... --format=raw,这样 stdout 会返回 JSON。--lat 和 --lon,因为这条路径最稳定,也避免额外 geocoding。location,但要知道这依赖 geocoding,可能比坐标更慢。--format=raw --timeout 10,必要时再补 --date、--hourly、 或 。--units--source=open-meteoweather "<location>" --format=raw --timeout 10weather --lat <lat> --lon <lon> --format=raw --timeout 10weather "<location>" --date tomorrow --format=raw --timeout 10weather "<location>" --hourly --format=raw --timeout 10metric;只有用户明确要求英制单位时再加 --units imperialopen-meteo,因为它不需要 API key,且适合零配置部署。