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

node-vault-secrets

v0.0.3

Published

Unofficial HCP Vault Secrets driver for node.js

Downloads

33

Readme

Node Vault Secrets

A node.js driver for HCP Vault Secrets because I couldn't find an official one. Not to be confused with HCP Vault driver.

As written on the HCP website the HCP Vault Secrets API is under active development and is subject to change. If the API changes, this driver won't work as expected anymore.

Examples

Initialize the driver

import nodeVaultSecrets from "node-vault-secrets";

// You can find these using the cli `vlt config`
// If you don't have the vault cli, download it following these instructions:
// https://developer.hashicorp.com/vault/tutorials/hcp-vault-secrets-get-started/hcp-vault-secrets-install-cli
const ORG_ID = "/../";
const APP_NAME = "/../";
const PROJECT_ID = "/../";

// These are the client id an secret of a service principal
// You can create one using the following guide:
// https://developer.hashicorp.com/hcp/docs/hcp/admin/iam/service-principals
const CLIENT_ID = "/../";
const CLIENT_SECRET = "/../";

const driver = await nodeVaultSecrets.connect(ORG_ID, PROJECT_ID, CLIENT_ID, CLIENT_SECRET);

// Optionally you can pass the app name if you would like so
const driver = await nodeVaultSecrets.connect(ORG_ID, PROJECT_ID, CLIENT_ID, CLIENT_SECRET, APP_NAME);

Set the app name

This will set the app name for all future calls if you didn't pass it in the connect function

driver.setAppName(APP_NAME);

List all secrets

This won't show any secret values, just information about the available secrets

const secretMetadata = await driver.getSecretMetadata();

Get a secret

This will return the secret value or null if the secret doesn't exist.

const secret = await driver.getSecret(SECRET_NAME);

Create a secret

This will create a secret with the given name and value. If the secret already exists it will be overwritten.

const updatedSecretMetadata = await driver.createSecret(SECRET_NAME, SECRET_VALUE);

Delete a secret

This will delete a secret with the given name. If the secret doesn't exist it will do nothing.

driver.deleteSecret(SECRET_NAME);

Extra

List all the available applications

const applications = await driver.getApplications();