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

@betterdb/valkey-search-kit

v0.1.1

Published

Shared Valkey Search (FT.*) helpers: vector byte encoding, FT.SEARCH reply parsing, version-skew FT.INFO parsing, and error classification

Readme

@betterdb/valkey-search-kit

npm version total downloads license: MIT types GitHub stars

Shared low-level helpers for working with Valkey Search (FT.* commands): vector byte encoding, FT.SEARCH reply parsing, version-skew-tolerant FT.INFO parsing, TAG filter escaping, and error classification. Consumed by @betterdb/semantic-cache and intended as the foundation for future retrieval and agent-memory packages.

See it live in BetterDB Monitor

BetterDB Monitor gives you live dashboards for the AI workloads running on your Valkey:

  • AI Cache & Memory - hit rate, cost saved, evictions, and index size across all your caches and memory stores, with history.
  • AI Traces - OpenTelemetry waterfalls for each request, correlated with live Valkey state to explain every cache hit and miss.

AI Cache & Memory tab in BetterDB Monitor

AI Traces waterfall in BetterDB Monitor

Run it self-hosted (docker run -p 3001:3001 betterdb/monitor), or use BetterDB Cloud - which can also provision a managed, TLS-enabled Valkey instance with the Search module in one click - exactly what this library needs.

Installation

npm install @betterdb/valkey-search-kit

Exports

  • encodeFloat32(vec) — encode a number[] embedding as a little-endian Float32 Buffer for binary HSET field values.
  • escapeTag(value) — escape a string for safe use as a Valkey Search TAG filter value (including spaces, which would otherwise split into OR terms).
  • parseFtSearchResponse(raw) — parse a raw FT.SEARCH reply into FtSearchHit[]; never throws, returns [] on empty or malformed input.
  • FtSearchHit{ key: string; fields: Record<string, string> }, a single parsed search hit.
  • parseDimensionFromInfo(info) — extract the vector field dimension from an FT.INFO reply, handling both flat DIM pairs and the Valkey Search 1.2 nested index/dimensions shape.
  • parseFtInfoStats(info) — extract num_docs and indexing state from an FT.INFO reply as FtIndexStats.
  • isIndexNotFoundError(err) — classify an error as a Valkey Search "index does not exist" error across Valkey Search / RediSearch message variants.

License

MIT