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

probe-code

v0.5.2

Published

Codebase intelligence for AI agents. Index your code at function-level, query what matters, know what breaks.

Readme

probe

Codebase intelligence for AI agents

npm version license

AI agents waste time reading files blindly. probe indexes your codebase at function-level and answers questions before the agent starts coding.

npx probe-code index

One command. Your agent now knows every function, call chain, and coding pattern.

| Surface | What it provides | |---------|-----------------| | CLI | Query, impact analysis, pattern extraction | | MCP | 8 tools any agent can call in real-time | | JSON | Structured output for pipelines | | API | Programmatic access from your code |

The problem

An AI agent working on your code does this:

grep "login" → 15 results
read file 1 → not relevant
read file 2 → not relevant
read file 3 → finally relevant
read its imports → find another file
... 10 tool calls later

With probe:

probe_query("fix login timeout") → 4 relevant files, ranked, with context

Three calls replace fifteen.

Quick start

# Index your project
npx probe-code index

# Find relevant code for a task
npx probe-code query "fix the login timeout"

# See what breaks if you change something
npx probe-code impact "src/auth/service.ts:45"

# Get codebase conventions
npx probe-code patterns

# Start MCP server for agents
npx probe-code serve

What it indexes

probe extracts from every file:

  • Functions, classes, methods, types — name, signature, line numbers
  • Call graph — who calls what, resolved through imports
  • Import graph — all module dependencies
  • Co-change patterns — from git history, which files change together
  • Coding patterns — naming conventions, error handling, test structure

Stored in .probe/probe.db (SQLite). Fully offline, no API keys.

Commands

probe index

Scans the codebase, builds the function-level index.

probe index                    # current directory
probe index --root ./my-project
probe index --no-git           # skip git history analysis
probe index --verbose          # show per-file progress

probe query <task>

Find relevant files and symbols for a natural language task.

probe query "fix the login timeout"
probe query "add payment endpoint" --limit 20
probe query "refactor database layer" --json

Output groups results by relevance:

  • Primary matches — direct symbol/file name matches
  • Related — connected via call graph
  • Co-change — files that historically change together

probe impact <target>

Show what breaks if you change a function.

probe impact "src/auth/service.ts:45"       # by file:line
probe impact "src/auth/service.ts:loginUser" # by file:name
probe impact "loginUser"                     # by name (finds best match)
probe impact "loginUser" --depth 5           # deeper traversal

Output:

  • Direct dependents — functions that call this (break if signature changes)
  • Type dependents — functions using return types
  • Indirect dependents — transitive callers (configurable depth)
  • Co-change history — files that always change together
  • Tests — test files covering this function

probe patterns

Show coding conventions extracted from the actual codebase.

probe patterns
probe patterns --json

Detects:

  • Naming conventions (camelCase, snake_case, PascalCase) per symbol kind
  • File naming patterns
  • Error handling style (Result<T,E>, try/catch, throws)
  • Test location, naming, and coverage ratio
  • Import style (relative vs absolute)
  • Export ratio

probe stats

Show index statistics.

probe serve

Start MCP server for AI agent integration.

MCP Server

8 tools for real-time codebase queries:

{
  "mcpServers": {
    "probe": {
      "command": "npx",
      "args": ["probe-mcp", "."]
    }
  }
}

| Tool | Description | |------|-------------| | probe_query | Find relevant files for a task | | probe_impact | What breaks if you change X | | probe_patterns | Codebase conventions | | probe_function | Details about a specific function | | probe_file | File summary with all symbols | | probe_depends | Full dependency chain for a function | | probe_history | Co-change history for a file | | probe_suggest | Prioritized file list for a task |

Programmatic API

import { openDatabase, queryCodebase, analyzeImpact, getPatterns } from 'probe-code';

const db = openDatabase('./my-project');

// Query
const results = queryCodebase(db, 'fix login bug', { limit: 10 });

// Impact
const impact = analyzeImpact(db, 'loginUser', 3);

// Patterns
const patterns = getPatterns(db);

Supported languages

TypeScript, JavaScript, Python, Go — all with tree-sitter AST parsing.

How it works (no LLM required)

  1. Index — tree-sitter parses every file, extracts symbols and call sites
  2. Resolve — imports are matched to build a cross-file call graph
  3. Analyze — git history reveals co-change patterns
  4. Extract — naming, error handling, and structural patterns are detected
  5. Query — keyword matching + graph traversal + co-change ranking

Everything runs locally. No API calls. No cloud. No cost.

License

MIT