Join our live event on April 7th to learn how to build with Tavily! Register Here

product4 min read

Tavily CLI

The Tavily CLI gives agents a native way to access the web from the terminal. Run search, extract, crawl, and research as simple commands with structured output designed for agent workflows.

By Tavily Team

March 26, 2026

Tavily CLI

Why CLI?

Agents already live in the terminal, from OpenClaw to Claude Code to Codex. They plan, write code, execute and iterate through commands. When they need web data they should run a command. The Tavily CLI makes that possible, with every command returning optional structured --json output that agents can parse directly.

Install in one line

Get started directly from your terminal:

curl -fsSL https://cli.tavily.com/install.sh | bash

tvly login

Run your first queries:

tvly search "latest developments in AI agents" --json

tvly extract “https://docs.openclaw.ai/tools/tavily” --json

tvly crawl “https://docs.tavily.com/welcome” --objective "find documentation on n8n integration" --json

tvly research "competitive landscape of AI code assistants" --json

What your agent can do

Search the web in natural language

Agents do not need to construct keyword queries. They can express intent directly and get results that are already shaped for reasoning.

tvly search "Series B AI infrastructure companies founded after 2023" --json

Results come back ranked, filtered, and compressed for LLM use. No raw HTML, no scraping step, no cleanup required before the data is usable.

Use search as part of a reasoning loop

Search is not a one-off call. Agents can use it iteratively.

They can:

All within the same task.

How agents actually use it

A typical loop looks like this:

  1. The agent identifies a gap in its knowledge
  2. It runs a Tavily search command
  3. It parses the structured results
  4. It continues reasoning with fresh information

That simplicity matters because agents are sensitive to friction. The fewer steps between “need information” and “get information,” the more reliable the system becomes.

Get started

Install the CLI, add your API key, and give your agent something that requires real-world knowledge.

curl -fsSL https://cli.tavily.com/install.sh | bash

tvly login
tvly search "your first query" --json

Try a simple query first.

Then try something harder. Ask for comparisons. Ask for recent developments. Ask for synthesis across sources.

Watch how the agent interacts with the web.

That’s where it clicks.