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

op-bruno

v0.0.8

Published

CLI tool to sync Bruno secrets with 1Password

Downloads

22

Readme

op-bruno

A CLI tool to sync Bruno API client secrets with 1Password, enabling secure secret management for your API testing workflows.

Version Downloads/week Buy Me a Coffee

Features

  • Extract Secrets: Automatically identifies and extracts secret variables from Bruno environment files
  • JSON Export: Exports extracted secrets to a structured JSON file
  • 1Password Integration: Creates and manages secrets in 1Password vaults
  • Pre-request Scripts: Generates Bruno pre-request scripts to fetch secrets from 1Password
  • Filesystem Access: Automatically configures Bruno collections for filesystem access

Installation

# Install the tool globally
npm install -g op-bruno

# Execute without installation
npx op-bruno

Prerequisites

Usage

$ npm install -g op-bruno
$ op-bruno COMMAND
running command...
$ op-bruno (--version)
op-bruno/0.0.8 linux-x64 node-v20.19.6
$ op-bruno --help [COMMAND]
USAGE
  $ op-bruno COMMAND
...

Commands

op-bruno help [COMMAND]

Display help for op-bruno.

USAGE
  $ op-bruno help [COMMAND...] [-n]

ARGUMENTS
  COMMAND...  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for op-bruno.

See code: @oclif/plugin-help

op-bruno sync COLLECTION

Extract secrets from Bruno environment files and generate pre-request script for fetching from 1Password

USAGE
  $ op-bruno sync COLLECTION [--json] [--outName <value>] [--vault <value>] [--title <value>]
    [--upsertItem]

ARGUMENTS
  COLLECTION  Path to Bruno collection directory

FLAGS
  --outName=<value>  [default: op-secrets.json] JSON output file name
  --title=<value>    1Password item title
  --upsertItem       Create or Update 1Password item
  --vault=<value>    [default: Employee] 1Password vault name

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Extract secrets from Bruno environment files and generate pre-request script for fetching from 1Password

EXAMPLES
  $ op-bruno sync ./bruno-collection --outName secrets.json

  $ op-bruno sync ./bruno-collection --outName secrets.json --vault Engineering --title "API Secrets" --upsertItem

See code: src/commands/sync.ts

How It Works

  1. Secret Extraction: The tool scans Bruno environment files (.bru files) in the environments directory and identifies secret variables.

  2. JSON Export: Extracted secrets are exported to a JSON file with the following structure:

    {
      "development": {
        "API_KEY": "op://path/to/the/secret",
        "SECRET_TOKEN": "op://path/to/the/secret"
      },
      "production": {
        "API_KEY": "op://path/to/the/secret",
        "SECRET_TOKEN": "op://path/to/the/secret"
      }
    }
  3. Bruno Configuration: The tool modifies bruno.json to enable filesystem access, allowing pre-request scripts to execute system commands

  4. Pre-request Script Generation: A pre-request script is added to collection.bru that:

    • Fetches secrets from 1Password based on the current environment
    • Sets Bruno environment variables with the fetched values
  5. 1Password Storage: If enabled, creates/updates a structured 1Password item with sections for each environment

Pre-request Script

The generated pre-request script in collection.bru will:

  1. Detect the current Bruno environment
  2. Fetch corresponding secrets from 1Password
  3. Set environment variables for use in requests

Security Considerations

  • Ensure 1Password CLI is properly configured and authenticated
  • Use appropriate vault permissions in 1Password
  • Review generated pre-request scripts before use

Development

# Run in development mode
yarn dev

# Build the project
yarn build

# Run tests
yarn test

# Lint code
yarn lint

Troubleshooting

1Password CLI Not Found

Install the 1Password CLI from 1Password Developer

Vault Access Denied

Ensure you're signed in to 1Password CLI:

op signin

Pre-request Script Already Exists

The tool will preserve existing scripts and add the secret management code. Review the modified collection.bru file to ensure compatibility.

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.