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

@sovereignfs/config

v0.1.0

Published

The environment variable convention for Sovereign core and apps: declare, read and validate settings with a per-app prefix.

Readme

@sovereignfs/config

The environment variable convention for Sovereign core and the apps that run beside it: declare your settings once, read them in one place, and fail at start-up, naming the variable, when one is wrong. The convention itself is contracts/env.md; this package implements it.

npm install @sovereignfs/config

Published for apps that run beside core (Tusk and Fjord read their TUSK_* and FJORD_* settings this way); @sovereignfs/sdk bundles its own copy, so an app that uses only the SDK needs nothing more.

import { boolean, defineConfig, oneOf, secret, url } from '@sovereignfs/config';

const config = defineConfig({
  prefix: 'SV', // every variable is SV_<NAME>; an app picks its own prefix
  variables: {
    url: url({ name: 'URL', required: true, origin: true }),
    authSecret: secret({ name: 'AUTH_SECRET', required: true, minLength: 32 }),
    inviteOnly: boolean({ name: 'AUTH_INVITE_ONLY', default: false }),
    dialect: oneOf(['sqld', 'sqlite', 'postgres'], { name: 'DB_DIALECT', required: true }),
  },
});

const settings = config.load(); // typed; throws a ConfigError listing every problem
settings.url; // string
settings.inviteOnly; // boolean
settings.authSecret.reveal(); // the value; a Secret prints as [redacted] everywhere else

What it guarantees

  • Every problem at once, each naming its variable, none showing a value. A refused secret is still a secret, and a database address can hold a password.
  • Secrets cannot leak by accident. A secret is a Secret: it renders as [redacted] in a log, in JSON and in util.inspect, and gives its value only through reveal().
  • NAME_FILE for every secret. Setting both NAME and NAME_FILE is an error; one trailing newline is dropped from a file; an unreadable file is reported without its cause.
  • No secret has a default. secret() has no default option, and the types forbid passing one.
  • Blank is unset. NAME= behaves like leaving the line out.
  • Exact types. Booleans are true or false and nothing else; integers are whole numbers in a range; choices are spelled exactly; lists reject empty items; URLs are absolute with an allowed scheme, and a plain URL cannot carry credentials.
  • No dependencies, and no static import of node:fs, so it bundles for any runtime; a file is read only when a _FILE variable is set.

config.describe() returns one row per variable (name, _FILE form, type, whether it is required or secret, default, choices) for writing documentation or an .env.example.

Scripts

pnpm --filter @sovereignfs/config build       # emits dist/
pnpm --filter @sovereignfs/config typecheck
pnpm test                                     # the tests run with the repository's unit suite