tavily-cli
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTavily CLI
Tavily CLI
Web search, content extraction, site crawling, URL discovery, and deep research. Returns JSON optimized for LLM consumption.
Run or for full option details.
tvly --helptvly <command> --help网页搜索、内容提取、网站爬取、URL发现以及深度调研。返回针对LLM处理优化的JSON格式结果。
运行或查看完整选项详情。
tvly --helptvly <command> --helpPrerequisites
前提条件
Must be installed and authenticated. Check with .
tvly --statusbash
tavily v0.1.0
> Authenticated via OAuth (tvly login)If not ready:
bash
curl -fsSL https://cli.tavily.com/install.sh | bashOr manually: /
uv tool install tavily-clipip install tavily-cliThen authenticate:
bash
tvly login --api-key tvly-YOUR_KEY必须完成安装和身份验证。可通过检查状态。
tvly --statusbash
tavily v0.1.0
> 已通过OAuth完成身份验证 (tvly login)若未准备好:
bash
curl -fsSL https://cli.tavily.com/install.sh | bash或手动安装: /
uv tool install tavily-clipip install tavily-cli然后进行身份验证:
bash
tvly login --api-key tvly-YOUR_KEYor: export TAVILY_API_KEY=tvly-YOUR_KEY
或:export TAVILY_API_KEY=tvly-YOUR_KEY
or: tvly login (opens browser for OAuth)
或:tvly login (打开浏览器进行OAuth验证)
undefinedundefinedWorkflow
工作流程
Follow this escalation pattern — start simple, escalate when needed:
- Search — No specific URL. Find pages, answer questions, discover sources.
- Extract — Have a URL. Pull its content directly.
- Map — Large site, need to find the right page. Discover URLs first.
- Crawl — Need bulk content from an entire site section.
- Research — Need comprehensive, multi-source analysis with citations.
| Need | Command | When |
|---|---|---|
| Find pages on a topic | | No specific URL yet |
| Get a page's content | | Have a URL |
| Find URLs within a site | | Need to locate a specific subpage |
| Bulk extract a site section | | Need many pages (e.g., all /docs/) |
| Deep research with citations | | Need multi-source synthesis |
For detailed command reference, use the individual skill for each command (e.g., , ) or run .
tavily-searchtavily-crawltvly <command> --help遵循以下递进模式——从简单操作开始,必要时升级:
- 搜索 — 无特定URL。查找页面、回答问题、发现来源。
- 提取 — 已有URL。直接提取其内容。
- 映射 — 大型网站,需要找到正确页面。先发现URL。
- 爬取 — 需要从整个网站板块获取批量内容。
- 调研 — 需要带引用的多来源综合分析。
| 需求 | 命令 | 使用场景 |
|---|---|---|
| 查找某主题的页面 | | 尚无特定URL时 |
| 获取页面内容 | | 已有URL时 |
| 查找网站内的URL | | 需要定位特定子页面时 |
| 批量提取网站板块内容 | | 需要获取大量页面(如所有/docs/下的内容)时 |
| 带引用的深度调研 | | 需要多来源综合分析时 |
如需详细命令参考,请使用各命令对应的独立技能(如、),或运行。
tavily-searchtavily-crawltvly <command> --helpOutput
输出
All commands support for structured, machine-readable output and to save to a file.
--json-obash
tvly search "react hooks" --json -o results.json
tvly extract "https://example.com/docs" -o docs.md
tvly crawl "https://docs.example.com" --output-dir ./docs/所有命令均支持参数以生成结构化、机器可读的输出,支持参数将结果保存到文件。
--json-obash
tvly search "react hooks" --json -o results.json
tvly extract "https://example.com/docs" -o docs.md
tvly crawl "https://docs.example.com" --output-dir ./docs/Tips
小贴士
- Always quote URLs — shell interprets and
?as special characters.& - Use for agentic workflows — every command supports it.
--json - Read from stdin with —
-echo "query" | tvly search - - Exit codes: 0 = success, 2 = bad input, 3 = auth error, 4 = API error.
- 始终给URL加引号 — Shell会将和
?视为特殊字符。& - 在Agent工作流中使用— 所有命令均支持该参数。
--json - 通过从标准输入读取内容 —
-echo "query" | tvly search - - 退出码:0 = 成功,2 = 输入错误,3 = 身份验证错误,4 = API错误。