From bde3bbee400f249e75565e032c973497b3d4101a Mon Sep 17 00:00:00 2001 From: 0xsline Date: Sat, 21 Mar 2026 23:07:33 +0800 Subject: [PATCH 1/2] feat(coingecko): add CoinGecko adapter with top, trending, search, coin commands CoinGecko (4 commands, public API, no auth needed): - top: top cryptocurrencies by market cap with price and 24h change - trending: trending coins on CoinGecko - search: search for cryptocurrencies by name - coin: detailed info for a specific coin (price, 24h/7d/30d change, ATH) Supports multi-currency pricing via --currency flag (usd, eur, aud, etc.) --- docs/adapters/browser/coingecko.md | 38 ++++++++++++++++++++++++++++++ src/clis/coingecko/coin.yaml | 33 ++++++++++++++++++++++++++ src/clis/coingecko/search.yaml | 33 ++++++++++++++++++++++++++ src/clis/coingecko/top.yaml | 33 ++++++++++++++++++++++++++ src/clis/coingecko/trending.yaml | 30 +++++++++++++++++++++++ 5 files changed, 167 insertions(+) create mode 100644 docs/adapters/browser/coingecko.md create mode 100644 src/clis/coingecko/coin.yaml create mode 100644 src/clis/coingecko/search.yaml create mode 100644 src/clis/coingecko/top.yaml create mode 100644 src/clis/coingecko/trending.yaml diff --git a/docs/adapters/browser/coingecko.md b/docs/adapters/browser/coingecko.md new file mode 100644 index 00000000..e9dcb17e --- /dev/null +++ b/docs/adapters/browser/coingecko.md @@ -0,0 +1,38 @@ +# CoinGecko + +**Mode**: ๐ŸŒ Public ยท **Domain**: `coingecko.com` + +## Commands + +| Command | Description | +|---------|-------------| +| `opencli coingecko top` | Top cryptocurrencies by market cap | +| `opencli coingecko trending` | Trending coins | +| `opencli coingecko search` | Search for cryptocurrencies | +| `opencli coingecko coin` | Detailed info for a specific coin | + +## Usage Examples + +```bash +# Top 10 coins by market cap +opencli coingecko top --limit 10 + +# Top coins priced in EUR +opencli coingecko top --currency eur + +# Trending coins +opencli coingecko trending + +# Search for a coin +opencli coingecko search --query solana + +# Detailed Bitcoin info (price, 24h/7d/30d change, ATH) +opencli coingecko coin --id bitcoin + +# JSON output +opencli coingecko top --limit 5 -f json +``` + +## Prerequisites + +None โ€” all commands use the public CoinGecko API, no browser or login required. diff --git a/src/clis/coingecko/coin.yaml b/src/clis/coingecko/coin.yaml new file mode 100644 index 00000000..e26d8c84 --- /dev/null +++ b/src/clis/coingecko/coin.yaml @@ -0,0 +1,33 @@ +site: coingecko +name: coin +description: Get detailed info for a specific cryptocurrency +domain: api.coingecko.com +strategy: public +browser: false + +args: + id: + type: str + required: true + positional: true + description: "Coin ID (e.g. bitcoin, ethereum, solana)" + +pipeline: + - fetch: + url: https://api.coingecko.com/api/v3/coins/${{ args.id }}?localization=false&tickers=false&community_data=false&developer_data=false + + - map: + name: ${{ item.name }} + symbol: ${{ item.symbol }} + rank: ${{ item.market_cap_rank }} + price: ${{ item.market_data.current_price.usd }} + change_24h: ${{ item.market_data.price_change_percentage_24h }} + change_7d: ${{ item.market_data.price_change_percentage_7d }} + change_30d: ${{ item.market_data.price_change_percentage_30d }} + market_cap: ${{ item.market_data.market_cap.usd }} + volume: ${{ item.market_data.total_volume.usd }} + ath: ${{ item.market_data.ath.usd }} + ath_change: ${{ item.market_data.ath_change_percentage.usd }} + sentiment_up: ${{ item.sentiment_votes_up_percentage }} + +columns: [name, symbol, rank, price, change_24h, change_7d, change_30d, market_cap, ath, ath_change] diff --git a/src/clis/coingecko/search.yaml b/src/clis/coingecko/search.yaml new file mode 100644 index 00000000..09975a8a --- /dev/null +++ b/src/clis/coingecko/search.yaml @@ -0,0 +1,33 @@ +site: coingecko +name: search +description: Search for cryptocurrencies on CoinGecko +domain: api.coingecko.com +strategy: public +browser: false + +args: + query: + type: str + required: true + positional: true + description: Search query + limit: + type: int + default: 10 + description: Number of results + +pipeline: + - fetch: + url: https://api.coingecko.com/api/v3/search?query=${{ args.query }} + + - select: coins + + - map: + rank: ${{ index + 1 }} + name: ${{ item.name }} + symbol: ${{ item.symbol }} + cap_rank: ${{ item.market_cap_rank }} + + - limit: ${{ args.limit }} + +columns: [rank, name, symbol, cap_rank] diff --git a/src/clis/coingecko/top.yaml b/src/clis/coingecko/top.yaml new file mode 100644 index 00000000..c44b8789 --- /dev/null +++ b/src/clis/coingecko/top.yaml @@ -0,0 +1,33 @@ +site: coingecko +name: top +description: Top cryptocurrencies by market cap +domain: api.coingecko.com +strategy: public +browser: false + +args: + limit: + type: int + default: 20 + description: Number of coins + currency: + type: str + default: usd + description: Price currency (usd, eur, gbp, jpy, aud, cny, etc.) + +pipeline: + - fetch: + url: https://api.coingecko.com/api/v3/coins/markets?vs_currency=${{ args.currency }}&order=market_cap_desc&per_page=${{ args.limit }}&page=1 + + - map: + rank: ${{ item.market_cap_rank }} + name: ${{ item.name }} + symbol: ${{ item.symbol }} + price: ${{ item.current_price }} + change_24h: ${{ item.price_change_percentage_24h }} + market_cap: ${{ item.market_cap }} + volume: ${{ item.total_volume }} + + - limit: ${{ args.limit }} + +columns: [rank, name, symbol, price, change_24h, market_cap, volume] diff --git a/src/clis/coingecko/trending.yaml b/src/clis/coingecko/trending.yaml new file mode 100644 index 00000000..a4f2a397 --- /dev/null +++ b/src/clis/coingecko/trending.yaml @@ -0,0 +1,30 @@ +site: coingecko +name: trending +description: Trending cryptocurrencies on CoinGecko +domain: api.coingecko.com +strategy: public +browser: false + +args: + limit: + type: int + default: 15 + description: Number of coins + +pipeline: + - fetch: + url: https://api.coingecko.com/api/v3/search/trending + + - select: coins + + - map: + rank: ${{ index + 1 }} + name: ${{ item.item.name }} + symbol: ${{ item.item.symbol }} + price: ${{ item.item.data.price }} + market_cap: ${{ item.item.data.market_cap }} + cap_rank: ${{ item.item.market_cap_rank }} + + - limit: ${{ args.limit }} + +columns: [rank, name, symbol, price, market_cap, cap_rank] From aa7484641230b737918b7fe605dee4dbc7a9e305 Mon Sep 17 00:00:00 2001 From: 0xsline Date: Sat, 21 Mar 2026 23:18:02 +0800 Subject: [PATCH 2/2] feat(coingecko): add 6 more commands - price, global, categories, exchanges, gainers, losers New commands: - price: quick multi-coin price check via markets API - global: top 10 coins by market cap overview - categories: coin categories ranked by market cap (DeFi, Layer 1, etc.) - exchanges: top exchanges by trading volume with trust scores - gainers: top gaining coins by 24h change (sorted from 250 coins) - losers: top losing coins by 24h change All commands use public CoinGecko API, no auth needed. --- docs/adapters/browser/coingecko.md | 22 +++++++++++++++++ docs/adapters/browser/facebook.md | 21 ++++++++++++++--- docs/adapters/browser/instagram.md | 29 ++++++++++++++--------- src/clis/coingecko/categories.yaml | 27 +++++++++++++++++++++ src/clis/coingecko/exchanges.yaml | 28 ++++++++++++++++++++++ src/clis/coingecko/gainers.yaml | 38 ++++++++++++++++++++++++++++++ src/clis/coingecko/global.yaml | 22 +++++++++++++++++ src/clis/coingecko/losers.yaml | 35 +++++++++++++++++++++++++++ src/clis/coingecko/price.yaml | 31 ++++++++++++++++++++++++ 9 files changed, 239 insertions(+), 14 deletions(-) create mode 100644 src/clis/coingecko/categories.yaml create mode 100644 src/clis/coingecko/exchanges.yaml create mode 100644 src/clis/coingecko/gainers.yaml create mode 100644 src/clis/coingecko/global.yaml create mode 100644 src/clis/coingecko/losers.yaml create mode 100644 src/clis/coingecko/price.yaml diff --git a/docs/adapters/browser/coingecko.md b/docs/adapters/browser/coingecko.md index e9dcb17e..af0f451e 100644 --- a/docs/adapters/browser/coingecko.md +++ b/docs/adapters/browser/coingecko.md @@ -10,6 +10,12 @@ | `opencli coingecko trending` | Trending coins | | `opencli coingecko search` | Search for cryptocurrencies | | `opencli coingecko coin` | Detailed info for a specific coin | +| `opencli coingecko price` | Quick price check for multiple coins | +| `opencli coingecko global` | Global market overview (top 10) | +| `opencli coingecko categories` | Coin categories ranked by market cap | +| `opencli coingecko exchanges` | Top exchanges by trading volume | +| `opencli coingecko gainers` | Top gainers by 24h price change | +| `opencli coingecko losers` | Top losers by 24h price change | ## Usage Examples @@ -29,6 +35,22 @@ opencli coingecko search --query solana # Detailed Bitcoin info (price, 24h/7d/30d change, ATH) opencli coingecko coin --id bitcoin +# Quick price check for multiple coins +opencli coingecko price --ids "bitcoin,ethereum,solana" + +# Global market overview +opencli coingecko global + +# Coin categories (DeFi, Layer 1, etc.) +opencli coingecko categories --limit 10 + +# Top exchanges +opencli coingecko exchanges --limit 10 + +# Top gainers and losers +opencli coingecko gainers --limit 10 +opencli coingecko losers --limit 10 + # JSON output opencli coingecko top --limit 5 -f json ``` diff --git a/docs/adapters/browser/facebook.md b/docs/adapters/browser/facebook.md index f638dd52..ad34f655 100644 --- a/docs/adapters/browser/facebook.md +++ b/docs/adapters/browser/facebook.md @@ -10,12 +10,18 @@ | `opencli facebook notifications` | Get recent notifications | | `opencli facebook feed` | Get news feed posts | | `opencli facebook search` | Search people, pages, posts | +| `opencli facebook friends` | Friend suggestions | +| `opencli facebook groups` | List your joined groups | +| `opencli facebook memories` | On This Day memories | +| `opencli facebook events` | Browse event categories | +| `opencli facebook add-friend` | Send a friend request | +| `opencli facebook join-group` | Join a group | ## Usage Examples ```bash # View a profile -opencli facebook profile zuck +opencli facebook profile --username zuck # Get notifications opencli facebook notifications --limit 10 @@ -24,10 +30,19 @@ opencli facebook notifications --limit 10 opencli facebook feed --limit 5 # Search -opencli facebook search "OpenAI" --limit 5 +opencli facebook search --query "OpenAI" --limit 5 + +# List your groups +opencli facebook groups + +# Send friend request +opencli facebook add-friend --username someone + +# Join a group +opencli facebook join-group --group 123456789 # JSON output -opencli facebook profile zuck -f json +opencli facebook profile --username zuck -f json ``` ## Prerequisites diff --git a/docs/adapters/browser/instagram.md b/docs/adapters/browser/instagram.md index 054bb1d4..549a38c4 100644 --- a/docs/adapters/browser/instagram.md +++ b/docs/adapters/browser/instagram.md @@ -13,31 +13,38 @@ | `opencli instagram followers` | List user's followers | | `opencli instagram following` | List user's following | | `opencli instagram saved` | Get your saved posts | +| `opencli instagram like` | Like a post | +| `opencli instagram unlike` | Unlike a post | +| `opencli instagram comment` | Comment on a post | +| `opencli instagram save` | Bookmark a post | +| `opencli instagram unsave` | Remove bookmark | +| `opencli instagram follow` | Follow a user | +| `opencli instagram unfollow` | Unfollow a user | ## Usage Examples ```bash # View a user's profile -opencli instagram profile nasa +opencli instagram profile --username nasa # Search users -opencli instagram search nasa --limit 5 +opencli instagram search --query nasa --limit 5 # View a user's recent posts -opencli instagram user nasa --limit 10 +opencli instagram user --username nasa --limit 10 -# Discover trending posts -opencli instagram explore --limit 20 +# Like a user's most recent post +opencli instagram like --username nasa --index 1 -# List followers/following -opencli instagram followers nasa --limit 20 -opencli instagram following nasa --limit 20 +# Comment on a post +opencli instagram comment --username nasa --text "Amazing!" --index 1 -# Get your saved posts -opencli instagram saved --limit 10 +# Follow/unfollow +opencli instagram follow --username nasa +opencli instagram unfollow --username nasa # JSON output -opencli instagram profile nasa -f json +opencli instagram profile --username nasa -f json ``` ## Prerequisites diff --git a/src/clis/coingecko/categories.yaml b/src/clis/coingecko/categories.yaml new file mode 100644 index 00000000..e95bc585 --- /dev/null +++ b/src/clis/coingecko/categories.yaml @@ -0,0 +1,27 @@ +site: coingecko +name: categories +description: Cryptocurrency categories ranked by market cap +domain: api.coingecko.com +strategy: public +browser: false + +args: + limit: + type: int + default: 20 + description: Number of categories + +pipeline: + - fetch: + url: https://api.coingecko.com/api/v3/coins/categories?order=market_cap_desc + + - map: + rank: ${{ index + 1 }} + name: ${{ item.name }} + market_cap: ${{ item.market_cap }} + change_24h: ${{ item.market_cap_change_24h }} + volume_24h: ${{ item.volume_24h }} + + - limit: ${{ args.limit }} + +columns: [rank, name, market_cap, change_24h, volume_24h] diff --git a/src/clis/coingecko/exchanges.yaml b/src/clis/coingecko/exchanges.yaml new file mode 100644 index 00000000..dd3afbd4 --- /dev/null +++ b/src/clis/coingecko/exchanges.yaml @@ -0,0 +1,28 @@ +site: coingecko +name: exchanges +description: Top cryptocurrency exchanges by trading volume +domain: api.coingecko.com +strategy: public +browser: false + +args: + limit: + type: int + default: 20 + description: Number of exchanges + +pipeline: + - fetch: + url: https://api.coingecko.com/api/v3/exchanges?per_page=${{ args.limit }} + + - map: + rank: ${{ index + 1 }} + name: ${{ item.name }} + country: ${{ item.country }} + trust_score: ${{ item.trust_score }} + volume_btc: ${{ item.trade_volume_24h_btc }} + year: ${{ item.year_established }} + + - limit: ${{ args.limit }} + +columns: [rank, name, country, trust_score, volume_btc, year] diff --git a/src/clis/coingecko/gainers.yaml b/src/clis/coingecko/gainers.yaml new file mode 100644 index 00000000..6e0d8229 --- /dev/null +++ b/src/clis/coingecko/gainers.yaml @@ -0,0 +1,38 @@ +site: coingecko +name: gainers +description: Top gaining cryptocurrencies by 24h price change +domain: api.coingecko.com +strategy: public +browser: false + +args: + limit: + type: int + default: 10 + description: Number of coins + currency: + type: str + default: usd + description: Price currency + +pipeline: + - fetch: + url: https://api.coingecko.com/api/v3/coins/markets?vs_currency=${{ args.currency }}&order=market_cap_desc&per_page=250&page=1 + + - filter: item.price_change_percentage_24h + + - sort: + by: price_change_percentage_24h + order: desc + + - map: + rank: ${{ index + 1 }} + name: ${{ item.name }} + symbol: ${{ item.symbol }} + price: ${{ item.current_price }} + change_24h: ${{ item.price_change_percentage_24h }} + cap_rank: ${{ item.market_cap_rank }} + + - limit: ${{ args.limit }} + +columns: [rank, name, symbol, price, change_24h, cap_rank] diff --git a/src/clis/coingecko/global.yaml b/src/clis/coingecko/global.yaml new file mode 100644 index 00000000..c8242589 --- /dev/null +++ b/src/clis/coingecko/global.yaml @@ -0,0 +1,22 @@ +site: coingecko +name: global +description: Global cryptocurrency market overview +domain: api.coingecko.com +strategy: public +browser: false + +pipeline: + - fetch: + url: https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&order=market_cap_desc&per_page=10&page=1 + + - map: + rank: ${{ item.market_cap_rank }} + name: ${{ item.name }} + symbol: ${{ item.symbol }} + price: ${{ item.current_price }} + change_24h: ${{ item.price_change_percentage_24h }} + market_cap: ${{ item.market_cap }} + + - limit: 10 + +columns: [rank, name, symbol, price, change_24h, market_cap] diff --git a/src/clis/coingecko/losers.yaml b/src/clis/coingecko/losers.yaml new file mode 100644 index 00000000..9a8132bb --- /dev/null +++ b/src/clis/coingecko/losers.yaml @@ -0,0 +1,35 @@ +site: coingecko +name: losers +description: Top losing cryptocurrencies by 24h price change +domain: api.coingecko.com +strategy: public +browser: false + +args: + limit: + type: int + default: 10 + description: Number of coins + currency: + type: str + default: usd + description: Price currency + +pipeline: + - fetch: + url: https://api.coingecko.com/api/v3/coins/markets?vs_currency=${{ args.currency }}&order=market_cap_desc&per_page=100&page=1 + + - sort: + by: price_change_percentage_24h + + - map: + rank: ${{ index + 1 }} + name: ${{ item.name }} + symbol: ${{ item.symbol }} + price: ${{ item.current_price }} + change_24h: ${{ item.price_change_percentage_24h }} + cap_rank: ${{ item.market_cap_rank }} + + - limit: ${{ args.limit }} + +columns: [rank, name, symbol, price, change_24h, cap_rank] diff --git a/src/clis/coingecko/price.yaml b/src/clis/coingecko/price.yaml new file mode 100644 index 00000000..c1829437 --- /dev/null +++ b/src/clis/coingecko/price.yaml @@ -0,0 +1,31 @@ +site: coingecko +name: price +description: Quick price check for one or more cryptocurrencies +domain: api.coingecko.com +strategy: public +browser: false + +args: + ids: + type: str + required: true + positional: true + description: "Comma-separated coin IDs (e.g. bitcoin,ethereum,solana)" + currency: + type: str + default: usd + description: Price currency (usd, eur, gbp, aud, cny, etc.) + +pipeline: + - fetch: + url: https://api.coingecko.com/api/v3/coins/markets?vs_currency=${{ args.currency }}&ids=${{ args.ids }}&order=market_cap_desc + + - map: + coin: ${{ item.name }} + symbol: ${{ item.symbol }} + price: ${{ item.current_price }} + change_24h: ${{ item.price_change_percentage_24h }} + market_cap: ${{ item.market_cap }} + volume: ${{ item.total_volume }} + +columns: [coin, symbol, price, change_24h, market_cap, volume]