npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ambitionax/weather-query

v1.0.4

Published

OpenClaw 天气智能提醒插件 - 支持自定义 API 与穿衣带伞建议

Readme

OpenClaw 天气智能提醒插件

提供 get_weather 工具,供 Agent 查询天气并生成穿衣、带伞等智能提醒。支持自定义天气 API 或免费 Open-Meteo。

安装

openclaw plugins install @ambitionax/weather-query
openclaw gateway restart

可选npm run build 仅用于类型检查,运行时直接加载 ./src/index.ts,无需预编译。

配置

~/.openclaw/openclaw.json 中启用并配置,按需选择一种方式:

方式一:Open-Meteo(默认,免费无需 Key)

不填 apiUrl 即使用 Open-Meteo:

{
  "plugins": {
    "entries": {
      "weather-query": {
        "enabled": true,
        "config": {
          "defaultCity": "北京",
          "units": "metric"
        }
      }
    }
  }
}

方式二:自定义 API

填写 apiUrlapiKey 等,URL 和鉴权方式按你使用的 API 文档配置:

{
  "plugins": {
    "entries": {
      "weather-query": {
        "enabled": true,
        "config": {
          "apiUrl": "https://your-api.com/weather",
          "apiKey": "your-api-key",
          "cityParam": "city",
          "authMode": "query",
          "defaultCity": "北京",
          "extraParams": {}
        }
      }
    }
  }
}

| 配置项 | 说明 | |--------|------| | apiUrl | 天气 API 地址(留空则用 Open-Meteo) | | apiKey | API Key(鉴权方式由 authMode 决定) | | cityParam | 城市参数名 | | authMode | query(URL 参数)或 header(Authorization: Bearer) | | defaultCity | 默认城市 | | extraParams | 附加参数,如 hourly、lang 等 | | units | metric(摄氏) / imperial(华氏) |

每日 8:00 智能提醒(Cron)

安装插件后,添加 Cron 任务实现每天 8:00 推送天气简报:

openclaw cron add \
  --name "早安天气简报" \
  --cron "0 8 * * *" \
  --tz "Asia/Shanghai" \
  --session isolated \
  --message "调用 get_weather 查询【北京】天气,根据温度、降水、风力、紫外线等数据,生成今日早安简报,包含:1)当前气温和体感 2)要不要带伞 3)穿衣建议(加衣/减衣/防晒) 4)其他贴心提醒。控制在150字内,语气亲切自然。" \
  --model "默认" \
  --announce \
  --channel feishu

--channel feishu--to 改为你的飞书配置。

工具说明

  • get_weather(city?, days?)
    • city: 城市名,如 北京、上海
    • days: 预报天数 1-7,默认 1

Agent 在对话中也可直接调用,例如用户问「北京今天天气怎么样」时自动查天气并回复。