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

@moshaar/env

v1.2.0

Published

Fetch secrets from OpenBao and inject into a spawned command. No .env files needed. For Moshaar platform devs.

Readme

@moshaar/env

Fetch secrets from OpenBao and inject them into a spawned command — no .env files needed.

Built for Moshaar platform devs (frontend + backend).

Install

npm install -g @moshaar/env
# or use npx:
# npx @moshaar/env dev backend -- pnpm run start:dev

Prerequisites

You need OpenBao CLI installed and you need to be logged in.

1. Install OpenBao CLI

| Platform | Command | |---|---| | Windows | winget install OpenBao.OpenBao | | macOS | brew tap openbao/tap && brew install openbao | | Linux | curl -fsSL https://github.com/openbao/openbao/releases/download/v2.5.4/bao_2.5.4_Linux_x86_64.tar.gz \| sudo tar -xz -C /usr/local/bin bao |

Verify: bao --version

2. Login via GitLab OIDC

export BAO_ADDR=https://secrets.moshaar.com
bao login -method=oidc role=backend-team   # or frontend-team, devops-team

(Token TTL: 8 hours — re-login when expired.)

Usage

# Backend developer
moshaar-env dev backend -- pnpm run start:dev

# Frontend developer
moshaar-env dev frontend -- pnpm run dev:mw

# Custom folder
moshaar-env dev shared-public -- env

# Prod (requires explicit safety flag)
moshaar-env prod backend --confirm-prod -- node dist/main.js

# List secret names (no values shown)
moshaar-env --list dev backend

# Check login status
moshaar-env --status

How it works

  1. Reads your OpenBao token from ~/.bao-token / ~/.vault-token / BAO_TOKEN, falling back to bao token lookup
  2. Calls OpenBao API: list keys at moshaar/<env>/<folder> + moshaar/<env>/shared-public
  3. Fetches all values (bounded concurrency = 6, auto-retry 2x on network errors)
  4. Reads ./.env.local if present in cwd — its KEY=VALUE pairs override what came from OpenBao
  5. Spawns your command with the merged secrets injected into process.env

Secrets never touch disk and never appear in stdout.

.env.local overrides (v1.1.0+)

Put per-developer infrastructure overrides in a .env.local file in your project root:

# .env.local — gitignored, per-developer
DATABASE_URL=postgresql://postgres:123@localhost:5432/moshaar_dev
REDIS_HOST=localhost
CACHE_HOST=localhost
MEILISEARCH_HOST=http://localhost:7700

OpenBao stays the source of truth for shared secrets (JWT, SMTP, API keys). .env.local overrides only host-specific values. Don't put real secrets in .env.local.

Roles available (must match your GitLab subgroup)

| Login Role | GitLab subgroup | Can read | |---|---|---| | backend-team | moshaar/backend-team | /dev/backend/* + /dev/shared-public/* | | frontend-team | moshaar/frontend-team | /dev/frontend/* + /dev/shared-public/* | | devops-team | moshaar/devops-team | All /dev/* + /staging/* + read /prod/* | | prod-backend | moshaar/prod-backend | Read /prod/backend/* + /prod/shared-public/* | | prod-frontend | moshaar/prod-frontend | Read /prod/frontend/* + /prod/shared-public/* |

If your login fails with permission errors, ask DevOps to add you to the correct GitLab subgroup.

Configuration

| Env var | Default | Notes | |---|---|---| | BAO_ADDR | https://secrets.moshaar.com | OpenBao server URL | | BAO_TOKEN | (read from ~/.bao-token) | Override token explicitly |

License

MIT — see LICENSE.