Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ Run `opencli list` for the live registry.
| **bloomberg** | `main` `markets` `economics` `industries` `tech` `politics` `businessweek` `opinions` `feeds` `news` | Public / Browser |
| **ctrip** | `search` | Browser |
| **devto** | `top` `tag` `user` | Public |
| **weather** | `search` | Public |
| **arxiv** | `search` `paper` | Public |
| **wikipedia** | `search` `summary` | Public |
| **hackernews** | `top` | Public |
Expand Down
1 change: 1 addition & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ npm install -g @jackwener/opencli@latest
| **bloomberg** | `main` `markets` `economics` `industries` `tech` `politics` `businessweek` `opinions` `feeds` `news` | ε…¬ε…± API / ζ΅θ§ˆε™¨ |
| **ctrip** | `search` | ζ΅θ§ˆε™¨ |
| **devto** | `top` `tag` `user` | ε…¬εΌ€ |
| **weather** | `search` | ε…¬εΌ€ |
| **arxiv** | `search` `paper` | ε…¬εΌ€ |
| **wikipedia** | `search` `summary` | ε…¬εΌ€ |
| **hackernews** | `top` | ε…¬ε…± API |
Expand Down
25 changes: 25 additions & 0 deletions docs/adapters/browser/weather.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Weather

**Mode**: 🌐 Public · **Domain**: `wttr.in`

Fetch instant live weather globally from any city directly within your terminal window.

## Commands

| Command | Description |
|---------|-------------|
| `opencli weather search` | Get the current weather conditions for any location |

## Usage Examples

```bash
# Get the weather in London right now
opencli weather search --location "London"

# Get the weather in New York
opencli weather search --location "New York"
```

## Prerequisites

- No browser required β€” uses the fast, public `wttr.in` API.
1 change: 1 addition & 0 deletions docs/adapters/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Run `opencli list` for the live registry.
| **[hf](/adapters/browser/hf)** | `top` | 🌐 Public |
| **[sinafinance](/adapters/browser/sinafinance)** | `news` | 🌐 Public |
| **[stackoverflow](/adapters/browser/stackoverflow)** | `hot` `search` `bounties` `unanswered` | 🌐 Public |
| **[weather](/adapters/browser/weather)** | `search` | 🌐 Public |
| **[wikipedia](/adapters/browser/wikipedia)** | `search` `summary` | 🌐 Public |

## Desktop Adapters
Expand Down
27 changes: 27 additions & 0 deletions src/clis/weather/search.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
site: weather
name: search
description: Search for live weather telemetry of any global city
domain: wttr.in
strategy: public
browser: false

args:
location:
type: string
required: true
description: City name or zip code to search for (e.g. Paris, 10001)

pipeline:
- fetch:
url: "https://wttr.in/${{ args.location }}?format=j1"

- select: current_condition

- map:
condition: "${{ item.weatherDesc[0].value }}"
temp: "${{ item.temp_C }}Β°C"
feels: "${{ item.FeelsLikeC }}Β°C"
humidity: "${{ item.humidity }}%"
wind: "${{ item.windspeedKmph }} km/h"

columns: [condition, temp, feels, humidity, wind]
Loading