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

@devdogsuga/env

v0.1.5

Published

Env-registry machinery: declare()/define() manifests, target/tier resolution, with-env session loading, and a @t3-oss/env-nextjs re-export. Ships no variables — the registry of actual names and schemas is repo data that stays in the consuming app.

Readme

@devdogsuga/env

The env-registry machinery: declare()/define() for building a manifest, target/tier resolution (development/preflight/staging/production), the with-env session loader, and a @t3-oss/env-nextjs re-export. It ships no variables of its own — the registry of actual names and schemas (which app needs SUPABASE_URL, which secret is production-only, …) is repo data and lives in each consuming app's own env.ts, built out of this package's declare()/define().

A new variable is added to an app's env.ts — a declare() whose manifest maps each name to define(schema, meta). A consumer typically feeds that manifest into createEnv() from the ./nextjs subpath (a straight re-export of @t3-oss/env-nextjs, so an app depends on this package instead of adding @t3-oss/env-nextjs to its own package.json):

import { createEnv } from "@devdogsuga/env/nextjs";
import { declare, define } from "@devdogsuga/env";

The package also ships with-env, the bin most workspace scripts that need a value at run time wrap their command in (build, lint, typecheck and test are bare):

"dev": "with-env next dev",
"link-remote-project": "with-env -c 'supabase link --project-ref $PROJECT_REF'"

The -c form defers $VAR expansion until after the env files are loaded; use the plain argv form otherwise.

For a staging or production tier, with-env also sets CLOUDFLARE_ENV and NEXT_PUBLIC_DEPLOY_ENV to that tier, so DEPLOY_ENV=staging with-env vinext build needs nothing else. A value you set yourself (shell or env file) wins.

with-env also derives CLOUDFLARE_ENV and NEXT_PUBLIC_DEPLOY_ENV from DEPLOY_ENV (an explicit value wins), and writes .env.generated from supabase status -o env when the local stack is up and the file is missing or older than supabase/config.toml. --worker <app> writes the app's Worker env to a private temp file for the life of the command and replaces {env-file} in the command with its path; previewing production asks first (--yes without a terminal):

"start": "with-env --worker platform wrangler dev --config dist/server/wrangler.json --env-file {env-file}"

buildWorkerEnv(app, env, "dev" | "deploy") builds that env, and the one wrangler deploy --secrets-file uploads, from the app's manifest.