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-env-resolver-doppler

v1.0.0

Published

Doppler resolver for node-env-resolver

Downloads

44

Readme

node-env-resolver-doppler

Doppler integration for node-env-resolver.

npm version

Install

npm install node-env-resolver-doppler

Quick start

One-line convenience function

import { resolveDoppler } from 'node-env-resolver-doppler';

const config = await resolveDoppler(
  {
    serviceToken: process.env.DOPPLER_TOKEN,
    project: 'my-project',
    config: 'dev',
    secretName: 'API_KEY',
  },
  { API_KEY: string() }
);

Using with resolveAsync()

import { resolveAsync } from 'node-env-resolver';
import { doppler } from 'node-env-resolver-doppler';

const config = await resolveAsync({
  resolvers: [
    [
      doppler({
        serviceToken: process.env.DOPPLER_TOKEN,
        project: 'my-project',
        config: 'dev',
        secretName: 'API_KEY',
      }),
      { API_KEY: string() },
    ],
  ],
});

Features

  • One-line convenience functions
  • Service token authentication
  • Secret reference handlers for URI-style dereferencing (doppler://)
  • Smart caching (fetches all secrets in one API call)
  • Safe (non-throwing) versions
  • Full TypeScript support
  • Zero dependencies

Getting Started

  1. Go to doppler.com and create an account
  2. Create a project and configs (dev, stg, prd)
  3. Add your secrets
  4. Go to Project > Access and create a Service Token
  5. Copy the token

Secret Reference Handlers

# .env
API_KEY=doppler://API_KEY
DATABASE_URL=doppler://DATABASE_URL
import { resolveAsync } from 'node-env-resolver';
import { createDopplerHandler } from 'node-env-resolver-doppler';

const config = await resolveAsync({
  resolvers: [[dotenv(), schema]],
  references: {
    handlers: {
      'doppler': createDopplerHandler({
        serviceToken: process.env.DOPPLER_TOKEN,
        project: 'my-project',
        config: 'dev',
      }),
    },
  },
});

Pre-configured Handler

import { dopplerHandlerFromEnv } from 'node-env-resolver-doppler';

const config = await resolveAsync({
  resolvers: [[dotenv(), schema]],
  references: {
    handlers: {
      'doppler': dopplerHandlerFromEnv('my-project', 'dev'),
    },
  },
});

API Functions

resolveDoppler(options, schema, resolveOptions?)

const config = await resolveDoppler(
  {
    serviceToken: process.env.DOPPLER_TOKEN,
    project: 'my-project',
    config: 'dev',
    secretName: 'API_KEY',
  },
  { API_KEY: string() }
);

safeResolveDoppler(options, schema, resolveOptions?)

Safe version that returns a result object.

doppler(options)

Returns a resolver for use with resolveAsync().

createDopplerHandler(options)

Creates a reference handler for URI-style doppler:// references.

dopplerHandlerFromEnv(project, config)

Pre-configured handler using DOPPLER_TOKEN env var.

Configuration

interface DopplerOptions {
  serviceToken: string;  // Doppler service token
  project: string;       // Project name
  config: string;        // Config name (dev, stg, prd)
  secretName: string;    // Secret name
  envKey?: string;       // Optional override for target env key
}

dopplerBulk(options)

Loads all secrets for a project/config in one resolver call.

Performance

Doppler client automatically caches all secrets from a project/config on the first request, so multiple secret lookups share a single API call.

Licence

MIT