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

@divebell/extension-code-usage

v0.0.28

Published

> Ask your Agent: `Run divebell extensions add @divebell/extension-code-usage to install the Extension, then run divebell code-usage --skill and follow the returned Skill to analyze the current project and open a code-usage size report for the current pag

Readme

@divebell/extension-code-usage

Ask your Agent: Run divebell extensions add @divebell/extension-code-usage to install the Extension, then run divebell code-usage --skill and follow the returned Skill to analyze the current project and open a code-usage size report for the current page.

This Divebell Extension maps browser code coverage back to build chunks, application source files, workspace packages, and third-party dependencies. It can create a JSON result, a standalone interactive report, or a local streaming report for larger page-experience results.

Install

divebell extensions add @divebell/extension-code-usage
divebell code-usage --skill

The second command prints the path to the Agent skill shipped inside the Extension package without starting an analysis.

The target build must produce an divebell-chunks.json file through @divebell/modern-plugin/chunk-map or @divebell/rspack-plugin. Keep the matching JavaScript files and source maps from the exact deployed build.

Analyze recorded coverage

To include page-ready time and loading memory, measure them before starting code coverage:

divebell open https://example.com/ --code-usage-experience
# Wait for the application's explicit ready condition.
divebell code-usage experience \
  --output /tmp/first-screen.experience.json \
  --label first-screen \
  --ready-target "application ready"

This separate load prevents code coverage from changing the performance measurement.

Record one or more representative phases with the base CLI:

divebell open https://example.com/
divebell coverage start
divebell reload
divebell coverage take /tmp/first-screen.coverage.json --label first-screen
# Perform the next page journey.
divebell coverage stop /tmp/orders.coverage.json --label orders

Combine the recordings with build metadata:

divebell code-usage analyze \
  --chunk-map /path/to/dist/divebell-chunks.json \
  --coverage /tmp/first-screen.coverage.json \
  --coverage /tmp/orders.coverage.json \
  --experience /tmp/first-screen.experience.json \
  --experience /tmp/orders.experience.json \
  --output /tmp/code-usage-report.json

Experience files are optional, but when supplied their labels must match every coverage phase. Without them, the report hides readiness and memory instead of showing empty cards.

The Chunk Map and asset base can be local paths or HTTP/HTTPS URLs. When JavaScript and source maps are not beside the Chunk Map, pass their directory or URL with --assets.

View the result

Create and open a standalone report:

divebell code-usage report /tmp/code-usage-report.json

Use --no-open to create the report without opening it. For a large report, start the local streaming viewer:

divebell code-usage serve /tmp/code-usage-report.json --port 4173

The standalone report is an artifact set. Keep the generated HTML, its reported dataPath, and the neighboring -code directory together when moving or sharing it. The command result prints all generated paths.

“Unused” means that code did not execute during the recorded journeys. It does not prove that the code can be removed.

See the complete code usage guide.