treebuy-search

Installation
SKILL.md

treebuy-search

treebuy-cli search products 依關鍵字搜尋小樹購商品。

安裝

# 透過 npx skills add 安裝此技能
npx skills add https://github.com/nandemo-agent/treebuy-cli --skill treebuy-search

# 或直接使用固定版本的 CLI(建議)
npm install -g @nandemo-agent/treebuy-cli@0.1.0
# 或:npx @nandemo-agent/treebuy-cli@0.1.0 search products "Dyson"

指令

# 基本搜尋
treebuy-cli search products "Dyson"

# 排序(rank / price_asc / price_desc / new)
treebuy-cli search products "Dyson" --sort-by price_asc

# 分頁
treebuy-cli search products "Dyson" --page 2 --limit 10

# Agent/pipe 用:NDJSON + 精簡欄位
treebuy-cli search products "Dyson" --ndjson --fields id,name,selling_price,in_stock

# JSON(含 pagination)
treebuy-cli search products "Dyson" --json

重要參數

旗標 說明 預設
--sort-by rank / price_asc / price_desc / new rank
--page 頁碼(1-based) 1
--limit 每頁筆數(max 50) 20
--fields 欄位遮罩(逗號分隔) 全部

常用 Response 欄位

欄位 說明
id 商品 SKU
name 商品名稱
brand_show 品牌
selling_price 售價(NTD)
market_price 定價
promoted_price 促銷價(若有)
in_stock 是否有貨

⚠️ API query 參數名是 query,不是 q

API:GET https://v2api.treebuy.com/v2/product/search?query=...

詳細 schema 與 workflow 見 references/api.md

Related skills
Installs
1
First Seen
Mar 29, 2026