Install
$ npx api2cli install Melvynx/exa-cliDetails
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
| Flag | Description | Default |
|---|---|---|
--query <query> | Search query | |
--type <type> | Search type: auto, neural, keyword | auto |
--num-results <n> | Number of results | 10 |
--include-domains <domains> | Comma-separated domains to include | |
--exclude-domains <domains> | Comma-separated domains to exclude | |
--text | Include page text in results | |
--summary | Include AI summary for each result | |
--highlights | Include 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
| Flag | Description | Default |
|---|---|---|
--url <url> | URL to find similar pages for | |
--num-results <n> | Number of results | 10 |
--text | Include page text in results | |
--summary | Include AI summary for each result | |
--highlights | Include 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
| Flag | Description |
|---|---|
--urls <urls> | Comma-separated list of URLs |
--text | Include full page text |
--summary | Include AI summary |
--highlights | Include 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
| Flag | Description |
|---|---|
--query <query> | Question to answer |
--text | Include source text in citations |
--stream | Stream 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
| Flag | Description | Default |
|---|---|---|
--query <query> | Query to get context for | |
--tokens-num <n> | Maximum number of tokens to return | 4000 |
Global Flags
All commands support: --json, --format <text|json|csv|yaml>, --verbose, --no-color, --no-header
