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

@mikeo-ai/claude-context-local-core

v0.1.1

Published

Core indexing engine for Claude Context Local (PostgreSQL + Ollama)

Downloads

32

Readme

@mikeo-ai/claude-context-local-core

The core indexing engine for claude-context-local - a privacy-first, 100% local code search and analysis tool using PostgreSQL + pgvector and Ollama embeddings.

npm version License: MIT

🚀 Features

  • 100% Local Processing: All embeddings and searches happen on your machine
  • PostgreSQL + pgvector: Enterprise-grade vector storage without cloud dependencies
  • Ollama Integration: Free, open-source embedding models (no API keys!)
  • Privacy-First: Your code never leaves your computer
  • Fast Search: 12ms average query time
  • Multiple Splitters: AST-based and LangChain text splitters
  • Incremental Indexing: Efficient updates with merkle tree synchronization

📦 Installation

npm install @mikeo-ai/claude-context-local-core

🔧 Usage

Basic Setup

import {
  Context,
  PostgresVectorDatabase,
  AstCodeSplitter
} from '@mikeo-ai/claude-context-local-core';

// Configure PostgreSQL with pgvector
const vectorDb = new PostgresVectorDatabase({
  host: 'localhost',
  port: 5432,
  database: 'embeddings',
  user: 'postgres',
  password: 'postgres'
});

// Initialize context with local embeddings
const context = new Context({
  vectorDatabase: vectorDb,
  embeddingProvider: 'Ollama',
  ollamaModel: 'DC1LEX/nomic-embed-text-v1.5-multimodal',
  codeSplitter: new AstCodeSplitter()
});

Index a Codebase

// Index your project
const stats = await context.indexCodebase('/path/to/your/project');
console.log(`Indexed ${stats.indexedFiles} files, ${stats.totalChunks} chunks`);

Search Code

// Semantic search through your code
const results = await context.semanticSearch(
  '/path/to/your/project',
  'authentication logic',
  10, // limit
  0.7  // similarity threshold
);

results.forEach(result => {
  console.log(`${result.relativePath}:${result.startLine}`);
  console.log(`Similarity: ${result.score}`);
  console.log(result.content);
});

🏗️ Architecture

Vector Databases

  • PostgresVectorDatabase: Local PostgreSQL with pgvector extension (recommended)
  • MilvusVectorDatabase: Original Milvus support (requires cloud/docker)
  • MilvusRestfulVectorDatabase: RESTful API for Milvus

Embedding Providers

  • OllamaEmbedding: Local Ollama models (recommended for privacy)
  • OpenAIEmbedding: OpenAI API (requires API key)
  • VoyageAIEmbedding: VoyageAI API (requires API key)
  • GeminiEmbedding: Google Gemini API (requires API key)

Code Splitters

  • AstCodeSplitter: Syntax-aware splitting using AST parsing
  • LangChainCodeSplitter: Language-aware text splitting

⚙️ Configuration

Environment Variables

# Embedding Provider (use Ollama for local)
EMBEDDING_PROVIDER=Ollama
OLLAMA_MODEL=DC1LEX/nomic-embed-text-v1.5-multimodal
OLLAMA_HOST=http://localhost:11434

# PostgreSQL Configuration
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_DATABASE=embeddings
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres

# Optional: Splitter Configuration
SPLITTER_TYPE=ast  # or 'langchain'
CHUNK_SIZE=2500
CHUNK_OVERLAP=300

🔄 Migration from Original

If migrating from the original @zilliz/claude-context-core:

// Old (cloud-based)
import { Context, MilvusVectorDatabase } from '@zilliz/claude-context-core';
const context = new Context({
  vectorDatabase: new MilvusVectorDatabase({ /* Milvus cloud config */ }),
  embeddingProvider: 'OpenAI',
  openAIApiKey: 'sk-...'
});

// New (100% local)
import { Context, PostgresVectorDatabase } from '@mikeo-ai/claude-context-local-core';
const context = new Context({
  vectorDatabase: new PostgresVectorDatabase({ /* local Postgres */ }),
  embeddingProvider: 'Ollama',
  ollamaModel: 'DC1LEX/nomic-embed-text-v1.5-multimodal'
});

📊 Performance

| Operation | Cloud Version | Local Version | |-----------|---------------|---------------| | Embedding Generation | 200-500ms | 50-100ms | | Vector Search | 60-250ms | 12ms | | Index 1000 files | ~5 min | ~2 min | | Storage per 1M chunks | Cloud costs | Free (local disk) |

🔗 Related Packages

🤝 Contributing

Contributions welcome! This is a community project focused on privacy and local-first development.

📄 License

MIT © 2025 MikeO-AI

Based on original work by Zilliz, also MIT licensed.


Privacy Guarantee: This package performs ALL operations locally. No telemetry, no external API calls (except optional cloud providers if explicitly configured), no data collection.