{"_id":"@capyup/pi-exa","_rev":"6-3f19830d7dce9b5fbff9982879b7afe8","name":"@capyup/pi-exa","dist-tags":{"latest":"0.5.1"},"versions":{"0.3.0":{"name":"@capyup/pi-exa","version":"0.3.0","keywords":["pi-package","pi","pi-extension","pi-skill","exa","web-search","research"],"author":{"name":"capyup"},"license":"MIT","_id":"@capyup/pi-exa@0.3.0","maintainers":[{"name":"capyup","email":"lucas@knowecon.com"}],"homepage":"https://github.com/capyup/pi-exa#readme","bugs":{"url":"https://github.com/capyup/pi-exa/issues"},"pi":{"skills":["./skills"],"extensions":["./extensions"]},"dist":{"shasum":"4c1a9be946949b50ecd0ea4d1ebc98b74dc2c2a4","tarball":"https://registry.npmjs.org/@capyup/pi-exa/-/pi-exa-0.3.0.tgz","fileCount":7,"integrity":"sha512-8xTnQPpF2TVKgLUZrbzE1bPGoiMYckzfY5m+/1tRmaY3kiRYzov1lDMLMWbP13y3u4wclsiEdPhaJJt6IzVPrg==","signatures":[{"sig":"MEUCIQDIE/CQPvPE8o96ROaOeSO0wMK8y+Ulk4Kdkps42sFROAIgXcH4K4qhuH/eebHzyMQCUUAFbBenmLsGrf1FJO4h9ug=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":34635},"type":"module","gitHead":"869f62c8869d14eced8d7307976527d792047c23","_npmUser":{"name":"capyup","email":"lucas@knowecon.com"},"repository":{"url":"git+https://github.com/capyup/pi-exa.git","type":"git"},"_npmVersion":"11.12.1","description":"Exa web research for pi via a skill + local CLI. Uses the official exa-js SDK directly — no MCP server, no adapter, ~120 tokens of permanent context.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"exa-js":"^2.12.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-exa_0.3.0_1778396211093_0.5553784055034379","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@capyup/pi-exa","version":"0.3.1","keywords":["pi-package","pi","pi-extension","pi-skill","exa","web-search","research"],"author":{"name":"capyup"},"license":"MIT","_id":"@capyup/pi-exa@0.3.1","maintainers":[{"name":"capyup","email":"lucas@knowecon.com"}],"homepage":"https://github.com/capyup/pi-exa#readme","bugs":{"url":"https://github.com/capyup/pi-exa/issues"},"pi":{"skills":["./skills"],"extensions":["./extensions"]},"dist":{"shasum":"1fef12f062029d69d792734feb3ecea1fbf0ae81","tarball":"https://registry.npmjs.org/@capyup/pi-exa/-/pi-exa-0.3.1.tgz","fileCount":7,"integrity":"sha512-cjKWAz9sWHxO2inec4owSbC93n5CYrMHpTPJ2c10yWgw8WnCkm+MnU9YHaBMdrSozTElSEW6/R0zaPaAXzKuyw==","signatures":[{"sig":"MEUCIALIg5I8jKgrh79wab3DiovXJj1OGbNGlyFG+ly5Cyt3AiEA+4SquT2vdyON3ks9xM/e3T1NvBIaLKnuWw7fsFkAVH8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":34671},"type":"module","gitHead":"0523402caba6567c419f9e0332eb0f573615188c","_npmUser":{"name":"capyup","email":"lucas@knowecon.com"},"repository":{"url":"git+https://github.com/capyup/pi-exa.git","type":"git"},"_npmVersion":"11.12.1","description":"Exa web research for pi via a skill + local CLI. Uses the official exa-js SDK directly — no MCP server, no adapter, ~120 tokens of permanent context.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"exa-js":"^2.12.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-exa_0.3.1_1778398580844_0.5248044336296898","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@capyup/pi-exa","version":"0.4.0","keywords":["pi-package","pi","pi-extension","pi-skill","exa","web-search","research"],"author":{"name":"capyup"},"license":"MIT","_id":"@capyup/pi-exa@0.4.0","maintainers":[{"name":"capyup","email":"lucas@knowecon.com"}],"homepage":"https://github.com/capyup/pi-exa#readme","bugs":{"url":"https://github.com/capyup/pi-exa/issues"},"pi":{"skills":["./skills"],"prompts":["./prompts"],"extensions":["./extensions"]},"dist":{"shasum":"59848cad1e16f1687d0b4d1e7a9da5dff1c56c68","tarball":"https://registry.npmjs.org/@capyup/pi-exa/-/pi-exa-0.4.0.tgz","fileCount":9,"integrity":"sha512-lfmU/orcUb7zYMkfMwz5IMfxNlsbK6THpINoGHlY8wi7OuTtuKKbtWNN6i/F2yws7F9U4C5DLSOCpE4waN6ShQ==","signatures":[{"sig":"MEUCIB9JlJr6hhon/lHhYE/rp5N+DFVirEPq1Mgwf+IYYuBxAiEApH9cb9D/o++bm6WT88C6ZLlhWRLf54U4w4IVe4PRChA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":70027},"type":"module","gitHead":"cfbf7e77f5db8596036c728bb1cd534e39b655a2","scripts":{"typecheck":"tsc --noEmit"},"_npmUser":{"name":"capyup","email":"lucas@knowecon.com"},"repository":{"url":"git+https://github.com/capyup/pi-exa.git","type":"git"},"_npmVersion":"11.12.1","description":"Exa web research for pi via five first-class tools + skill + local CLI. Uses the official exa-js SDK directly — no MCP server, no adapter. Tools: exa_search, exa_similar, exa_fetch, exa_answer, exa_research. Supports real-time livecrawl, subpage extractio","directories":{},"_nodeVersion":"25.9.0","dependencies":{"exa-js":"^2.12.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^6.0.3","@types/node":"^25.6.2","@sinclair/typebox":"^0.34.49"},"peerDependencies":{"@sinclair/typebox":"*","@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-exa_0.4.0_1778401357297_0.302898253901837","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"@capyup/pi-exa","version":"0.4.1","keywords":["pi-package","pi","pi-extension","pi-skill","exa","web-search","research"],"author":{"name":"capyup"},"license":"MIT","_id":"@capyup/pi-exa@0.4.1","maintainers":[{"name":"capyup","email":"lucas@knowecon.com"}],"homepage":"https://github.com/capyup/pi-exa#readme","bugs":{"url":"https://github.com/capyup/pi-exa/issues"},"pi":{"skills":["./skills"],"prompts":["./prompts"],"extensions":["./extensions"]},"dist":{"shasum":"61a56b531c997513922c4d828ee7a680bb121197","tarball":"https://registry.npmjs.org/@capyup/pi-exa/-/pi-exa-0.4.1.tgz","fileCount":8,"integrity":"sha512-HH7NYni/1BLWjG5BhLgOvQIicPV9heTz7KuxZtON/c01hsfw9RIez+ZEruzHhcgP+XQoLnmLIYik+DjOFP1CGQ==","signatures":[{"sig":"MEUCIB/tQx42pdlb1LjMfoRjtoWXGISIcG5f2sD9IPcP/OWfAiEAmZnQ3LgwGJ859htn5dzbVp/qj84IfDfxGaUcNiyDtDU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":67016},"type":"module","gitHead":"b32a29082c68b01a27757180a083ebfca2cc9148","scripts":{"typecheck":"tsc --noEmit"},"_npmUser":{"name":"capyup","email":"lucas@knowecon.com"},"repository":{"url":"git+https://github.com/capyup/pi-exa.git","type":"git"},"_npmVersion":"11.12.1","description":"Exa web research for pi via five first-class tools + skill + local CLI. Uses the official exa-js SDK directly — no MCP server, no adapter. Tools: exa_search, exa_similar, exa_fetch, exa_answer, exa_research. Supports real-time livecrawl, subpage extractio","directories":{},"_nodeVersion":"25.9.0","dependencies":{"exa-js":"^2.12.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^6.0.3","@types/node":"^25.6.2","@sinclair/typebox":"^0.34.49"},"peerDependencies":{"@sinclair/typebox":"*","@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-exa_0.4.1_1778401536404_0.6515631803041093","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@capyup/pi-exa","version":"0.5.0","keywords":["pi-package","pi","pi-extension","pi-skill","exa","web-search","research"],"author":{"name":"capyup"},"license":"MIT","_id":"@capyup/pi-exa@0.5.0","maintainers":[{"name":"capyup","email":"lucas@knowecon.com"}],"homepage":"https://github.com/capyup/pi-exa#readme","bugs":{"url":"https://github.com/capyup/pi-exa/issues"},"pi":{"skills":["./skills"],"prompts":["./prompts"],"extensions":["./extensions"]},"dist":{"shasum":"0200075d905c4253feccac28edea10643bf871ad","tarball":"https://registry.npmjs.org/@capyup/pi-exa/-/pi-exa-0.5.0.tgz","fileCount":8,"integrity":"sha512-tStCYICYu8af0UnkTfaH3MlysOtigYfFwXtadbxKyI+vX4dEBF/INoeAKZ6uSP1sW5KCPFZrw3vXVdCw6YksxA==","signatures":[{"sig":"MEUCIBabHndOgEJKBmLYOogDxaLuCaG5y/lelZHa2vEailRwAiEAt9l2mNRbkHBlUhVa1GOIcVwM39IxWRTiAIUy1py/jNc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":70344},"type":"module","gitHead":"a1b5b680b8485ab551b458d1a9020680af641857","scripts":{"typecheck":"tsc --noEmit"},"_npmUser":{"name":"capyup","email":"lucas@knowecon.com"},"repository":{"url":"git+https://github.com/capyup/pi-exa.git","type":"git"},"_npmVersion":"11.12.1","description":"Exa web research for pi via five first-class tools + skill + local CLI. Uses the official exa-js SDK directly — no MCP server, no adapter. Tools: exa_search, exa_similar, exa_fetch, exa_answer, exa_research. Supports real-time livecrawl, subpage extractio","directories":{},"_nodeVersion":"25.9.0","dependencies":{"exa-js":"^2.12.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^6.0.3","@types/node":"^25.6.2","@sinclair/typebox":"^0.34.49"},"peerDependencies":{"@sinclair/typebox":"*","@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-exa_0.5.0_1778473327815_0.11690078681774918","host":"s3://npm-registry-packages-npm-production"}},"0.5.1":{"name":"@capyup/pi-exa","version":"0.5.1","description":"Exa web research for pi via five first-class tools + skill + local CLI. Uses the official exa-js SDK directly — no MCP server, no adapter. Tools: exa_search, exa_similar, exa_fetch, exa_answer, exa_research. Supports real-time livecrawl, subpage extractio","repository":{"type":"git","url":"git+https://github.com/capyup/pi-exa.git"},"author":{"name":"capyup"},"license":"MIT","type":"module","keywords":["pi-package","pi","pi-extension","pi-skill","exa","web-search","research"],"publishConfig":{"access":"public"},"pi":{"extensions":["./extensions"],"skills":["./skills"],"prompts":["./prompts"]},"dependencies":{"exa-js":"^2.12.1"},"scripts":{"typecheck":"tsc --noEmit"},"peerDependencies":{"@earendil-works/pi-coding-agent":"*","@sinclair/typebox":"*"},"devDependencies":{"@sinclair/typebox":"^0.34.49","@types/node":"^25.6.2","typescript":"^6.0.3"},"gitHead":"8da1600c459ef3085e32f3f7ccffda820059874d","_id":"@capyup/pi-exa@0.5.1","bugs":{"url":"https://github.com/capyup/pi-exa/issues"},"homepage":"https://github.com/capyup/pi-exa#readme","_nodeVersion":"25.9.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-s/331h1WXr68j7XxW9F7W+WAw3Pdwa/o6QsSFCMIhSzR30h8/fO/WZiEE2J1lpvodkEqPeUupS2iPVXPZxEo9A==","shasum":"c84abc9802e3dc9764c017a76a64e65365868b9c","tarball":"https://registry.npmjs.org/@capyup/pi-exa/-/pi-exa-0.5.1.tgz","fileCount":8,"unpackedSize":70040,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEh/whz9ko6qN88ZAoouwzC5b10k7bpY6+iK4OUPzYlkAiEAkjEljq6/fQZKvUJIWYqfPXNko2dtjXxeiOPC9Lo7XCQ="}]},"_npmUser":{"name":"capyup","email":"lucas@knowecon.com"},"directories":{},"maintainers":[{"name":"capyup","email":"lucas@knowecon.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-exa_0.5.1_1778473800372_0.920659809744498"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-10T06:56:50.929Z","modified":"2026-05-11T04:30:00.691Z","0.3.0":"2026-05-10T06:56:51.239Z","0.3.1":"2026-05-10T07:36:21.013Z","0.4.0":"2026-05-10T08:22:37.472Z","0.4.1":"2026-05-10T08:25:36.561Z","0.5.0":"2026-05-11T04:22:07.944Z","0.5.1":"2026-05-11T04:30:00.595Z"},"bugs":{"url":"https://github.com/capyup/pi-exa/issues"},"author":{"name":"capyup"},"license":"MIT","homepage":"https://github.com/capyup/pi-exa#readme","keywords":["pi-package","pi","pi-extension","pi-skill","exa","web-search","research"],"repository":{"type":"git","url":"git+https://github.com/capyup/pi-exa.git"},"description":"Exa web research for pi via five first-class tools + skill + local CLI. Uses the official exa-js SDK directly — no MCP server, no adapter. Tools: exa_search, exa_similar, exa_fetch, exa_answer, exa_research. Supports real-time livecrawl, subpage extractio","maintainers":[{"name":"capyup","email":"lucas@knowecon.com"}],"readme":"# pi-exa\n\nExa web research for [pi](https://github.com/badlogic/pi-mono). Calls Exa\ndirectly through the official [`exa-js`](https://www.npmjs.com/package/exa-js)\nSDK — no MCP server, no adapter, no `mcp.json` to provision.\n\n## Architecture (v0.4)\n\nv0.4 registers **five first-class tools** (`exa_search`, `exa_similar`,\n`exa_fetch`, `exa_answer`, `exa_research`) plus a **prompt template** for\nthe `/exa` command. The agent can now invoke Exa directly as a tool call —\nno bash parsing, no skill-body guessing, no \"maybe the model decides to load\nthe skill\" uncertainty.\n\nThe **skill** (`skills/pi-exa/SKILL.md`) and **CLI**\n(`skills/pi-exa/scripts/exa.mjs`) are kept as a fallback: when the user\nuses natural language (\"search the web for ...\") without `/exa`, the skill\nstill teaches the agent how to call the CLI via bash.\n\nLayers:\n\n| Layer | Role | Permanent context |\n|---|---|---|\n| **Tools** (`exa_search`, `exa_similar`, `exa_fetch`, `exa_answer`, `exa_research`) | Direct tool calls — highest hit rate | ~500 tokens (5 schemas, no promptSnippets) |\n| **Prompt** (`prompts/exa.md` via `/exa`) | Explicit trigger, loads decision tree into context | ~15 tokens (minimal front matter) |\n| **Skill** (`skills/pi-exa/SKILL.md`) | Natural-language fallback | ~15 tokens (minimal front matter) |\n| **CLI** (`scripts/exa.mjs`) | Actual workhorse, shared by all paths | 0 |\n\n## Install\n\n```bash\npi install npm:@capyup/pi-exa\n```\n\n(Or `pi install git:github.com/capyup/pi-exa` if you want to track `main`\ndirectly.)\n\nEither form pulls `exa-js` and registers the extension, skill, and prompt.\n\nThen save your API key (get one from <https://dashboard.exa.ai>):\n\n```text\n/exa-auth <your-exa-api-key>\n```\n\nThe CLI and tools re-read the key file on every call, so no `/reload` is\nneeded after auth changes.\n\nTo verify:\n\n```text\n/exa-status\n```\n\n## Usage\n\n### Fast path: `/exa` (recommended)\n\nType `/exa` followed by your request. The prompt template loads and instructs\nthe agent to call the right tool directly:\n\n```text\n/exa 最近关于 Claude Code 的新闻\n/exa 找和这篇文章类似的 https://example.com/article\n/exa 总结 https://exa.ai/docs\n/exa 谁是 Anthropic 的 CEO\n/exa 写一份关于 AI 编程助手市场的深度调研报告\n```\n\nHit rate: **100%** — the prompt template explicitly says \"call `exa_search`\"\n(or `exa_similar` / `exa_fetch` / `exa_answer` / `exa_research`), so the model never misses.\n\n### Natural-language path\n\nJust ask in plain language. The skill metadata (~15 tokens) sits in the\nsystem prompt permanently; when the model decides the task matches, it loads\nthe skill body and learns the CLI syntax. This works but is slightly less\nreliable than `/exa` because it depends on the model's intent classification.\n\n```text\n帮我搜一下最近的 AI 新闻\n这个链接说了什么？https://example.com/article\n```\n\n### Direct tool calls (agent-driven)\n\nThe model can also invoke the tools on its own without `/exa` or skill\ntriggering, because the tool schemas are always in the system prompt. This\nhappens when the agent is confident a web search is needed.\n\n### CLI (for humans or scripts)\n\n```bash\n# from the skill directory:\n./scripts/exa.mjs status\n./scripts/exa.mjs search \"anthropic claude code release notes\" --days 30 --num 5\n./scripts/exa.mjs similar https://exa.ai/blog/introducing-exa --num 5\n./scripts/exa.mjs fetch https://exa.ai/docs/sdks/javascript-sdk --mode summary\n./scripts/exa.mjs answer \"Who is the current CEO of Anthropic?\"\n./scripts/exa.mjs research \"Compare the top 5 AI coding assistants in 2025, their pricing, and key differentiators\"\n```\n\nAdd `--help` to any subcommand for the full option list.\n\n## Slash commands\n\n| Command | What it does |\n|---|---|\n| `/exa <request>` | Load the Exa prompt template and trigger tool-based research. |\n| `/exa-auth <key>` | Save the Exa API key to `~/.pi/exa.config.json` (mode `0600`). |\n| `/exa-auth --clear` | Forget the saved key. |\n| `/exa-status` | Show whether a key is in place and where it came from. |\n\n## Files this package owns\n\n- `~/.pi/exa.config.json` — stores `{ \"apiKey\": \"...\" }`. Mode `0600`.\n  Other fields are preserved but not used.\n\nThis package does **not** touch `~/.pi/agent/mcp.json`,\n`~/.config/mcp/mcp.json`, `.mcp.json`, or `.pi/mcp.json`.\n\n## Migration from earlier versions\n\n### v0.3.x → v0.4.x\n\n1. `pi update npm:@capyup/pi-exa` (or `pi update https://github.com/capyup/pi-exa.git`)\n2. Your existing key in `~/.pi/exa.config.json` is reused.\n3. `/reload` or restart pi.\n4. The five new tools (`exa_search`, `exa_similar`, `exa_fetch`, `exa_answer`, `exa_research`) will appear\n   in your tool list. `/exa` will be available as a slash command.\n\n### v0.2.x (MCP) → v0.4.x\n\nFollow the v0.3 migration steps first if you skipped that version, then the\nv0.4 steps above.\n\n### v0.1.x (bespoke tools) → v0.4.x\n\nThe old tool names are gone. The new tools are `exa_search`, `exa_similar`, `exa_fetch`,\n`exa_answer`, `exa_research`. No manual remap is needed — the agent uses them automatically.\n\n## Token-cost comparison\n\n| Version | Permanent context cost | Failure modes |\n|---|---|---|\n| v0.1.x (9 bespoke tools + routing prose) | ~750 tokens | tool name drift; you-pay-even-if-unused |\n| v0.2.x (MCP, 2 direct tools) | ~400 tokens + MCP proxy overhead | mcp.json missing; remote MCP unreachable; adapter version mismatch |\n| v0.3.x (skill + CLI) | ~120 tokens (skill metadata) | **hit rate depends on model guessing** |\n| **v0.4.x (tools + skill + /exa prompt)** | **~500 tokens (5 tool schemas)** | **near-100% hit rate via `/exa`** |\n\nv0.4 trades a moderate permanent-context increase (~380 tokens vs v0.3) for a\nmassive hit-rate improvement plus powerful tools (`exa_similar` for finding\nrelated content and `exa_research` for deep investigation).\nIf you want the absolute minimum permanent cost, stay on v0.3.x; if you want\nthe agent to actually do web research when you ask, use v0.4.x.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}