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
65 changes: 65 additions & 0 deletions docs/adapters/browser/binance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Binance

**Mode**: :globe_with_meridians: Public API · **Domain**: `data-api.binance.vision`

## Commands

| Command | Description |
|---------|-------------|
| `opencli binance top` | Top trading pairs by 24h volume |
| `opencli binance price` | Quick price check for a trading pair |
| `opencli binance prices` | Latest prices for all trading pairs |
| `opencli binance ticker` | 24h ticker statistics for top pairs by volume |
| `opencli binance gainers` | Top gaining pairs by 24h price change |
| `opencli binance losers` | Top losing pairs by 24h price change |
| `opencli binance trades` | Recent trades for a trading pair |
| `opencli binance depth` | Order book bid prices for a trading pair |
| `opencli binance asks` | Order book ask prices for a trading pair |
| `opencli binance klines` | Candlestick/kline data for a trading pair |
| `opencli binance pairs` | List active trading pairs on Binance |

## Usage Examples

```bash
# Top trading pairs by volume
opencli binance top --limit 10

# Check price for a specific pair
opencli binance price --symbol BTCUSDT
opencli binance price --symbol ETHUSDT

# All prices
opencli binance prices --limit 30

# 24h ticker stats
opencli binance ticker --limit 10

# Top gainers and losers
opencli binance gainers --limit 5
opencli binance losers --limit 5

# Recent trades for BTC
opencli binance trades --symbol BTCUSDT --limit 10

# Order book bid and ask prices
opencli binance depth --symbol BTCUSDT --limit 5
opencli binance asks --symbol BTCUSDT --limit 5

# Daily candlestick data
opencli binance klines --symbol BTCUSDT --interval 1d --limit 7

# Hourly candles
opencli binance klines --symbol ETHUSDT --interval 1h --limit 24

# List trading pairs
opencli binance pairs --limit 10

# JSON output
opencli binance top --limit 5 -f json
```

## Notes

- All endpoints use Binance's public data API (no authentication required)
- Symbols are uppercase (e.g., BTCUSDT, ETHUSDT, BNBUSDT)
- Kline intervals: 1m, 5m, 15m, 1h, 4h, 1d, 1w, 1M
23 changes: 23 additions & 0 deletions docs/adapters/browser/douban.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Douban

**Mode**: 🌐 Public · **Domain**: `douban.com`

## Commands

| Command | Description |
|---------|-------------|
| `opencli douban movie-hot` | Hot movies on Douban |
| `opencli douban book-hot` | Hot books on Douban |
| `opencli douban search` | Search Douban |

## Usage Examples

```bash
opencli douban movie-hot --limit 10
opencli douban book-hot --limit 10
opencli douban search --query "三体"
```

## Prerequisites

None — public data, no login required.
37 changes: 37 additions & 0 deletions docs/adapters/browser/github-trending.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# GitHub Trending

**Mode**: 🔐 Browser · **Domain**: `github.com`

## Commands

| Command | Description |
|---------|-------------|
| `opencli github-trending repos` | Trending repositories |
| `opencli github-trending developers` | Trending developers |

## Usage Examples

```bash
# Daily trending repos
opencli github-trending repos --limit 10

# Weekly trending
opencli github-trending repos --since weekly

# Trending Python repos
opencli github-trending repos --language python

# Trending Rust repos this month
opencli github-trending repos --language rust --since monthly

# Trending developers
opencli github-trending developers --limit 10

# JSON output
opencli github-trending repos --limit 5 -f json
```

## Prerequisites

- Chrome running
- [Browser Bridge extension](/guide/browser-bridge) installed
24 changes: 24 additions & 0 deletions docs/adapters/browser/sinablog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Sina Blog

**Mode**: 🌐 Public · **Domain**: `blog.sina.com.cn`

## Commands

| Command | Description |
|---------|-------------|
| `opencli sinablog hot` | Hot blog posts |
| `opencli sinablog search` | Search blog posts |
| `opencli sinablog article` | Read a blog article |
| `opencli sinablog user` | User's blog posts |

## Usage Examples

```bash
opencli sinablog hot --limit 10
opencli sinablog search --query "科技"
opencli sinablog user --username someone
```

## Prerequisites

None — public data, no login required.
23 changes: 23 additions & 0 deletions docs/adapters/browser/substack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Substack

**Mode**: 🌐 Public · **Domain**: `substack.com`

## Commands

| Command | Description |
|---------|-------------|
| `opencli substack search` | Search Substack publications |
| `opencli substack feed` | Publication feed |
| `opencli substack publication` | Publication info |

## Usage Examples

```bash
opencli substack search --query "AI"
opencli substack feed --name "platformer"
opencli substack publication --name "platformer"
```

## Prerequisites

None — public data, no login required.
78 changes: 78 additions & 0 deletions docs/adapters/browser/weather.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Weather (Open Meteo)

**Mode**: Public API + Browser · **Domain**: `api.open-meteo.com`

