← Back to CLIs
Melvynx

exa-cli

Manage Exa AI via CLI - search, contents, answer, context. Use when user mentions 'exa', 'web search', 'find similar pages', 'ai answer', or wants to interact with the Exa API.

Install

$ npx api2cli install Melvynx/exa-cli

Details

Skill type: Wrapper CLI
Auth type: bearer
Version: 0.1.0
Author: Melvynx
Views: 9

README

exa-cli

CLI for the Exa AI API - web search, content retrieval, and AI answers. Made with api2cli.dev.

Install

npx api2cli install Melvynx/exa-cli

This clones the repo, builds the CLI, links it to your PATH, and installs the AgentSkill to your coding agents.

Install AgentSkill only

npx skills add Melvynx/exa-cli

Auth

exa-cli auth set <token>     # Save your API token
exa-cli auth show            # Display current token (masked)
exa-cli auth show --raw      # Display full unmasked token
exa-cli auth test            # Verify your token works
exa-cli auth remove          # Delete the saved token

Commands

search query

Search the web with a natural language query.

exa-cli search query --query "latest AI research"
exa-cli search query --query "best React frameworks" --type neural --num-results 5 --text
exa-cli search query --query "SpaceX news" --start-date 2024-01-01 --category news --summary
FlagDescriptionDefault
--query <query>Search query
--type <type>Search type: auto, neural, keywordauto
--num-results <n>Number of results10
--include-domains <domains>Comma-separated domains to include
--exclude-domains <domains>Comma-separated domains to exclude
--textInclude page text in results
--summaryInclude AI summary for each result
--highlightsInclude text highlights
--start-date <date>Filter results after this date (ISO 8601)
--end-date <date>Filter results before this date (ISO 8601)
--category <cat>Category filter (e.g. company, research_paper, news, pdf, tweet)

search find-similar

Find pages similar to a given URL.

exa-cli search find-similar --url "https://example.com"
exa-cli search find-similar --url "https://example.com" --num-results 5 --text --summary
FlagDescriptionDefault
--url <url>URL to find similar pages for
--num-results <n>Number of results10
--textInclude page text in results
--summaryInclude AI summary for each result
--highlightsInclude text highlights

contents get

Get page contents for one or more URLs.

exa-cli contents get --urls "https://example.com"
exa-cli contents get --urls "https://a.com,https://b.com" --text --summary
FlagDescription
--urls <urls>Comma-separated list of URLs
--textInclude full page text
--summaryInclude AI summary
--highlightsInclude text highlights

answer query

Ask a question and get an LLM answer with web citations.

exa-cli answer query --query "What is the latest valuation of SpaceX?"
exa-cli answer query --query "Who won the 2024 election?" --text
exa-cli answer query --query "Explain quantum computing" --stream
FlagDescription
--query <query>Question to answer
--textInclude source text in citations
--streamStream the response

context get

Get web context and code snippets for a query with token budget.

exa-cli context get --query "how to use React hooks"
exa-cli context get --query "Python async await patterns" --tokens-num 8000
FlagDescriptionDefault
--query <query>Query to get context for
--tokens-num <n>Maximum number of tokens to return4000

Global Flags

All commands support: --json, --format <text|json|csv|yaml>, --verbose, --no-color, --no-header

Sponsors