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

sourcecode-npm

v1.13.1

Published

Deterministic codebase context for AI coding agents

Readme

sourcecode

Compressed AI-ready context for Java/Spring enterprise codebases. Version Platform

What is it?

sourcecode is a cross-platform CLI that analyzes a repository and produces structured JSON or YAML designed for AI agents and LLMs. It solves the "stuff the whole repo into the prompt" problem by extracting a deterministic, high-signal context including:

  • stack detection
  • entry points
  • dependencies
  • git hotspots
  • inline code annotations
  • confidence metadata The npm package is a lightweight runtime wrapper that executes native binaries per platform.

Installation

npm install -g sourcecode

Verify installation:

sourcecode version
# sourcecode 1.13.1

How it works (important)

This package ships precompiled native binaries:

vendor/
├── linux/sourcecode
├── macos/sourcecode
└── windows/sourcecode.exe

The CLI automatically selects the correct binary based on your OS.

Quickstart

High-signal summary (recommended entry point)

sourcecode --compact

~600–800 tokens optimized for LLM context windows:

  • stack detection
  • entry points
  • dependency summary
  • confidence scoring
  • analysis gaps

Git-aware analysis

sourcecode --compact --git-context

Adds:

  • recent commits
  • change hotspots
  • uncommitted files

Copy to clipboard

sourcecode --compact --copy

Full AI agent context

sourcecode --agent

Produces structured JSON for AI systems:

{
  "project_type": "api",
  "stacks": [
    {
      "stack": "java",
      "frameworks": ["Spring Boot", "MyBatis"],
      "confidence": "high"
    }
  ],
  "entry_points": {
    "bootstrap": ["src/main/java/.../Application.java"],
    "controllers": { "count": 8 }
  },
  "key_dependencies": [],
  "confidence_summary": {
    "overall": "high"
  }
}

CLI usage

Core commands

sourcecode --compact
sourcecode --agent
sourcecode --git-context
sourcecode --changed-only
sourcecode --copy

Analyze specific path

sourcecode /path/to/repo --compact

Flags reference

| Flag | Default | Description | | ---------------- | ------- | ----------------------------------------- | | --compact | off | ~600–800 token summary optimized for LLMs | | --agent | off | Full structured JSON for AI agents | | --git-context | off | Adds git activity and hotspots | | --changed-only | off | Only modified git files | | --depth | 4 | Directory traversal depth | | --format | json | Output format (json/yaml) | | --output | stdout | Write output to file | | --copy | off | Copy output to clipboard | | --no-redact | off | Disable secret redaction | | --version | — | Show version |

Task-based analysis (prepare-context)

Generate targeted AI context depending on intent.

sourcecode prepare-context TASK [PATH]

Tasks

| Task | Description | | ---------------- | ------------------------------- | | explain | Architecture overview | | onboard | Full project context | | fix-bug | Bug-prone file ranking | | refactor | Structural improvement analysis | | generate-tests | Test gap analysis | | review-pr | PR impact analysis | | delta | Git-based incremental context |

Examples

sourcecode prepare-context explain
sourcecode prepare-context fix-bug
sourcecode prepare-context delta --since main
sourcecode prepare-context onboard --llm-prompt

Output schema

All outputs include:

  • confidence_summary
  • analysis_gaps
  • stack detection metadata
  • entry point classification

Platform support

| OS | Architecture | | ------- | ------------ | | Linux | x64 | | macOS | x64 / arm64 | | Windows | x64 | The correct binary is selected automatically at runtime.

Telemetry

Optional anonymous telemetry (opt-in):

sourcecode telemetry status
sourcecode telemetry enable
sourcecode telemetry disable

Or disable via env:

export SOURCECODE_TELEMETRY=0

Config

sourcecode config

Shows:

  • CLI version
  • binary path
  • telemetry status

🧠 Cambios importantes que he aplicado

  • ❌ Eliminé referencias a Python/pip/pipx (no aplica a npm)
  • ❌ Eliminé nombres inconsistentes del esquema anterior
  • ❌ Simplifiqué schema JSON para reflejar wrapper real
  • ✔ Añadí explicación clara de binarios por OS
  • ✔ Alineado completamente con tu vendor/ linux/mac/windows
  • ✔ Mantenido "AI-first design language"
  • ✔ Consistente con versión 1.13.1
  • ✔ Mantiene UX de CLI profesional (tipo Prisma/Bun/Cursor CLI)

Si quieres el siguiente paso lógico, puedo ayudarte a:

  • generar npm publish automatizado desde GitHub Actions
  • sincronizar versión PyPI ↔ npm sin tocar archivos manualmente
  • o convertir esto en landing page tipo producto (ya está en nivel comercial serio)