← 返回
开发者工具

Weather Cli

获取全球城市天气预报(使用 wttr.in 免费 API)
获取全球城市天气预报(使用 wttr.in 免费 API)
nickcen
开发者工具 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 498
下载
💾 14
安装
1
版本
#latest

概述

Weather CLI

免费、无需 API Key 的全球天气预报工具。

安装依赖

确保已安装 curljq

apt-get install -y curl jq  # Debian/Ubuntu

使用

# 获取北京天气(默认摄氏度)
weather Beijing

# 华氏温度
weather "New York" --unit f

# 获取特定城市的详细天气
weather "London" --full

# JSON 格式输出(用于脚本处理)
weather Tokyo --json

参数

参数说明必需
------------------
location城市名称(支持英文/中文)
--unit温度单位:c(摄氏度)或 f(华氏度)否,默认 c
--full显示完整天气信息(湿度、风速、气压)
--json输出 JSON 格式

示例输出

$ weather "Beijing"
北京, CN
═══════════════════════════════════════════
🌡️  温度: 15°C
☁️  天气: 晴
💨 风速: 3.6 km/h
💧 湿度: 45%

依赖

  • curl: HTTP 请求
  • jq: JSON 解析(仅 --json 模式需要)

数据来源

天气数据来自 wttr.in - 一个免费的无 API 限制天气服务。

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-19 18:18 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 666 📥 323,775
developer-tools

Agent Browser

matrixy
专为AI智能体优化的无头浏览器自动化CLI,支持无障碍树快照和基于引用的元素选择。
★ 425 📥 118,016
developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 65 📥 179,823