exa-cli
Simple agent-first CLI wrapper around the Exa Search API (not to be confused with the exa terminal replacement for ls).
Run
npx exa-cli --help
npm install -g exa-cli
exa search "DigiKey link for Noridc NRF54L15"
Commands
search - semantic search (optionally return contents)
contents - fetch page contents for URLs
find-similar - find similar links to a URL
answer - Q&A grounded by search results
Agent Skill
This repo includes an Agent Skill for Claude Code and similar environments:
skills/exa-search/SKILL.md
Examples
Search:
exa search "latest developments in quantum computing"
exa search "AI chips roadmap" --type deep --additional-query "GPU roadmap" --num-results 25
exa search "LLM hallucinations" --include-domain arxiv.org --text --text-max-characters 2000
Find similar:
exa find-similar https://arxiv.org/abs/2307.06435 --num-results 5 --text
exa find-similar https://example.com --exclude-domain example.com --summary
Contents:
exa contents https://arxiv.org/abs/2307.06435 --text --summary --summary-query "key findings"
exa contents https://example.com --highlights --highlights-per-url 2 --highlights-num-sentences 2
Answer:
exa answer "What is the population of New York City?"
exa answer "state of solid-state batteries" --stream
Plain output (stable lines for agents):
exa search "openai" --num-results 3 --plain
exa find-similar https://openai.com --num-results 3 --plain
exa contents https://openai.com --plain
exa answer "What is the capital of France?" --plain
Dry run (prints request JSON):
exa search "openai" --num-results 1 --dry-run
exa contents https://openai.com --text --dry-run
Auth
Set your API key in the environment:
export EXA_API_KEY=...
Development
bun install
bun run build
bun run dev -- --help
bun run lint
bun run format
Output modes
- Default is JSON to stdout
--plain emits stable, line-based output
- Errors go to stderr (JSON when not using
--plain)