cross-keychain 1.1.0 is a cross-platform secret storage library for Node.js (≥18) that provides a unified API and CLI to securely store and retrieve credentials using native OS backends: Windows Credential Manager, macOS Keychain, and Linux Secret Service. It uses native Security.framework bindings on macOS for enhanced security, with automatic fallback to CLI-based backends when native modules are unavailable. Actively maintained on GitHub, it ships TypeScript types and supports both programmatic and CLI usage. Unlike alternatives like keytar (deprecated, native bindings only) or keychain (macOS-only), cross-keychain offers broader OS support, native macOS integration, and an optional null backend for testing.
npm install cross-keychainNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates storing and retrieving a secret using setPassword and getPassword with error handling.
Update all calls to await setPassword, getPassword, deletePassword, and getCredential.
Sign the application with appropriate entitlements or use --backend file for CI.
Install libsecret-1-dev on Debian/Ubuntu (sudo apt install libsecret-1-dev) or use the file backend explicitly.
Use stdin pipe instead of --password-stdin flag.
Use npx cross-keychain del or call the programmatic API instead.
Install libsecret-1-dev (Debian/Ubuntu) or equivalent (libsecret-devel on Fedora).
Add await before calls: await setPassword(...) or use .then()
Install a supported backend (libsecret on Linux) or use --backend file to force file storage.
Use --backend file or set the KEYCHAIN_ALLOW_USER_INTERACTION environment variable to 0 to disable dialogs.