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

@vaicli/vai-workflow-code-search

v1.0.3

Published

Find similar code patterns across repositories and generate migration suggestions using code-domain embeddings.

Readme

vai-workflow-code-search

Index, search, explain, and find duplicate code across any codebase using Voyage AI's code-optimized embedding models and MongoDB Atlas Vector Search. Transform any project into a semantically searchable knowledge base.

Install

vai workflow install vai-workflow-code-search

How It Works

  1. Index — Scan, chunk, and embed all files in a local directory or remote GitHub repo into MongoDB Atlas Vector Search. Supports incremental refresh so you only re-index what changed.
  2. Search — Search indexed code using natural language. Find implementations by intent, not just keywords.
  3. Explain — Ask questions about the codebase and get AI-generated explanations grounded in the actual source code via RAG.
  4. Find Similar — Paste a snippet or reference a file to detect duplicate or semantically similar code across the indexed codebase.

Pipelines

| Pipeline | Steps | Use Case | |----------|-------|----------| | Index & Search | index → search | Index a codebase then run a semantic search query | | Index & Explain | index → explain | Index a codebase then ask questions about it via RAG | | Full Code Audit | index → search → find-similar → explain | Index, search for patterns, find duplicates, and generate explanations |

Example Usage

# Index a local project and search
vai workflow run vai-workflow-code-search \
  --input source="/path/to/project" \
  --input query="where do we handle authentication timeouts?"

# Index a GitHub repo
vai workflow run vai-workflow-code-search \
  --input source="https://github.com/org/repo" \
  --input collection="my_codebase"

# Search indexed code (after indexing)
vai workflow run vai-workflow-code-search \
  --input query="How does the authentication middleware work?" \
  --input collection="my_codebase"

# Find similar code
vai workflow run vai-workflow-code-search \
  --input code="async function fetchUser(id) { return await db.users.findOne({ _id: id }); }" \
  --input collection="my_codebase"

Models Used

  • voyage-code-3 — Code-optimized embeddings (default for source files)
  • voyage-4-large — General-purpose embeddings (used for docs/markdown)
  • rerank-2.5 — Reranker for improved search relevance

What This Teaches

  • voyage-code-3 understands code semantics — variable names, control flow, API patterns
  • Code snippets work as search queries, finding structurally similar code
  • Incremental refresh detects changed files via content hashing and only re-embeds what changed
  • RAG-powered explain uses retrieved code chunks as context for grounded, cited answers

License

MIT © 2026 Michael Lynn