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

@qui-cli/env-1password

v1.2.10

Published

@qui-cli Plugin: Standardized environment configuration with 1Password support

Readme

@qui-cli/env-1password

@qui-cli Plugin: Standardized environment configuration with 1Password support

npm version Module type: ESM

Note

This plugin is identical to @qui-cli/env, with the exception that it includes that package's optional peer dependency @1password/sdk.

Install

npm install @qui-cli/env

Usage

import { Env } from '@qui-cli/env';

// configure desired environment path
Env.configure({ path: '../../.env' });

// update .env
Env.set({ key: 'EXAMPLE', value: parseInt(process.env.EXAMPLE || '0') + 1 });

When are environment variables ready to be read?

Environment variables (from any .env file loaded by this plugin) are not available until after the Env.parse() has been called, which is not guaranteed to have occurred unless invoked directly by another plugin or after the plugin has been initializied by init() (see dev-plugin-lifecycle for an illustration of this).

Any plugin that depends on this plugin can assume that the .env file environemnt variables are available in the dependent plugin's init() and run() methods, but will not be available in the dependent plugin's options() method and will only sometimes be available in the dependent plugin's configure() method (when it is invoked by init(), for example).

1Password integration

For full integration, also install the 1Password CLI which will allow you to look up a 1Password service account token by identifier.

The configuration options opToken, opItem, and opAccount may all be passed as command-line options. For example:

example --opToken "$(op item get ServiceAccountToken)"

If the 1Password CLI tool is installed, then opItem and opAccount can be used:

example --opAccount example.1password.com --opitem "My Token Identifier"

Configuration

export type Configuration = Plugin.Configuration & {
  root?: string;
  load?: boolean;
  path?: string;
};

root

Optional root for calculating relative paths to .env files. If undefined, falls back to the path defined by @qui-cli/root.

load

Whether or not to load the .env file into process.env immediately. Defaults to true.

path

Path to desired .env file relative to root. Defaults to '.env';

1Password configuration

If 1Password secret references are stored in the environment, a 1Password service account token is required to access the secret values.

opToken

1Password service account token; will use environment variable OP_TOKEN if present

opItem

Name or ID of the 1Password API Credential item storing the 1Password service account token; will use environment variable OP_ITEM if present. Requires the 1Password CLI tool.

opAccount

1Password account to use (if signed into multiple); will use environment variable OP_ACCOUNT if present

Options

When the optional peer dependency @1password/sdk is installed, Env exposes opAccount, opItem, and opToken as command-line options.

Initialization

Env loads the specified .env file into process.env.

API

import { Env } from '@qui-cli/env';

Env.parse(file?)

Parse file (path relative to root, defaults to path if file is not defined) as a .env file and append to process.env. Passing load as true to configure() calls this immediately from configure().

Env.exists({key, file?}): boolean

Determine if a particular key exists in the specified .env file (defaults path if file is not defined).

Env.get({key, file?}): string | undefined

Get the string value (if present) of a particular key in a .env file (defaults to path if file is not defined). Returns undefined if the key is not present.

Env.set({key, value, comment?, file?}): void

Set the value of a particular key in the specified .env file (defaults to path if file is not defined). Optional comment can be inserted preceding the key in the file.

Env.remove({key, comment?, file?)

Remove a particular key from the specified .env file (defaults to path if file os not defined), optionally replacing the key with a comment.