Ivy.Exa.Cli 1.0.3

dotnet tool install --global Ivy.Exa.Cli --version 1.0.3
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Ivy.Exa.Cli --version 1.0.3
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Ivy.Exa.Cli&version=1.0.3
                    
nuke :add-package Ivy.Exa.Cli --version 1.0.3
                    

Exa CLI Tool

A command-line interface for the Exa API that provides search, research, and web content retrieval capabilities with beautiful console output.

Installation

Install as a global .NET tool:

dotnet tool install -g Ivy.Exa.Cli

Prerequisites

You must set the EXA_API_KEY environment variable with your Exa API key:

Windows (PowerShell)

$env:EXA_API_KEY = "your-api-key-here"

Windows (Command Prompt)

set EXA_API_KEY=your-api-key-here

macOS/Linux

export EXA_API_KEY="your-api-key-here"

To make it permanent, add it to your shell profile (e.g., ~/.bashrc, ~/.zshrc, or ~/.profile).

Commands

Search for content using the Exa API:

# Basic search
exa search "artificial intelligence"

# Search with options
exa search "machine learning" --num-results 5 --use-autoprompt

# Search specific domains
exa search "quantum computing" --include-domains "arxiv.org,wikipedia.org"

# Search with content filters
exa search "climate change" --include-text "renewable energy" --exclude-text "fossil fuels"

Options:

  • -n, --num-results <NUMBER> - Number of results (default: 10, max: 10)
  • --include-domains <DOMAINS> - Comma-separated domains to include
  • --exclude-domains <DOMAINS> - Comma-separated domains to exclude
  • --type <TYPE> - Search type: keyword, neural, hybrid, fast, auto (default: auto)
  • --category <CATEGORY> - Data category: company, research paper, news, pdf, github, tweet, personal site, linkedin profile, financial report
  • --use-autoprompt - Convert query to Exa format
  • --include-text <TEXT> - Comma-separated text that must appear
  • --exclude-text <TEXT> - Comma-separated text that must not appear

Similar

Find content similar to a given URL:

# Find similar content
exa similar "https://en.wikipedia.org/wiki/Machine_learning"

# Limit results
exa similar "https://arxiv.org/abs/2103.00020" --num-results 3

Options:

  • -n, --num-results <NUMBER> - Number of results to return
  • --include-domains <DOMAINS> - Comma-separated domains to include
  • --exclude-domains <DOMAINS> - Comma-separated domains to exclude
  • --category <CATEGORY> - Data category to focus on

Contents

Retrieve content from specific URLs:

# Get content from one URL
exa contents "https://example.com"

# Get content from multiple URLs
exa contents "https://example.com,https://another.com"

# Limit content length
exa contents "https://example.com" --max-chars 500

Options:

  • --max-chars <NUMBER> - Maximum characters to display per content (default: 1000)

Research

Create and manage research tasks:

# Create a research task
exa research "Latest developments in renewable energy"

# Create and wait for completion
exa research "Impact of AI on healthcare" --wait

# Custom model and wait settings
exa research "Future of quantum computing" --model exa-research --wait --max-wait 10

Options:

  • -m, --model <MODEL> - Model to use (default: exa-research)
  • -w, --wait - Wait for task completion
  • --max-wait <MINUTES> - Maximum wait time in minutes (default: 15)
  • --poll-interval <SECONDS> - Polling interval in seconds (default: 5)

Examples

Basic Usage

# Search for AI research papers
exa search "transformer neural networks" --category "research paper" --include-domains "arxiv.org"

# Find content similar to a research paper
exa similar "https://arxiv.org/abs/1706.03762" --num-results 5

# Get full content from URLs found in search
exa contents "https://arxiv.org/abs/1706.03762"

# Research a specific topic
exa research "Explain the attention mechanism in transformer models" --wait

Advanced Usage

# Complex search with multiple filters
exa search "machine learning" \
  --type neural \
  --category "research paper" \
  --include-domains "arxiv.org,acl-anthology.org" \
  --include-text "attention,transformer" \
  --num-results 10

# Research with custom settings
exa research "Compare different approaches to neural machine translation" \
  --model exa-research \
  --wait \
  --max-wait 20 \
  --poll-interval 10

Output

The CLI tool provides beautifully formatted output using:

  • Tables for search results with titles, URLs, and relevance scores
  • Panels for highlighted information like autoprompt queries and research results
  • Progress indicators for long-running operations
  • Color coding for different types of information (errors in red, success in green, etc.)

Troubleshooting

API Key Issues

If you see "EXA_API_KEY environment variable is not set":

  1. Verify your API key is set: echo $EXA_API_KEY (Linux/macOS) or echo %EXA_API_KEY% (Windows)
  2. Restart your terminal after setting the environment variable
  3. Ensure there are no extra spaces or quotes in the API key

Network Issues

  • Ensure you have internet connectivity
  • Check if your firewall or proxy is blocking HTTPS requests to api.exa.ai
  • Verify your API key is valid and has sufficient credits

Installation Issues

  • Ensure you have .NET 8.0 or later installed
  • Try updating the tool: dotnet tool update -g Ivy.Exa.Cli
  • Clear the tool cache: dotnet nuget locals all --clear

Contributing

This tool is part of the Ivy.Exa .NET SDK. For issues, feature requests, or contributions, please visit: https://github.com/ivy/exa-dotnet

License

MIT License. See the main repository for details.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.0.3 90 8/3/2025