exa-cli
v0.1.5
Published
Simple agent-first CLI wrapper around the [Exa Search API](https://docs.exa.ai/reference/getting-started) (not to be confused with the [exa](https://github.com/ogham/exa) terminal replacement for `ls`).
Readme
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
# Install globally
npm install -g exa-cli
exa search "DigiKey link for Noridc NRF54L15" # Outputs JSONCommands
search- semantic search (optionally return contents)contents- fetch page contents for URLsfind-similar- find similar links to a URLanswer- 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 2000Find similar:
exa find-similar https://arxiv.org/abs/2307.06435 --num-results 5 --text
exa find-similar https://example.com --exclude-domain example.com --summaryContents:
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 2Answer:
exa answer "What is the population of New York City?"
exa answer "state of solid-state batteries" --streamPlain 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?" --plainDry run (prints request JSON):
exa search "openai" --num-results 1 --dry-run
exa contents https://openai.com --text --dry-runAuth
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 formatOutput modes
- Default is JSON to stdout
--plainemits stable, line-based output- Errors go to stderr (JSON when not using
--plain)
