Tavily CLI Usage
Use Tavily search capabilities directly from the command line.Prerequisites
Commands
List Available Tools
Get Tool Info
Check Tool Health
Show Usage Example
Test Tool (Dry Run)
Test Tool (Live)
Running Agents with Tavily
Simple Search Agent
With Configuration File
Createagent.yaml:
JSON Output
Environment Variables
| Variable | Required | Description |
|---|---|---|
TAVILY_API_KEY | Yes | Your Tavily API key |
OPENAI_API_KEY | Yes | OpenAI API key for the agent |
CLI Options
Global Options
| Option | Description |
|---|---|
--json | Output in JSON format |
--verbose | Enable verbose logging |
--output <format> | Output format: json, text, pretty |
Tools Subcommand Options
| Command | Options | Description |
|---|---|---|
tools list | --tag <tag> | Filter by tag |
tools info <id> | --verbose | Show detailed info |
tools doctor | - | Check all tools health |
tools test <id> | --live | Run live API test |
tools example <id> | - | Show usage example |
tools add <pkg> | - | Register npm package |
Examples
Search with Specific Options
Multi-Tool Agent
Batch Processing
With Custom Model
Troubleshooting
Missing API Key
Package Not Installed
Rate Limiting
Related
- Tavily Code Usage - Programmatic usage guide
- Tools Registry - All available tools
- CLI Reference - Full CLI documentation

