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

dma-advisor

v0.1.4

Published

Build-time SDK + CLI that reports a site's deploys and dependencies to DMA Web Advisor

Readme

dma-advisor

Build-time SDK and CLI for DMA Web Advisor, Del Mar Advertising's internal site registry. On every build it posts a small report (commit, branch, framework, dependency versions) to the advisor so the fleet dashboard can track deploys and dependency drift. It never fails a build: reporting is fire-and-forget with a short timeout.

Setup

Log the machine in once, with a token from the advisor dashboard (Keys → CLI login tokens shows the exact command):

npx dma-advisor@latest login --url https://your-advisor.example.com --token <token>

Then, in each site's repo, one command:

npx dma-advisor@latest init

It asks for the production URL, the site name (defaulting to the URL's domain), and the client (choose from the advisor's list or create one). It checks the local files, adds the site, saves its credentials, installs dma-advisor with the repo's package manager, and patches astro.config.* / vite.config.*, and — when the repo is linked to Netlify or Vercel and that CLI is logged in — sets the same two variables on the host (production context). If it cannot, it tells you to add them to the host yourself.

| Flag | Meaning | | --- | --- | | --yes | Ask nothing; use flags, detected values, and defaults | | --json | Ask nothing; print one JSON result to stdout, without credentials | | --name <site> | Site name (default: the production URL's domain, else the package.json name) | | --production-url <url> | Live URL to monitor (default: the Astro config's site:) | | --client <name> | Client to file the site under; reused by name, created if new | | --key <site key> | Skip adding a site: wire this repo to one created in the dashboard | | --config <path> | The Astro/Vite config when it is not at the top of the working directory (e.g. console/vite.config.ts); .env is saved beside it, where the build reads it | | --url <advisor> | Advisor base URL (default: ADVISOR_URL, then project env files, then the saved login) |

Reruns and automation

init reuses an existing project key (or ADVISOR_KEY from the environment) without logging in or creating another site. Reruns finish local setup; they do not update the site's name, URL, or client in the dashboard. Existing keys are checked for valid format but are not verified against the server.

Credentials are saved atomically with owner-only file permissions before package installation or config edits. Duplicate .env assignments are consolidated, and unrelated values and comments are preserved. If a later step fails, fix the reported issue and rerun the same command. A conflicting advisor URL or key requires an explicit choice; conflicting overrides in .env.local or production env files must be corrected first.

--yes, --json, and non-TTY input never prompt. Missing inputs, unknown flags, and missing flag values fail with an instruction. For example, with ADVISOR_URL and ADVISOR_TOKEN already supplied:

npx dma-advisor init --json --name client-site.com --production-url https://client-site.com --client "Client Name"

The JSON result includes status, registration, credentials, package, config, host, warnings, nextSteps, and an error when applicable. Exit code 0 means local setup is configured; 1 means incomplete or failed. Check host separately: manual means production environment variables still need to be set. Neither status confirms a successful deploy or a received build report.

Config edits support direct object exports and defineConfig({ ... }) with literal integration/plugin arrays, including aliased SDK imports. Computed configs, object spreads, and other unsupported shapes stay untouched and produce an incomplete result with manual instructions.

Requests time out after 15 seconds. If registration succeeds on the server but the response/key never reaches this machine, check the dashboard and rotate that site's key if needed; retries cannot recover a lost one-time key.

The repo URL is taken from the git origin remote, with any embedded credentials stripped. The CLI never handles a password. Agents and CI can skip login by setting ADVISOR_URL and ADVISOR_TOKEN; dma-advisor logout forgets the saved login.

Usage

Astro:

import { advisor } from "dma-advisor";
export default defineConfig({ integrations: [advisor()] });

Vite:

import { advisorVitePlugin } from "dma-advisor";
export default defineConfig({ plugins: [advisorVitePlugin()] });

Or from CI without a plugin: npx dma-advisor report.

Astro SSR sites also get a /health route (dma-advisor/health-route) returning the last build's metadata.