npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@feniix/pi-exa

v3.4.2

Published

Exa API extension for pi — web search, content fetching, and advanced search via Exa AI

Downloads

2,666

Readme

@feniix/pi-exa

Exa AI extension for pi with search, fetch, research, and answer capabilities.

Features

  • web_search_exa: default web search (highlights + short text snippets).
  • web_fetch_exa: fetch page content by URL.
  • web_search_advanced_exa: advanced search options and category filters (disabled by default).
  • web_research_exa: deep-research synthesis (disabled by default).
  • web_answer_exa: quick grounded answers.
  • web_find_similar_exa: discover related URLs.

Install

pi install npm:@feniix/pi-exa

For ephemeral use:

pi -e npm:@feniix/pi-exa

Configuration

You need an Exa API key from dashboard.exa.ai/api-keys.

Recommended: environment variable

export EXA_API_KEY="your-key"

Recommended for private overrides: explicit config file

Use a private config file when you want to store an API key outside shared project settings:

{
  "apiKey": "your-key",
  "enabledTools": ["web_search_exa", "web_fetch_exa", "web_answer_exa", "web_find_similar_exa"],
  "advancedEnabled": false,
  "researchEnabled": false
}

Then run pi with:

pi -e npm:@feniix/pi-exa -- --exa-config-file ~/.config/pi/exa.json

Shared non-secret settings

Supports standard pi settings locations:

  • project: .pi/settings.json
  • global: ~/.pi/agent/settings.json

Example:

{
  "pi-exa": {
    "enabledTools": ["web_search_exa", "web_fetch_exa", "web_answer_exa", "web_find_similar_exa"],
    "advancedEnabled": false,
    "researchEnabled": false
  }
}

apiKey is accepted in settings files for compatibility, but pi-exa will warn when it is loaded there. Prefer EXA_API_KEY or --exa-config-file for secrets.

CLI flags

  • --exa-api-key <key>: API key override.
  • --exa-enable-advanced: enable web_search_advanced_exa.
  • --exa-enable-research: enable web_research_exa.
  • --exa-config-file <path>: load configuration from file.
  • --exa-config <path> (deprecated alias for --exa-config-file).

Tools

web_search_exa

Params: query (required), numResults.

Returns: formatted snippets with optional highlights and metadata (costDollars, searchTime, resolvedSearchType).

web_fetch_exa

Params: urls (required array), maxCharacters, highlights, summary (query), maxAgeHours.

web_search_advanced_exa

Params include query, numResults, category, type (auto|neural|..., no deep types), date filters, domain filters, textMaxCharacters, and highlight controls.

Notes:

  • Deep types are rejected here. Use web_research_exa for deep-reasoning, deep-lite, or deep.
  • Invalid categories return an error instead of silently falling back to an unfiltered search.

web_research_exa

Params include:

  • query (required)
  • type: deep-reasoning | deep-lite | deep
  • systemPrompt
  • outputSchema (type may be "object" or "text", default "object")
  • optional additionalQueries, filters, numResults, and textMaxCharacters

web_answer_exa

Params include query (required), systemPrompt, text, and outputSchema.

web_find_similar_exa

Params include url (required), numResults, textMaxCharacters, excludeSourceDomain, date filters, and domain filters.

Integration tests

Live integration coverage is available for web_search_exa, web_fetch_exa, and web_research_exa.

These tests are:

  • skipped by default
  • only enabled when you opt in manually
  • always skipped in CI

Run them locally with a real API key:

EXA_API_KEY=your-key npx vitest run packages/pi-exa/__tests__/integration.test.ts -- --exa-live

You can also enable them with an environment variable instead of the CLI flag:

PI_EXA_LIVE=1 EXA_API_KEY=your-key npx vitest run packages/pi-exa/__tests__/integration.test.ts

Notes

  • web_search_advanced_exa and web_research_exa are opt-in and disabled by default.
  • Research/tool output may include both text and details.parsedOutput depending on outputSchema.type.