Free worldwide weather data powered by [Open Meteo](https://open-meteo.com). No API key required.

## Commands

| Command | Description |
|---------|-------------|
| `opencli weather current` | Current weather for a city |
| `opencli weather forecast` | 7-day daily forecast |
| `opencli weather hourly` | Hourly forecast (next 24h) |
| `opencli weather search` | Search for cities (geocoding) |
| `opencli weather air-quality` | Current air quality index |
| `opencli weather sunrise` | Sunrise/sunset times and UV index |
| `opencli weather wind` | Detailed wind forecast |
| `opencli weather precipitation` | Rain and snow forecast |
| `opencli weather compare` | Compare weather across cities |
| `opencli weather history` | Historical weather data |

## Usage Examples

```bash
# Current weather
opencli weather current Tokyo
opencli weather current "New York"
opencli weather current London -f json

# 7-day forecast
opencli weather forecast Paris
opencli weather forecast Berlin --days 14

# Hourly forecast
opencli weather hourly Sydney --hours 12

# Search for a city (no browser needed)
opencli weather search "San Francisco"
opencli weather search Mumbai --limit 10

# Air quality
opencli weather air-quality Beijing
opencli weather air-quality "Los Angeles"

# Sunrise and sunset times
opencli weather sunrise Tokyo --days 14

# Wind forecast
opencli weather wind Chicago --hours 48

# Precipitation forecast
opencli weather precipitation London --days 10

# Compare multiple cities
opencli weather compare "Tokyo,London,Paris,New York"

# Historical weather (past 30 days)
opencli weather history Berlin --days 30

# JSON output for scripting
opencli weather current Tokyo -f json
opencli weather forecast London -f json
```

## Notes

- The `search` command uses a simple fetch pipeline (no browser needed)
- All other commands use browser mode for the 2-step geocoding lookup (city name -> coordinates -> weather data)
- City names with spaces must be quoted: `"New York"`, `"San Francisco"`
- Temperature is in Celsius, wind in km/h, precipitation in mm
- Air quality uses US AQI scale (0-500)
- Historical data supports up to 92 past days
- Forecast supports up to 16 days ahead

## Prerequisites

- Chrome running with [Browser Bridge extension](/guide/browser-bridge) installed
- No API key or login required - Open Meteo is completely free
32 changes: 32 additions & 0 deletions src/clis/binance/asks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
site: binance
name: asks
description: Order book ask prices for a trading pair
domain: data-api.binance.vision
strategy: public
browser: false

args:
symbol:
type: str
required: true
positional: true
description: "Trading pair symbol (e.g. BTCUSDT, ETHUSDT)"
limit:
type: int
default: 10
description: Number of price levels (5, 10, 20, 50, 100)

pipeline:
- fetch:
url: https://data-api.binance.vision/api/v3/depth?symbol=${{ args.symbol }}&limit=${{ args.limit }}

- select: asks

- map:
rank: ${{ index + 1 }}
ask_price: ${{ item.0 }}
ask_qty: ${{ item.1 }}

- limit: ${{ args.limit }}

columns: [rank, ask_price, ask_qty]
32 changes: 32 additions & 0 deletions src/clis/binance/depth.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
site: binance
name: depth
description: Order book bid prices for a trading pair
domain: data-api.binance.vision
strategy: public
browser: false

args:
symbol:
type: str
required: true
positional: true
description: "Trading pair symbol (e.g. BTCUSDT, ETHUSDT)"
limit:
type: int
default: 10
description: Number of price levels (5, 10, 20, 50, 100)

pipeline:
- fetch:
url: https://data-api.binance.vision/api/v3/depth?symbol=${{ args.symbol }}&limit=${{ args.limit }}

- select: bids

- map:
rank: ${{ index + 1 }}
bid_price: ${{ item.0 }}
bid_qty: ${{ item.1 }}

- limit: ${{ args.limit }}

columns: [rank, bid_price, bid_qty]
33 changes: 33 additions & 0 deletions src/clis/binance/gainers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
site: binance
name: gainers
description: Top gaining trading pairs by 24h price change
domain: data-api.binance.vision
strategy: public
browser: false

args:
limit:
type: int
default: 10
description: Number of trading pairs

pipeline:
- fetch:
url: https://data-api.binance.vision/api/v3/ticker/24hr

- filter: item.priceChangePercent

- sort:
by: priceChangePercent
order: desc

- map:
rank: ${{ index + 1 }}
symbol: ${{ item.symbol }}
price: ${{ item.lastPrice }}
change_24h: ${{ item.priceChangePercent }}
volume: ${{ item.quoteVolume }}

- limit: ${{ args.limit }}

columns: [rank, symbol, price, change_24h, volume]
36 changes: 36 additions & 0 deletions src/clis/binance/klines.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
site: binance
name: klines
description: Candlestick/kline data for a trading pair
domain: data-api.binance.vision
strategy: public
browser: false

args:
symbol:
type: str
required: true
positional: true
description: "Trading pair symbol (e.g. BTCUSDT, ETHUSDT)"
interval:
type: str
default: 1d
description: "Kline interval (1m, 5m, 15m, 1h, 4h, 1d, 1w, 1M)"
limit:
type: int
default: 10
description: Number of klines (max 1000)

pipeline:
- fetch:
url: https://data-api.binance.vision/api/v3/klines?symbol=${{ args.symbol }}&interval=${{ args.interval }}&limit=${{ args.limit }}

- map:
open: ${{ item.1 }}
high: ${{ item.2 }}
low: ${{ item.3 }}
close: ${{ item.4 }}
volume: ${{ item.5 }}

- limit: ${{ args.limit }}

columns: [open, high, low, close, volume]
Loading
Loading