Skip to main content

Command-line interface for Exa neural search API

Project description

exa-cli

A command-line interface for the Exa neural search API. Search the web, find similar content, fetch clean page text, and get AI-powered answers with citations.

Features

  • 🔍 Neural search with domain filtering and autoprompt optimization
  • 🔗 Find similar pages using semantic similarity
  • 📄 Batch fetch content from multiple URLs in one call
  • 🤖 AI answers with citations for quick research

Installation

pip install exa-cli

Setup

Get an API key from Exa and set it as an environment variable:

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

Or create a .env file in your project:

EXA_API_KEY=your-api-key-here

Usage

Search

Search the web using Exa's neural search:

# Basic search
exa search "best linux window managers"

# Limit results
exa search "rust async programming" --num 5

# Filter by domain
exa search "machine learning tutorials" --include github.com,arxiv.org

# Exclude domains
exa search "python frameworks" --exclude stackoverflow.com

# Disable autoprompt
exa search "exact query" --no-autoprompt

Find Similar Pages

Find pages similar to a given URL:

exa similar "https://swaywm.org" --num 5

Fetch Page Content

Get clean, readable text from one or more URLs:

# Single URL
exa contents "https://archlinux.org"

# Multiple URLs (batch fetch)
exa contents "https://archlinux.org" "https://swaywm.org" "https://github.com/linux-surface"

# Without full text
exa contents "https://example.com" --no-text

Get AI Answers

Ask a question and get an AI-generated answer with citations:

exa answer "what is the linux surface project"

# Include full text from citations
exa answer "how to install arch linux" --text

Command Reference

exa search <query>              # Search the web
exa similar <url>               # Find similar pages
exa contents <url> [<url>...]   # Fetch page content (supports multiple URLs)
exa answer <question>           # Get AI answer with citations

Common Options

  • --num, -n: Number of results (default: 10)
  • --include: Comma-separated domains to include
  • --exclude: Comma-separated domains to exclude
  • --text/--no-text: Include/exclude full text content
  • --autoprompt/--no-autoprompt: Enable/disable query optimization

Run exa --help or exa <command> --help for more details.

Development

git clone https://github.com/yourusername/exa-cli.git
cd exa-cli
uv sync
uv run pytest

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

exa_cli-0.1.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

exa_cli-0.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file exa_cli-0.1.0.tar.gz.

File metadata

  • Download URL: exa_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.3

File hashes

Hashes for exa_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 44e4fc32ecd13e4ec9bd9a790249dde88875457bd5398e617314fec4194090ba
MD5 ee6ad7399f875ad2a5297cc2b224606d
BLAKE2b-256 a72b319c5379a22fb028b45a86dc27436d94754db5ac5c8d68948661ad6ae57d

See more details on using hashes here.

File details

Details for the file exa_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: exa_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.3

File hashes

Hashes for exa_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d97e02a57a62763a700c0ae8f9f92a50d27c99a8d2100add4c4908f156d11c0
MD5 80201ce7f5ae83657a519d95ec80fa55
BLAKE2b-256 1833ec1901f6f7e1f863308e5645845800446f0ceb0399f7272bd3d1ab9ebf9a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page