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

@neuledge/context

v0.2.3

Published

Context management for Neuledge packages

Readme


The Problem

You're building with Next.js 16, and your AI assistant confidently suggests code using the old Pages Router because that's what it learned from training data. You paste the docs. It hallucinates anyway. You paste more docs. The context window fills up. Repeat.

AI assistants are powerful, but they're stuck in the past. Their training data is months or years old, and they don't know the specifics of the libraries you're using today.


The Solution

Context connects your AI assistant directly to up-to-date documentation—locally, instantly, and privately.

You: "How do I create middleware in Next.js 16?"

AI:  [automatically queries local docs]
     "In Next.js 16, create a middleware.ts file in your project root..."
     [accurate, version-specific answer]

No copy-pasting. No hallucinations about deprecated APIs. No waiting for cloud lookups.


Real-World Use Cases

:muscle: "Make my AI actually useful for the stack I use"

Add docs for your entire tech stack. Your AI assistant becomes an expert in the exact versions you're using:

context add https://github.com/vercel/next.js
context add https://github.com/prisma/prisma
context add https://github.com/tailwindlabs/tailwindcss

Now ask things like:

  • "How do I set up Prisma with Next.js App Router?"
  • "What's the Tailwind config for dark mode?"
  • "Show me the new Server Actions syntax"

:building_construction: "Stop answering the same questions for my team"

Building an internal library? Package your documentation once, share it with your team:

# Build docs from your repo
context add https://github.com/your-company/design-system

# Your whole team can now ask:
# "How do I use the DataTable component?"
# "What props does Button accept?"

:airplane: "Code on flights and in coffee shops"

Context works 100% offline. Download docs once, query forever—no internet required.

:lock: "Keep proprietary code discussions private"

Cloud documentation services see your queries. Context runs entirely on your machine. Your questions about internal APIs stay internal.


Why Context Over Cloud Alternatives?

| | Context7 | Deepcon | Context | |---|:---:|:---:|:---:| | Price | $10/month | $8/month | Free forever | | Free tier | 1,000 req/month ¹ | 100 req/month | Unlimited | | Rate limits | 60 req/hour | Throttled | None | | Latency | 100-500ms | 100-300ms | <10ms | | Works offline | :x: | :x: | :white_check_mark: | | Privacy | Queries sent to cloud | Queries sent to cloud | 100% local | | Private repos | $15/1M tokens | :x: | Free |

¹ Context7 reduced free tier from ~6,000 to 1,000 requests/month in January 2026


:zap: Key Features

  • Single tool - One MCP tool does everything, no multi-step lookups
  • Token-aware - Smart relevance filtering, never overwhelms the context window
  • Dynamic schema - Available libraries shown in tool definition
  • Offline-first - Zero network calls during operation
  • SQLite + FTS5 - Fast full-text search with stemming

:rocket: Quick Start

1. Install

npm install -g @neuledge/context

2. Add documentation

# From any git repository (GitHub, GitLab, Bitbucket, etc.)
context add https://github.com/vercel/next.js
context add https://gitlab.com/org/repo
context add [email protected]:user/repo.git

# From a local directory
context add ./my-project
context add /path/to/docs

# From URL (pre-built package)
context add https://example.com/[email protected]

# From local file
context add ./my-package.db

3. Configure your AI agent

Context works with any MCP-compatible agent. Choose your setup below:

claude mcp add context -- context serve

Add to your config file:

  • Linux: ~/.config/claude/claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "context": {
      "command": "context",
      "args": ["serve"]
    }
  }
}

Restart Claude Desktop to apply changes.

Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project-specific):

{
  "mcpServers": {
    "context": {
      "command": "context",
      "args": ["serve"]
    }
  }
}

Or use Settings > Developer > Edit Config to add the server through the UI.

Requires VS Code 1.102+ with GitHub Copilot

Add to .vscode/mcp.json in your workspace:

{
  "servers": {
    "context": {
      "type": "stdio",
      "command": "context",
      "args": ["serve"]
    }
  }
}

Click the Start button that appears in the file, then use Agent mode in Copilot Chat.

Add to ~/.codeium/windsurf/mcp_config.json:

  • Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
{
  "mcpServers": {
    "context": {
      "command": "context",
      "args": ["serve"]
    }
  }
}

Or access via Windsurf Settings > Cascade > MCP Servers.

Add to your Zed settings (cmd+, or ctrl+,):

{
  "context_servers": {
    "context": {
      "command": {
        "path": "context",
        "args": ["serve"]
      }
    }
  }
}

Check the Agent Panel settings to verify the server shows a green indicator.

