@tavilyai: Agents already live in the terminal. When they need web data, they should be able to run a command, so that's exactly w…

X AI KOLs Following Tools

Summary

Tavily CLI is a command-line tool that gives AI agents access to web search, extraction, crawling, and research, returning structured JSON output for direct parsing.

Agents already live in the terminal. When they need web data, they should be able to run a command, so that's exactly what the Tavily CLI lets them do. Search, extract, crawl, and research all return structured output that agents can parse directly, with no HTML to clean up or additional scraping in between. One line to install, and your agent has real-time web access built into whatever loop you're running. https://docs.tavily.com/documentation/tavily-cli…
Original Article
View Cached Full Text

Cached at: 06/10/26, 09:55 PM

Agents already live in the terminal. When they need web data, they should be able to run a command, so that’s exactly what the Tavily CLI lets them do.

Search, extract, crawl, and research all return structured output that agents can parse directly, with no HTML to clean up or additional scraping in between.

One line to install, and your agent has real-time web access built into whatever loop you’re running.

https://docs.tavily.com/documentation/tavily-cli…


Tavily CLI - Tavily Docs

Source: https://docs.tavily.com/documentation/tavily-cli The Tavily CLI (tvly) brings the full Tavily API to your command line. Run web searches, extract content from URLs, crawl websites, discover sitemaps, and launch deep research — all from a single tool.Every command supports\-\-jsonfor machine-readable output, making it easy to integrate into scripts, pipelines, and AI agent workflows.

Installation

Install with the official installer:

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

Or install manually:

uv tool install tavily-cli   # or: pip install tavily-cli

Verify the install:

Authentication

You need a Tavily API key to use the CLI. Get one for free attavily.com.

Check Your Auth Status

Log Out

This removes stored credentials from disk.

Session Tracking

The CLI automatically attaches a uniquesession\_idto every command it runs, so requests from the same shell invocation can be grouped together. This applies totvly search,extract,crawl,map, andresearch.To also associate requests with a specific end-user, set theTAVILY\_HUMAN\_IDenvironment variable:

export TAVILY_HUMAN_ID=h_4f9ac

Alternatively, add ahuman\_idfield to~/\.tavily/config\.json— the environment variable takes precedence if both are set.For security, Tavily hashes human IDs before processing or storing them. SeeSession Trackingin the API reference for details.

Commands

Interactive Mode

Runtvlywith no arguments to enter an interactive REPL where you can run commands without thetvlyprefix:

❯ search "latest AI news"
❯ extract https://example.com
❯ exit

Global Options

These options work with the top-leveltvlycommand:

OptionDescription\-\-versionPrint the CLI version and exit.\-\-statusPrint the version and authentication status.\-\-jsonOutput as JSON (applies to\-\-versionand\-\-status).\-\-helpShow help for any command.

tvly --version
tvly --status
tvly search --help

JSON Mode

Add\-\-jsonto any command to get machine-readable JSON output. This is useful for piping into other tools likejq, or for integration with scripts and AI agents.

# Pipe search results through jq
tvly search "AI news" --json | jq '.results[].title'

# Use in a shell script
RESULTS=$(tvly search "latest papers on RAG" --json)

All human-readable output (spinners, status messages) is written to stderr, so stdout contains only the clean JSON when\-\-jsonis used.

Environment Variables

VariableDescriptionTAVILY\_API\_KEYYour Tavily API key. Takes precedence over stored credentials. Exit Codes

CodeMeaning0Success.2Invalid input or usage error (e.g., missing required argument).3Authentication error (no API key found, or login failed).4API error (rate limit, invalid request, server error).

Uninstall

To also remove stored credentials:

rm -rf ~/.tavily ~/.mcp-auth

Similar Articles