Get current weather and forecasts with verified location matching (no API key required).
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-weather-287aa8a22ab0 ,按照其中的说明把「weather」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Use the most reliable location match first. For Chinese city names or other non-Latin input, prefer wttr.in with the original query because it resolves native names directly. Use Open-Meteo for structured current conditions and forecasts only after you have confirmed the exact city.
country, admin1, admin2, and population.wttr.in with the original Chinese name, or geocode the English/pinyin city name instead.timezone=auto when calling Open-Meteo so the reported time matches the location.Quick current conditions:
curl -s "https://wttr.in/London?format=%l:+%c+%t+%h+%w"
Chinese city example:
curl -s "https://wttr.in/%E6%88%90%E9%83%BD?format=%l:+%c+%t+%h+%w"
curl -s "https://wttr.in/%E4%B8%8A%E6%B5%B7?format=%l:+%c+%t+%h+%w"
JSON output if you need more detail:
curl -s "https://wttr.in/Chengdu?format=j1"
Tips:
New York -> New+York?m for metric units and ?u for US unitscurl -s "https://geocoding-api.open-meteo.com/v1/search?name=Chengdu&count=3&language=en&format=json"
curl -s "https://api.open-meteo.com/v1/forecast?latitude=30.66667&longitude=104.06667¤t=temperature_2m,relative_humidity_2m,weather_code,wind_speed_10m&daily=weather_code,temperature_2m_max,temperature_2m_min&forecast_days=1&timezone=auto"
Important:
成都, geocoding name=%E6%88%90%E9%83%BD may return smaller homonym locations first. Prefer Chengdu after verifying it matches Sichuan, China.wttr.in for the original city name instead of presenting a likely wrong result.