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

@saifymatteo/pi-zvec

v0.3.0

Published

Workspace search via the zg CLI: exact, lexical, semantic, hybrid.

Readme

@saifymatteo/pi-zvec

zvec_search hybrid results with Zvec index status in the footer

The agent calls zvec_search in hybrid mode, which combines lexical and semantic search (expanded here with Ctrl+O). The footer shows the index status.

Purpose and registrations

Registers zvec_search (exact/fts/vector/hybrid/auto), /zvec init|sync|status|settings (settings is a Global / Project dialog for every key), session and settle-sync hooks, and footer status.

Configuration and external CLI

Requires external zg 0.3+ (@zvec/zvec-grep) on PATH. Windows resolves the globally installed native executable using npm and spawns it directly to preserve arguments; cmd-shim fallback may reparse shell metacharacters. No dependencies are installed by this package.

Reads <agent-dir>/extensions/zvec.json, then index-owner .pi/extensions/zvec.json (the older .pi/zvec.json is still read when the new file is absent; it is never moved): booleans autoInit, syncOnSettle, and string embedding. Missing config is auto-created with both flags true and local/potion-code-16m-v2, plus "$schema": "https://raw.githubusercontent.com/saifymatteo/pi-extensions/main/packages/pi-zvec/schemas/zvec.schema.json" for editor completion (ignored at runtime). Example flags are false; an existing index still gets startup sync in UI modes. Exact mode uses managed ripgrep without an index or embedding model.

Host limitations and security

Background indexing needs ctx.hasUI (TUI/RPC); commands still work without UI. Walks parents for .zvec-grep, stopping before home. Writes index data and an index .gitignore; appends timestamp/session/cwd/query/hit metadata to <agent-dir>/zvec-usage.log. Queries can be sensitive. Initial indexing can download an embedding model; CLI configuration determines any remote embedding/server traffic. Source/search results reach the main model. Use isolated agent/workspace directories for testing.

Tests

From the monorepo root with its existing test dependencies available:

node --test packages/pi-zvec/test/*.test.mjs

Tests use the shared test-only TypeScript/VM loader, fixtures, and host/service stubs. They do not prove compatibility with a live host, CLI, or model service.

Running locally

From the monorepo root:

pi -e ./packages/pi-zvec

Node >=24; host imports are peers, not bundled dependencies. Load only one copy: for an isolated session use --no-extensions with explicit -e paths so the original live extension is not also discovered. Set PI_CODING_AGENT_DIR to a disposable agent directory before launch; unset means the normal ~/.pi/agent fallback. Extension config continues to resolve there, never relative to this package.

Examples are manually authored, sanitized reference documents, not runtime defaults. Review and manually create only the needed files in the isolated agent directory; do not copy live credentials or endpoints. No example is automatically loaded or copied. Loading an extension grants Pi-process OS permissions. Licensed AGPL-3.0-only; see NOTICE.md.