CLI for Exa AI search via GAP (Gated Agent Proxy).
By Mike Kelly.
npm install -g @realmikekelly/exa-cli- GAP installed and running - See GAP documentation
- Install the Exa plugin -
mikekelly/exa-gap - Set your Exa API key in GAP
- Create a GAP token for your agent
Set your GAP token in a .env file in your working directory:
GAP_TOKEN=your-token-here
Or as an environment variable:
export GAP_TOKEN=your-token-hereThe CLI checks .env first, then falls back to the environment variable.
exa-cli search "your query"
exa-cli search "anthropic claude" -n 10 -t deepOptions:
-n, --num-results <number>- Number of results (default: 8)-t, --type <type>- Search type: auto, fast, deep (default: auto)-l, --livecrawl <mode>- Livecrawl mode: fallback, preferred (default: fallback)-c, --context-max <chars>- Max characters for context (default: 10000)
exa-cli code "react hooks typescript"
exa-cli code "express middleware authentication" -t 10000Options:
-t, --tokens <number>- Number of tokens to return, 1000-50000 (default: 5000)
exa-cli deep-search "latest developments in AI safety"
exa-cli deep-search "climate change solutions" -q "renewable energy" "carbon capture"Options:
-q, --queries <queries...>- Additional search queries
exa-cli crawl "https://example.com/article"
exa-cli crawl "https://docs.example.com" -c 5000Options:
-c, --max-chars <number>- Maximum characters to extract (default: 3000)
exa-cli linkedin "software engineer san francisco"
exa-cli linkedin "CEO startup" -n 10Options:
-n, --num-results <number>- Number of results (default: 5)
exa-cli company "Anthropic"
exa-cli company "OpenAI" -n 10Options:
-n, --num-results <number>- Number of results (default: 5)
Start a comprehensive AI research task:
exa-cli research start "implications of quantum computing on cryptography"
exa-cli research start "renewable energy adoption" -m exa-research-proOptions:
-m, --model <model>- Model: exa-research or exa-research-pro (default: exa-research)
Check research status:
exa-cli research check <taskId>MIT