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 "<query>" [OPTIONS]
选项:
--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 DOMAIN (可重复)
--exclude-domains DOMAIN (可重复)
--from DATE ISO 8601 起始发布日期
--to DATE ISO 8601 结束发布日期
--location CC 两位国家代码,用于地理偏向
contents — 获取页面内容
cli-anything-exa contents <url> [url ...] [--content text|highlights|summary] [--freshness smart|always|never]
server status — 验证 API 密钥和连接状态
cli-anything-exa server status
JSON 输出
所有命令在根级别支持 --json 参数,输出机器可读的结果:
cli-anything-exa --json search "latest LLM papers" --num-results 5
常见智能体模式
快速关键词查找
cli-anything-exa --json search "site:arxiv.org transformer architectures" --type fast --content highlights
某个主题的深度研究
cli-anything-exa --json search "EU AI Act compliance requirements 2024" --type deep --content text
学术论文发现
cli-anything-exa --json search "retrieval augmented generation" --category research-paper --num-results 20
公司情报
cli-anything-exa --json search "Anthropic funding history" --category company
新闻监控
cli-anything-exa --json search "AI regulation news" --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字段中显示