> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mirage.strukto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# tvly CLI

> Set up the Tavily CLI.

![](https://mintcdn.com/struktoai/F9Lv_nTaj6By6crk/images/python-logo.svg?fit=max\&auto=format\&n=F9Lv_nTaj6By6crk\&q=85\&s=cf5b268d330f7db46ea5cf6083f309a1)

Node.js

Browser

![](https://mintcdn.com/struktoai/CsxMCKUyfoQQJYHB/images/cloudflare-logo.svg?fit=max\&auto=format\&n=CsxMCKUyfoQQJYHB\&q=85\&s=23668457afa14abb3b0db0f5b9c0541a)

Mirage implements the [Tavily CLI](https://github.com/tavily-ai/cli) (`tvly`)
over the [Tavily API](https://docs.tavily.com): web search, page extraction,
site crawls and maps, and deep research, printed the way `tvly` prints to a
pipe.

Create an API key in the [Tavily dashboard](https://app.tavily.com), then
register it on an existing `ws`. Without a key, `search` and `extract` run
keyless within Tavily's rate-limit cap; `crawl`, `map` and `research` need one.

> [tab] YAML
>
> ```yaml workspace.yaml theme={null}
> clis:
>   tvly:
>     cli: tvly
>     machine: in_process
>     config:
>       api_key: ${TAVILY_API_KEY}
> ```

> [tab] Python
>
> ```python theme={null}
> from mirage.commands.cli.builtin.tvly import TVLY
> from mirage.core.tavily.config import TavilyConfig
>
> config = TavilyConfig(api_key="tvly-...")
> ws.register_cli("tvly", TVLY, config)
> ```

> [tab] TypeScript
>
> ```typescript theme={null}
> import { TVLY } from '@struktoai/mirage-node'
>
> const config = { apiKey: 'tvly-...' }
> ws.registerCli('tvly', TVLY, config)
> ```

## SDK guides

> [card] [Python](https://docs.mirage.strukto.ai/python/cli/tvly.md)
>
> Every command, its flags and behavior.

> [card] [TypeScript](https://docs.mirage.strukto.ai/typescript/cli/tvly.md)
>
> Every command, its flags and behavior.

## License

| Project | Role in Mirage | License |
| - | - | - |
| [tvly](https://github.com/tavily-ai/cli) 1.0.2 | Upstream CLI; its commands, options, output and messages are adapted | [MIT](https://github.com/strukto-ai/mirage/blob/main/licenses/third_party/tavily-cli.txt) |
| [Mirage](https://github.com/strukto-ai/mirage) | Command implementation | [Apache-2.0](https://github.com/strukto-ai/mirage/blob/main/LICENSE) |

Adapted code from @tavily/core and Commander.js keeps its license in [`licenses/third_party/`](https://github.com/strukto-ai/mirage/tree/main/licenses/third_party).

See [compatibility and licenses](https://docs.mirage.strukto.ai/home/setup/clis.md#compatibility-and-licenses).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.