OpenWeatherMap CLI Skill
Instruction-only skill document for using and troubleshooting owget (OpenWeatherMap 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
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 <lat> <lon>
- Example:
owget weather 25.0330 121.5654
- Current weather by city:
owget city "<City,Country>"
- Example:
owget city "Taipei,TW"
- 5-day forecast:
owget forecast <lat> <lon>
- Example:
owget forecast 25.0330 121.5654
- 5-day forecast by city:
owget city "<City,Country>" forecast
- Example:
owget city "Taipei,TW" forecast
- Geocoding lookup:
owget geo "<query>"
- 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:
- Export
OPENWEATHER_API_KEY.
- Run
owget geo "<City,Country>" if you need to verify location naming.
- Use
owget weather ... or owget forecast ... for actual weather data.
- 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 "<query>" 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---2name: openweather-cli3description: 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.4---56# OpenWeatherMap CLI Skill78Instruction-only skill document for using and troubleshooting `owget` (OpenWeatherMap CLI).910## Skill Purpose and Trigger Scenarios1112- The user wants current weather, forecast, or geocoding (`geo`) results.13- The user asks how to run `owget` commands or use parameters.14- The user reports API key issues, HTTP errors, or city lookup failures.1516## Install from GitHub1718- GitHub: https://github.com/ParinLL/OpenWeatherMap-script1920Recommended install:2122```bash23git clone https://github.com/ParinLL/OpenWeatherMap-script.git24cd OpenWeatherMap-script25go install .26```2728This installs `owget` into your Go bin directory (for example, `$GOPATH/bin` or `$HOME/go/bin`).2930## Required Environment Variables / Permissions3132Required environment variable:3334```bash35export OPENWEATHER_API_KEY="your-api-key"36```3738- Requires the `go` toolchain for build/install.39- System-wide installation into protected directories (for example, `/usr/local/bin`) requires admin privileges and prior source review.40- Never expose full API keys in outputs; debug request logs should redact credential query params (for example, `appid`).4142## How to Use the Binary4344After installation, make sure `owget` is available in your shell:4546```bash47owget --help48```4950If your shell cannot find it, add your Go bin path to `PATH`:5152```bash53export PATH="$PATH:$(go env GOPATH)/bin"54```5556Core command patterns:5758- Current weather by coordinates:59 - `owget weather <lat> <lon>`60 - Example: `owget weather 25.0330 121.5654`61- Current weather by city:62 - `owget city "<City,Country>"`63 - Example: `owget city "Taipei,TW"`64- 5-day forecast:65 - `owget forecast <lat> <lon>`66 - Example: `owget forecast 25.0330 121.5654`67- 5-day forecast by city:68 - `owget city "<City,Country>" forecast`69 - Example: `owget city "Taipei,TW" forecast`70- Geocoding lookup:71 - `owget geo "<query>"`72 - Example: `owget geo "New York,US"`7374Useful flags:7576- `--detail`: show extended fields (for example pressure, wind, sunrise/sunset, visibility).77- `--debug`: print HTTP debug information for troubleshooting. Sensitive query parameters are redacted.7879Common usage flow:80811. Export `OPENWEATHER_API_KEY`.822. Run `owget geo "<City,Country>"` if you need to verify location naming.833. Use `owget weather ...` or `owget forecast ...` for actual weather data.844. Add `--detail` for richer output, and `--debug` only when troubleshooting.8586## Common Troubleshooting8788- `error: OPENWEATHER_API_KEY env is required`89 - The env var is not set. Run `export OPENWEATHER_API_KEY="..."` first.90- API returns `401`91 - API key is invalid, expired, or mistyped. Re-check your OpenWeatherMap key.92- API returns `404` or city not found93 - Use `City,Country` format (for example, `Taipei,TW`) and verify with `owget geo "<query>"` first.94- Concern about credential leakage while using debug mode95 - Debug request URLs are redacted for sensitive params, but avoid long-running debug in shared/logged environments.