Run goose configure and select Command-line Extension, or add directly to ~/.config/goose/config.yaml:

extensions:
  context:
    type: stdio
    command: context
    args:
      - serve
    timeout: 300

4. Start using it

That's it! Now just ask your AI agent:

"How do I create middleware in Next.js?"

The agent automatically uses the get_docs tool when relevant.


:books: CLI Reference

context add <source>

Install a documentation package. The source type is auto-detected.

From git repository:

Works with GitHub, GitLab, Bitbucket, Codeberg, or any git URL:

# HTTPS URLs
context add https://github.com/vercel/next.js
context add https://gitlab.com/org/repo
context add https://bitbucket.org/org/repo

# Specific tag or branch
context add https://github.com/vercel/next.js/tree/v16.0.0

# SSH URLs
context add [email protected]:user/repo.git
context add ssh://[email protected]/user/repo.git

# Custom options
context add https://github.com/vercel/next.js --path packages/docs --name nextjs

From local directory:

Build a package from documentation in a local folder:

# Auto-detects docs folder (docs/, documentation/, doc/)
context add ./my-project

# Specify docs path explicitly
context add /path/to/repo --path docs

# Custom package name and version
context add ./my-lib --name my-library --pkg-version 1.0.0

| Option | Description | |--------|-------------| | --pkg-version <version> | Custom version label | | --path <path> | Path to docs folder in repo/directory | | --name <name> | Custom package name | | --save <path> | Save a copy of the package to the specified path |

Saving packages for sharing:

# Save to a directory (auto-names as [email protected])
context add https://github.com/vercel/next.js --save ./packages/

# Save to a specific file
context add ./my-docs --save ./my-package.db

From URL:

context add https://cdn.example.com/[email protected]

From local file:

context add ./[email protected]

Finding the right documentation repository:

Many popular projects keep their documentation in a separate repository from their main codebase. If you see a warning about few sections found, the docs likely live elsewhere:

# Example: React's docs are in a separate repo
context add https://github.com/facebook/react
# ⚠️  Warning: Only 45 sections found...
# The warning includes a Google search link to help find the docs repo

# The actual React docs repository:
context add https://github.com/reactjs/react.dev

Common patterns for documentation repositories:

  • project-docs (e.g., prisma/docs)
  • project.dev or project.io (e.g., reactjs/react.dev)
  • project-website (e.g., expressjs/expressjs.com)

When the CLI detects few documentation sections, it will show a Google search link to help you find the correct repository.

context list

Show installed packages.

$ context list

Installed packages:

  [email protected]              4.2 MB    847 sections
  react@18                 2.1 MB    423 sections

Total: 2 packages (6.3 MB)

context remove <name>

Remove a package.

context remove nextjs

context serve

Start the MCP server (used by Claude Desktop).

context serve

context query <library> <topic>

Query documentation directly from the command line. Useful for testing and debugging.

# Query a package (use name@version format from 'context list')
context query '[email protected]' 'middleware authentication'

# Returns the same JSON format as the MCP get_docs tool

:gear: How It Works

┌─────────────────────────────────────────────────────┐
│                   Your Machine                      │
│                                                     │
│  ┌──────────┐     ┌────────────┐     ┌───────────┐ │
│  │  Claude  │────▶│ MCP Server │────▶│ ~/.context│ │
│  │          │     │ (get_docs) │     │  /packages│ │
│  └──────────┘     └────────────┘     └───────────┘ │
│                          │                         │
│                          ▼                         │
│                   ┌────────────┐                   │
│                   │   SQLite   │                   │
│                   │   FTS5     │                   │
│                   └────────────┘                   │
└─────────────────────────────────────────────────────┘

When you add a package:

  1. Repository is cloned (for git URLs) or read (for local directories)
  2. Documentation is parsed and split into sections
  3. Sections are indexed with FTS5 full-text search
  4. The package is stored in ~/.context/packages/

When Claude queries:

  1. FTS5 finds relevant sections by keyword matching
  2. Results are filtered by relevance score
  3. Token budget ensures responses stay concise
  4. Claude receives focused, relevant documentation

:package: Package Format

Packages are SQLite databases (.db files) containing pre-indexed documentation.

~/.context/packages/
├── [email protected]
├── [email protected]
└── [email protected]

You can:

  • Build from any git repository (GitHub, GitLab, Bitbucket, etc.)
  • Build from local directories
  • Download pre-built packages from URLs
  • Share packages via releases or any file host

:wrench: Development

# Install dependencies
pnpm install

# Build
pnpm build

# Test
pnpm test

# Lint
pnpm lint

:page_facing_up: License

Apache-2.0