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

@bella-baxter/sdk

v0.1.1-preview.128

Published

TypeScript client for the Bella Baxter API — wraps Kiota-generated client with auth + E2EE

Readme

@bella-baxter/sdk

npm license: MIT

Core TypeScript SDK for Bella Baxter — a secure secret management gateway. Provides live-reloading secrets for Node.js apps, HMAC-signed API auth, and optional Zero-Knowledge Encryption (ZKE).

Installation

npm install @bella-baxter/sdk
# or
pnpm add @bella-baxter/sdk

Quick start

import { createBellaConfig } from '@bella-baxter/sdk';

const bella = await createBellaConfig({
  baxterUrl: process.env.BELLA_BAXTER_URL!,
  apiKey: process.env.BELLA_BAXTER_API_KEY!,
  projectSlug: 'my-app',       // or set BELLA_BAXTER_PROJECT env var
  environmentSlug: 'production', // or set BELLA_BAXTER_ENV env var
});

// Access secrets
const dbUrl = bella.get('DATABASE_URL');          // string | undefined
const port  = bella.getOrThrow('PORT');           // string — throws if missing
const all   = bella.getAll();                     // Record<string, string>

// Write all secrets into process.env (for legacy integrations)
bella.intoProcessEnv();

// Stop background polling when shutting down
bella.destroy();

Environment variables

| Variable | Description | |----------|-------------| | BELLA_BAXTER_URL | Base URL of the Bella Baxter API | | BELLA_BAXTER_API_KEY | API key (bax-...), obtained from the WebApp or CLI | | BELLA_BAXTER_PROJECT | Project slug (fallback for projectSlug option) | | BELLA_BAXTER_ENV | Environment slug (fallback for environmentSlug option) | | BELLA_BAXTER_PRIVATE_KEY | PKCS#8 PEM private key for ZKE (optional) |

Typed secrets

Run the CLI to generate a typed declaration file:

bella secrets generate typescript --declaration

This generates bella-secrets.d.ts (ambient) and bella-coercions.ts (runtime). Pass coercions to get typed, coerced values:

import { BELLA_COERCIONS } from './bella-coercions.js';

const bella = await createBellaConfig({ coercions: BELLA_COERCIONS });

bella.PORT          // number — not string
bella.DATABASE_URL  // string

Zero-Knowledge Encryption (ZKE)

When BELLA_BAXTER_PRIVATE_KEY is set (or privateKey option), secrets are end-to-end encrypted. The server never sees plaintext values.

const bella = await createBellaConfig({
  baxterUrl: '...',
  apiKey: '...',
  privateKey: process.env.BELLA_BAXTER_PRIVATE_KEY,
});

The client always presents an E2EE public key when reading secrets (the device key above, or an ephemeral one), so the answer must be an encrypted envelope that opens with that key. Anything else is refused with an E2EEResponseError, never returned as plaintext:

| err.code | Meaning | |---|---| | e2ee-plaintext-response | The server (or something between you and it) answered with unencrypted secrets | | e2ee-decryption-failed | The envelope was tampered with, malformed, or encrypted to a different key |

The key is presented on every read that carries secret values, not only getAllSecrets. For those without a typed method (a single secret, its versions, a provider's secrets, the exports, global secrets), client.request(path) GETs any API path through the same authentication and E2EE pipeline and returns the decrypted JSON:

const client = await createBaxterClient({});
const item = await client.request<{ key: string; value: string }>(
  '/api/v1/projects/my-app/environments/prod/providers/vault/secrets/DB_PASSWORD',
);

An export read this way answers a { key: value } object, whatever format asks for: a file is only served to a caller that presents no key.

Framework integrations

| Framework | Package | |-----------|---------| | Express | @bella-baxter/express | | Fastify | @bella-baxter/fastify | | NestJS | @bella-baxter/nestjs | | Next.js | @bella-baxter/next | | AdonisJS | @bella-baxter/adonis | | React Native | @bella-baxter/react-native |

Links