← Back to home

Node.js SDK

A thin authenticated client for Node.js. Secrets are encrypted at rest server-side; the SDK sends and receives plaintext over TLS.

Install

Terminal
npm install @meowlabs/meowpass

Quick Start

app.ts
import { MeowPass } from "@meowlabs/meowpass"; const mp = new MeowPass({ apiKey: process.env.MEOWPASS_API_KEY!, }); // Get a single secret const stripeKey = await mp.get("vault-id", "STRIPE_KEY"); // Pull all secrets as key-value map const secrets = await mp.pull("vault-id"); console.log(secrets.DATABASE_URL); // Set a secret (encrypted at rest server-side) await mp.set("vault-id", "NEW_KEY", "secret_value"); // List secret names (no values) const keys = await mp.list("vault-id");

API Reference

MethodReturnsDescription
get(vaultId, key)stringDecrypt and return a secret
set(vaultId, key, value){ version }Encrypt and store a secret
delete(vaultId, key)voidDelete a secret
list(vaultId)SecretInfo[]List keys with versions
pull(vaultId)Record<string, string>Pull all as key-value map
listVaults(){ id, name }[]List all vaults
createVault(name){ id, name }Create a new vault
whoami(){ email, name, tier }Get current user

Use in Express / Next.js

middleware.ts
import { MeowPass } from "@meowlabs/meowpass"; // Initialize once at startup const mp = new MeowPass({ apiKey: process.env.MEOWPASS_API_KEY!, }); // Pull all secrets at startup, cache in memory const secrets = await mp.pull("vault-id"); // Use in your app const stripe = new Stripe(secrets.STRIPE_KEY);

Security

  • Secrets encrypted at rest server-side (AES-256-GCM envelope encryption)
  • Authenticate with a scoped API key; values travel over TLS
  • Create read-only keys for least-privilege access
  • Every access is audited