New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@dotenvx/providers

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dotenvx/providers

Private key lookup for dotenvx

npmnpm
Version
0.3.3
Version published
Weekly downloads
1.4M
131.03%
Maintainers
2
Weekly downloads
 
Created
Source

@dotenvx/providers

npm install @dotenvx/providers
const { provider } = require('@dotenvx/providers')
const { parse, parseSync } = require('@dotenvx/primitives')

const keys = provider()

// Async
const result = await parse(source, { provider: keys.get })

// Sync
const resultSync = parseSync(source, { provider: keys.getSync })

Looks up private keys in this order, stopping at the first match:

  • .env.keys
  • Dotenvx Armor (including enclave decryption)
  • macOS Keychain
  • Windows Credential Manager
  • Linux Secret Service
  • 1Password
  • Bitwarden

providerOrder exports the same order for consumers with custom provider adapters. The platform's native store occupies one step between Armor and 1Password.

Optional onLookup(name) and onLookupEnd(name) callbacks let consumers show progress without owning the lookup order. They run around each attempted lookup in both get and getSync; onLookupEnd also runs when a lookup throws. These synchronous callbacks should not throw. Provider errors propagate rather than silently falling through to another store.

FAQs

Package last updated on 06 Oct 2026

Related posts