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

@demlik/code-graph

v0.17.0

Published

Agent-native TypeScript code-graph + smell CLI: parse a folder with oxc, resolve it with tsgo, measure every function, flag smells, and rank refactor targets as deterministic JSON.

Downloads

90,160

Readme

@demlik/code-graph

Scan TypeScript to find refactor targets, trace calls, and check architecture rules. The default scan measures functions and reports possible maintenance problems. Optional reports cover reachability, storage access, duplicate logic, comments, and git hotspots.

Invocation

Requires Node.js 20 or later. Install it in the project you want to analyze:

pnpm add -D @demlik/code-graph
pnpm exec code-graph src
pnpm exec code-graph src --plan

The path must be a directory. Paths are relative to where you run the command.

Choose the report you need; these examples use code-graph as shorthand for pnpm exec code-graph:

| Goal | Command | |---|---| | Rank refactor targets | code-graph src --plan | | Browse files and functions | code-graph src --tree | | Inspect one feature's Ports & Adapters | code-graph src/orders --hexagon | | See who owns a table and who reaches into it | code-graph . --owners --boundary-rules boundary-rules.json | | Inspect one function's callers | code-graph src --blast example.ts:calculate | | Look up a name: where it is declared, whether it is exported, who uses it | code-graph src --find Order | | Save a call graph | code-graph src --graph --edges --out graph.json | | Browse an HTML report | code-graph src --html --out report.html | | Find unreachable functions | code-graph src --unreachable | | Check architecture boundaries | code-graph . --boundaries | | Find churn and complexity hotspots | code-graph src --hotspots |

The default scan uses oxc and needs no tsconfig. Call-graph reports use tsgo and require an accessible tsconfig.json. The path controls which files are scanned; --deep changes where the tsconfig is found, without adding files to the scan.

Use --json for machine-readable reports and --out <file> to save them. The CLI reference lists every flag, scope rule, and exit code.

Documentation

Start with the documentation index, or go directly to:

Working in this checkout

From the monorepo root:

pnpm --filter @demlik/code-graph build
node packages/code-graph/dist/index.js packages/code-graph/src --plan
node packages/code-graph/dist/index.js packages/code-graph --graph --edges --out graph.json
node packages/code-graph/dist/index.js packages/code-graph --html --out report.html

This repository has package tsconfigs and no root tsconfig. Run call-graph reports on a package directory. See scope rules for other repository layouts.

To run the source directly, without building:

pnpm --filter @demlik/code-graph exec node --import tsx src/index.ts src --plan

That command runs inside the package, so its paths are package-relative.

Run the package checks:

pnpm --filter @demlik/code-graph typecheck
pnpm --filter @demlik/code-graph lint
pnpm --filter @demlik/code-graph test
pnpm --filter @demlik/code-graph build
pnpm --filter @demlik/code-graph verify:exports

Benchmark findings record the engine measurements and reproduction commands.