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

@zowe/secrets-for-zowe-sdk

v8.39.1

Published

Credential management facilities for Imperative, Zowe CLI, and extenders.

Readme

Secrets Package

Contains APIs for secure credential management.

keyring API Examples

Developers that reference the dependency keytar directly in their code need to use the new keyring module from this package.

Use the keyring module in the same fashion as keytar.

Storing and loading credentials

const { keyring } = require("@zowe/secrets-for-zowe-sdk");
await keyring.setPassword("ServiceName", "AccountName", "SomePassword");

const password = await keyring.getPassword("ServiceName", "AccountName");
// password should equal "SomePassword"

Finding a credential

const { keyring } = require("@zowe/secrets-for-zowe-sdk");
const password = await keyring.findPassword("ServiceName/AccountName");
// password should equal "SomePassword"

Finding all credentials matching service

const { keyring } = require("@zowe/secrets-for-zowe-sdk");
const matchingCredentials = await keyring.findCredentials("ServiceName");
// returns: 
// [
//    { account: "AccountName", password: "SomePassword" },
//    ...
// ]

Deleting a credential

const { keyring } = require("@zowe/secrets-for-zowe-sdk");
const wasDeleted = await keyring.deletePassword("ServiceName", "AccountName");
// wasDeleted should be true; ServiceName/AccountName removed from credential vault

Troubleshooting

keyring is a native Node.js addon. This package ships prebuilt binaries for every supported platform in its prebuilds folder, and its install script builds one from source only when none of them match the platform being installed on.

Zowe CLI declares this package as an optional dependency, so a failure in that install script does not fail npm install. npm leaves the package out and still reports success. The CLI keeps working, but it can no longer read or write credentials, and previously the first sign of trouble was this error, much later, the first time a command needed a credential:

Failed to load Keytar module: ...

Zowe CLI now checks for a loadable prebuild during postinstall and prints the platform target it expected. The steps below resolve it.

Confirm the problem

Run this from the directory Zowe CLI is installed in — $(npm root -g)/@zowe/cli for a global install:

node -e "console.log(typeof require('@zowe/secrets-for-zowe-sdk').keyring.getPassword)"

function means secure credential storage works. A MODULE_NOT_FOUND error means npm skipped the package. Any other error, usually naming a .node file or a shared library, means the binary is there but the operating system will not load it.

1. Find out why the install failed

npm hides install script output by default, so the actual reason is rarely still on screen. Reinstall with --foreground-scripts to see it:

npm install -g @zowe/cli --foreground-scripts

2. Install the prerequisites it reports

  • A failed cargo or napi command means no prebuild matched your platform and the source build could not run. Install the Rust toolchain from rustup.rs, then repeat step 1.
  • A missing libsecret-1.so.0 means the Linux libsecret runtime is absent. Install it with apt install libsecret-1-0 (Debian/Ubuntu) or yum install libsecret (RHEL/Fedora). No rebuild is needed afterward — just re-run the Zowe CLI command that failed.
  • On Linux you also need a running Secret Service provider, such as gnome-keyring, for credentials to be stored at all.

3. Rebuild the SDK in place

If the package is installed but has no usable binary, you can repair it without reinstalling the CLI. This re-runs the prebuild check and, if needed, the source build:

npm rebuild @zowe/secrets-for-zowe-sdk

Run it from the directory Zowe CLI is installed in, or add -g for a global install.

4. Install the SDK yourself

When the install script keeps failing but your platform is in the compatibility table, the prebuild you need is already inside the published tarball — only the script that verifies it is failing. Unpack the package and skip the script:

cd "$(npm root -g)/@zowe/cli"
npm install --no-save --ignore-scripts @zowe/[email protected]

In PowerShell:

cd "$(npm root -g)\@zowe\cli"
npm install --no-save --ignore-scripts @zowe/[email protected]

Match the version to the one in the optionalDependencies of your installed @zowe/cli/package.json. Re-run the check in Confirm the problem afterward.

Unsupported platforms

If your platform is not in the compatibility table, no prebuild exists and a source build is the only option, which requires the Rust toolchain. Until then, Zowe CLI can still run against a configuration with no secure properties, or you can supply credentials per command or through environment variables.


For more detailed information, see src/keyring/EXTENDERS.md.