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

@better-age/varlock

v0.0.2

Published

Thin varlock adapter for Better Age.

Readme

@better-age/varlock

Thin varlock adapter for Better Age.

Design constraints:

  • plugin stays thin
  • CLI stays source of truth
  • plugin shells out to bage load --protocol-version=1 <path>
  • one varlock process caches one successful load result in memory
  • plugin never receives, stores, or forwards passphrases

Contract

Plugin API:

  • @initBetterAge(path=...)
  • betterAgeLoad()

Optional override:

  • @initBetterAge(path=..., command=...)

Export:

  • ./plugin -> ./dist/plugin.cjs

Local build artifact:

  • packages/varlock/dist/plugin.cjs

Bage Launcher Assumption

Default launcher:

bage

The default runtime expects bage to be available on PATH. The plugin appends the load protocol arguments itself:

bage load --protocol-version=1 <path>

Stdio contract:

  • stdin is inherited, so bage can prompt for the passphrase in the invoking terminal.
  • stdout is piped, so raw env text becomes varlock input.
  • stderr is inherited, so prompts, warnings, and errors remain visible to the user.

Custom Launcher

command= is a launcher prefix only. The plugin still appends load --protocol-version=1 <path>.

For MVP, command= is trusted local configuration. If it contains spaces the runtime invokes it through the shell so launcher prefixes like pnpm exec bage work; do not feed untrusted input into this field.

Example:

# @plugin(./packages/varlock/dist/plugin.cjs)
# @initBetterAge(path=.env.enc, command="pnpm exec bage")
# @setValuesBulk(betterAgeLoad(), format=env)

This runs:

pnpm exec bage 'load' '--protocol-version=1' '.env.enc'

Minimal Usage

# @plugin(./packages/varlock/dist/plugin.cjs)
# @initBetterAge(path=.env.enc)
# @setValuesBulk(betterAgeLoad(), format=env)

Runtime Behavior

  • stdout from bage load becomes env text for varlock.
  • stderr stays attached to the invoking shell.
  • plugin errors if the launcher cannot start.
  • plugin errors if bage load exits non-zero.
  • failed loads are not cached; a later call can retry.
  • successful loads are cached in memory for the current process only.
  • v0 supports one initBetterAge config per process.

Development

pnpm -F @better-age/varlock build
pnpm -F @better-age/varlock check
pnpm -F @better-age/varlock test

Manual QA: