Exa CLI 技能 是做什麼的?
身分
- 名稱:cli-anything-exa
- 版本:1.0.0
- 類別:搜尋
- 進入點:
cli-anything-exa
此 CLI 的功能
提供一個代理原生的命令列介面給 Exa API——一個專為 AI 代理工作流程最佳化的神經搜尋引擎。支援多種模式的網路搜尋(快速、深度、深度推理),並能擷取網頁全文或重點內容。
先決條件
- Python >= 3.10
pip install cli-anything-exaexport EXA_API_KEY="your-api-key"(在 https://dashboard.exa.ai/api-keys 取得)
安裝
pip install git+https://github.com/HKUDS/CLI-Anything.git#subdirectory=exa/agent-harness
指令參考
search — 網路搜尋
cli-anything-exa search "<查詢>" [選項]
選項:
--type auto|fast|instant|deep|deep-reasoning (預設:auto)
--num-results / -n 1–100 (預設:10)
--category company|people|research-paper|news|personal-site|financial-report
--content highlights|text|summary|none (預設:highlights)
--freshness smart|always|never (預設:smart)
--include-domains 網域 (可重複)
--exclude-domains 網域 (可重複)
--from 日期 ISO 8601 起始發布日期
--to 日期 ISO 8601 結束發布日期
--location CC 兩位字母國家代碼,用於地理偏誤
contents — 擷取頁面內容
cli-anything-exa contents <網址> [網址 ...] [--content text|highlights|summary] [--freshness smart|always|never]
server status — 驗證 API 金鑰與連線狀態
cli-anything-exa server status
JSON 輸出
所有指令都支援在根層級使用 --json 以取得機器可讀的輸出:
cli-anything-exa --json search "最新的 LLM 論文" --num-results 5
常見代理模式
快速關鍵字查詢
cli-anything-exa --json search "site:arxiv.org transformer 架構" --type fast --content highlights
主題深度研究
cli-anything-exa --json search "2024 年歐盟 AI 法案合規要求" --type deep --content text
學術論文探索
cli-anything-exa --json search "檢索增強生成" --category research-paper --num-results 20
公司情報
cli-anything-exa --json search "Anthropic 融資歷史" --category company
新聞監控
cli-anything-exa --json search "AI 監管新聞" --category news --from 2024-01-01
擷取全文以進行摘要
cli-anything-exa --json contents https://example.com/article --content text
互動式 REPL
cli-anything-exa # 沒有子指令 → 進入 REPL
輸入指令時不需加上 cli-anything-exa 前綴。輸入 exit 或 quit 離開。
備註
highlights內容模式比text模式節省 10 倍的 token 用量——在代理管線中建議優先使用--type deep觸發多步驟推理;速度較慢但能綜合多個來源的資訊--category company和--category people不支援日期或排除網域過濾- 每次查詢的費用會顯示在 JSON 輸出的
cost_dollars欄位中