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

@ashutoshpaliwal26/code-x-ray

v1.0.0

Published

High-performance AST scanner for Node.js

Readme

⚡️ C O D E - X - R A Y

The High-Performance AST Scanner for the Modern Web

CI Status NPM Version Built With Rust License

Give your AI Agents "Eyes" into your codebase. Scan 10,000 files in seconds. Extract symbols instantly. Zero overhead.

Report Bug · Request Feature


🔮 The Problem

Node.js is fantastic, but it struggles with heavy computation. Trying to parse thousands of TypeScript or Python files in a single thread is slow, fragile, and memory-intensive.

⚡️ The Solution: Code X-Ray

We moved the heavy lifting to Rust. By bridging Node.js with a compiled Rust binary, we bypass the event loop entirely, utilizing Parallel Computing to scan your project at the speed of disk I/O.

🔥 Why Developers Choose X-Ray

| 🚀 Blazing Performance | 🛡️ Bulletproof Safety | 🧠 Intelligent Parsing | | :--- | :--- | :--- | | Uses Rayon to multithread across all CPU cores. Scans ~1.5ms per file. | Sandboxed file access. Respects .gitignore automatically. No crashes. | Powered by Tree-Sitter. Understands code structure, not just regex matches. |


📦 Installation

Add it to your project with a single command. It detects your OS (Windows/Linux/Mac) and downloads the correct optimized binary automatically.

npm install code-x-ray

💻 Developer Experience We designed Code X-Ray to feel like a native part of your toolchain. It’s fully typed, asynchronous-ready, and zero-config.

  1. The "Hello World" Scan Get a complete map of your project in 3 lines of code.

TypeScript

import { scanProject } from 'code-x-ray';

🚀 Fire up the engine (scans recursively)

console.time("✨ Magic Time");
const context = scanProject("./src");
console.timeEnd("✨ Magic Time");

console.log(`\n📦 Scanned ${context.files_scanned} files in ${context.duration_ms}ms`);

2. Powerful Filtering

Don't just scan—understand. Filter the raw AST data to find exactly what you need.

TypeScript

// Example: Find all 'TODO' comments or specific function definitions
const context = scanProject("./src");

// 🔍 Filter for TypeScript functions only
const functions = context.files
  .filter(f => f.language === 'TypeScript')
  .flatMap(f => f.symbols)
  .filter(s => s.kind === 'function');

console.table(functions.map(fn => ({
  Name: fn.name,
  Location: `L${fn.start.row}:${fn.start.column}`,
  Signature: fn.signature || '(unknown)'
})));

3. The "Context" Payload

The engine returns a clean, highly-structured JSON object optimized for LLM Context Windows (GPT-4, Claude, Llama 3).

JSON

{
  "root_dir": "./src",
  "stats": {
    "duration_ms": 142.5,
    "files_processed": 45,
    "threads_active": 12
  },
  "files": [
    {
      "path": "src/services/auth.ts",
      "language": "TypeScript",
      "size": 2048,
      "symbols": [
        {
          "name": "authenticateUser",
          "kind": "function",
          "range": { 
            "start": { "row": 15, "col": 0 }, 
            "end": { "row": 25, "col": 1 } 
          },
          "signature": "async (token: string) => Promise<User>"
        }
      ]
    }
  ]
}