← 返回
开发者工具 Key 中文

OpenWeather CLI

Use this skill when the user wants to run, troubleshoot, or extend the owget CLI for geocoding, current weather, and 5-day forecasts with OpenWeatherMap.
当用户需要运行、排错或扩展基于OpenWeatherMap的owget CLI以获取地理编码、当前天气和5天预报时使用此技能。
parinll parinll 来源
开发者工具 clawhub v1.1.3 1 版本 100000 Key: 需要
★ 0
Stars
📥 612
下载
💾 13
安装
1
版本
#cli#latest#openweather#openweatherm#openweathermap#weather

概述

OpenWeather CLI Skill

Instruction-only skill document for using and troubleshooting owget (OpenWeather CLI).

Skill Purpose and Trigger Scenarios

  • The user wants current weather, forecast, or geocoding (geo) results.
  • The user asks how to run owget commands or use parameters.
  • The user reports API key issues, HTTP errors, or city lookup failures.

Install from GitHub

  • GitHub: https://github.com/ParinLL/OpenWeatherMap-script

Recommended install:

git clone https://github.com/ParinLL/OpenWeatherMap-script.git
cd OpenWeatherMap-script
go install .

This installs owget into your Go bin directory (for example, $GOPATH/bin or $HOME/go/bin).

Required Environment Variables / Permissions

Required environment variable:

export OPENWEATHER_API_KEY="your-api-key"
  • Requires the go toolchain for build/install.
  • System-wide installation into protected directories (for example, /usr/local/bin) requires admin privileges and prior source review.
  • Never expose full API keys in outputs; debug request logs should redact credential query params (for example, appid).

How to Use the Binary

After installation, make sure owget is available in your shell:

owget --help

If your shell cannot find it, add your Go bin path to PATH:

export PATH="$PATH:$(go env GOPATH)/bin"

Core command patterns:

  • Current weather by coordinates:
  • owget weather
  • Example: owget weather 25.0330 121.5654
  • Current weather by city:
  • owget city ""
  • Example: owget city "Taipei,TW"
  • 5-day forecast:
  • owget forecast
  • Example: owget forecast 25.0330 121.5654
  • 5-day forecast by city:
  • owget city "" forecast
  • Example: owget city "Taipei,TW" forecast
  • Geocoding lookup:
  • owget geo ""
  • Example: owget geo "New York,US"

Useful flags:

  • --detail: show extended fields (for example pressure, wind, sunrise/sunset, visibility).
  • --debug: print HTTP debug information for troubleshooting. Sensitive query parameters are redacted.

Common usage flow:

  1. Export OPENWEATHER_API_KEY.
  2. Run owget geo "" if you need to verify location naming.
  3. Use owget weather ... or owget forecast ... for actual weather data.
  4. Add --detail for richer output, and --debug only when troubleshooting.

Common Troubleshooting

  • error: OPENWEATHER_API_KEY env is required
  • The env var is not set. Run export OPENWEATHER_API_KEY="..." first.
  • API returns 401
  • API key is invalid, expired, or mistyped. Re-check your OpenWeatherMap key.
  • API returns 404 or city not found
  • Use City,Country format (for example, Taipei,TW) and verify with owget geo "" first.
  • Concern about credential leakage while using debug mode
  • Debug request URLs are redacted for sensitive params, but avoid long-running debug in shared/logged environments.

版本历史

共 1 个版本

  • v1.1.3 当前
    2026-03-29 19:22 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

CodeConductor.ai

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

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 194 📥 67,409
knowledge-management

GNews CLI

parinll
用于安装、配置或排查 GitHub 上的 GNews 二进制文件,以及按国家、类别等获取 GNews 头条新闻。
★ 0 📥 598