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

@rbalchii/tag-walker

v1.0.0

Published

Graph-based semantic retrieval without embeddings - replaces vector DBs

Readme

@anchor/tag-walker

Semantic search without embeddings. No GPU. No cloud.

Overview

Tag-Walker is a graph-based FTS (Full-Text Search) retrieval system that replaces traditional vector databases. It uses a deterministic tag-based retrieval approach instead of embedding-based search, making it completely CPU-based with zero GPU/VRAM requirements.

The system implements a 3-phase search algorithm:

  1. Anchor: Direct Full-Text Search for initial results
  2. Pivot: Tag extraction and expansion using synonym rings
  3. Walk: Associative expansion through graph-based exploration

Installation

npm install @anchor/tag-walker

Quick Start

import { TagWalker } from '@anchor/tag-walker';
import { PGlite } from '@electric-sql/pglite';

// Initialize PGlite database
const db = await PGlite.create();

// Initialize TagWalker
const tagWalker = new TagWalker({ 
  db,
  maxResults: 50,
  tokenBudget: 4096 
});

// Ingest content with tags
await tagWalker.ingest(
  "Artificial intelligence is transforming industries worldwide.",
  ["AI", "technology", "innovation"],
  "source_document_1"
);

// Search for relevant content
const results = await tagWalker.search("machine learning technology");
console.log(results);

How It Works

Tag-Walker replaces embedding-based vector search with deterministic tag-based retrieval. Instead of relying on neural networks to create semantic vectors, it uses:

  • Synonym Rings: Static lookup tables for semantic expansion
  • Graph Navigation: Associative expansion through shared tags
  • Full-Text Search: Fast indexing and retrieval using PostgreSQL FTS

This approach provides semantic search capabilities without the computational overhead of embedding models, making it ideal for local-first applications.

API Reference

new TagWalker(config)

Initialize the Tag-Walker with configuration options:

  • db: PGlite database instance
  • synonymsPath?: Path to custom synonym dictionary
  • maxResults?: Maximum number of results to return (default: 50)
  • tokenBudget?: Maximum token budget for results (default: 4096)

tagWalker.search(query, options?)

Perform a search with the following parameters:

  • query: Search query string
  • options?: Optional search parameters
    • buckets?: Filter by buckets
    • tags?: Filter by tags
    • provenance?: Filter by provenance ('internal', 'external', 'quarantine', 'all')

Returns: Promise<SearchResult[]>

tagWalker.ingest(content, tags, source)

Ingest content into the database:

  • content: Content string to store
  • tags: Array of tags associated with content
  • source: Source identifier for the content

Returns: Promise<string> - ID of the ingested content

Comparison: Tag-Walker vs Vector DB

| Feature | Tag-Walker | Vector DB | |---------|------------|-----------| | Hardware Requirements | CPU only | GPU recommended | | Embedding Models | Not required | Required | | Storage Efficiency | High | Lower (vectors) | | Search Speed | Fast (FTS + Graph) | Variable | | Semantic Understanding | Rule-based | Learned | | Local Operation | Yes | Depends on model | | Cost | Low | Potentially high |

When to Use Tag-Walker

  • ✅ Local-first applications without cloud dependencies
  • ✅ CPU-only environments without GPU access
  • ✅ Applications requiring deterministic search results
  • ✅ Systems with limited computational resources
  • ✅ Privacy-focused applications (no external APIs)
  • ✅ Fast prototyping without ML model setup

License

Elastic License v2.0 (ELv2)