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

codebase-xray

v0.3.0

Published

AI-powered codebase analyser — design patterns, coding standards, class summaries, and improvement suggestions

Readme

CodeXRay

AI-powered codebase analyser that detects design patterns, assesses coding standards, summarises classes, and generates improvement suggestions. Built for new-joiner developers to understand a codebase quickly.

How It Works

CodeXRay uses a hybrid architecture:

  1. codexray init — runs in the terminal. Scans your project structure, detects tech stack and modules, creates configuration files. No AI needed.
  2. /codexray:analyse — runs in VS Code Copilot Chat. Uses GitHub Copilot's LM to analyse each module for patterns, standards, and class summaries. No API key needed.
  3. /codexray:report — runs in Copilot Chat. Generates executive summary, onboarding guide, and health scores from analysis data.
  4. /codexray:suggest — runs in Copilot Chat. Generates prioritised improvement suggestions and quick wins.

Installation

Option A: Install from npm (recommended)

npm install -g codebase-xray

Then use from any project:

cd /path/to/your/project
codexray init

Option B: Clone and link

git clone [email protected]:munnik486_comcast/CodeXray.git
cd CodeXray
npm install && npm run build
npm link

Copilot Chat Commands Setup

To use /codexray:analyse, /codexray:report, and /codexray:suggest in Copilot Chat, copy these folders into your target project:

.github/prompts/codexray-analyse.prompt.md
.github/prompts/codexray-report.prompt.md
.github/prompts/codexray-suggest.prompt.md
.github/skills/codexray/

These prompt files tell Copilot Chat how to run the analysis. They're project-level, not part of the npm package.

Quick Start

1. Install

npm install
npm run build

2. Initialise

npx codexray init

This scans your project and creates:

  • codexray/config.yaml — configuration (edit to adjust scope)
  • codexray/overview.md — project overview
  • codexray/structure.md — module map and directory tree

3. Analyse

Open VS Code Copilot Chat and run:

/codexray:analyse

This generates per-module analysis in codexray/modules/:

  • summary.md — what the module does
  • classes.md — per-class/function summaries
  • patterns.md — design patterns found

Plus codebase-wide files:

  • codexray/patterns.md — pattern inventory
  • codexray/standards.md — coding conventions

4. Report (optional)

/codexray:report

Generates codexray/report/summary.md, onboarding.md, health.md.

5. Suggest (optional)

/codexray:suggest

Generates codexray/suggestions/improvements.md, quick-wins.md.

Scope to a module: /codexray:suggest auth

Configuration

Edit codexray/config.yaml:

version: 1
include:
  - src/**
exclude:
  - '**/test/**'
  - '**/node_modules/**'
depth: full          # full | summary | quick
modules: []          # auto-detected if empty
language: typescript  # auto-detected
framework: ''        # auto-detected

Depth Levels

| Depth | Module Files | Top-Level Files | |-------|-------------|-----------------| | full | summary + classes + patterns | overview + structure + patterns + standards | | summary | summary + patterns | overview + structure + patterns + standards | | quick | none | overview + structure only |

Output Structure

codexray/
├── config.yaml        # Configuration
├── .lastrun           # Last analysis state (for diff-aware reruns)
├── overview.md        # Project overview
├── structure.md       # Module map + directory tree
├── patterns.md        # Codebase-wide design patterns
├── standards.md       # Coding conventions
├── modules/
│   ├── <module>/
│   │   ├── summary.md
│   │   ├── classes.md
│   │   └── patterns.md
│   └── ...
├── report/            # Generated by /codexray:report
│   ├── summary.md
│   ├── onboarding.md
│   └── health.md
└── suggestions/       # Generated by /codexray:suggest
    ├── improvements.md
    └── quick-wins.md

Supported Languages

JavaScript/TypeScript, Java, Kotlin, Go, Rust, Python, PHP, Ruby, Elixir, C#, C/C++, Swift, Dart, Lua, R, Scala, Vue, Svelte.

CLI Alternative

If you have a GitHub PAT or OpenAI API key, you can add an ai section to config.yaml and use the CLI directly:

ai:
  type: github-copilot   # or: openai, ollama
  model: openai/gpt-4.1
  apiKey: ''              # or set GITHUB_TOKEN env var

Then run codexray analyse, codexray report, codexray suggest in the terminal.

Requirements

  • Node.js 18+
  • VS Code with GitHub Copilot (for Copilot Chat commands)