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

@gyeonghokim/bruno-to-openapi

v1.2.0

Published

Convert Bruno API collections to OpenAPI 3.0 specification

Readme

Bruno to OpenAPI

Convert Bruno collections to OpenAPI specifications with ease. This library provides a simple way to transform Bruno collection directories into standardized OpenAPI 3.x specifications.

Installation

Install the package using npm:

npm install @gyeonghokim/bruno-to-openapi

Get Started

Once installed, you can use the library to convert your Bruno collections to OpenAPI specifications. Below are examples showing how to export to both JSON and YAML formats.

JSON Export (Async)

import { convertBrunoCollectionToOpenAPI } from '@gyeonghokim/bruno-to-openapi';
import fs from 'fs';

async function convertCollection() {
  // Convert Bruno collection directory to OpenAPI specification
  const result = await convertBrunoCollectionToOpenAPI('./path-to-your-bruno-collection-directory');

  // Save as JSON file
  fs.writeFileSync('openapi-spec.json', JSON.stringify(result.spec, null, 2));
  console.log('OpenAPI specification saved as openapi-spec.json');
}

convertCollection();

YAML Export (Async)

To export as YAML, you can use the js-yaml library along with this package:

npm install js-yaml
import { convertBrunoCollectionToOpenAPI } from '@gyeonghokim/bruno-to-openapi';
import yaml from 'js-yaml';
import fs from 'fs';

async function convertCollection() {
  // Convert Bruno collection directory to OpenAPI specification
  const result = await convertBrunoCollectionToOpenAPI('./path-to-your-bruno-collection-directory');

  // Convert to YAML and save
  const yamlString = yaml.dump(result.spec, { indent: 2 });
  fs.writeFileSync('openapi-spec.yaml', yamlString);
  console.log('OpenAPI specification saved as openapi-spec.yaml');
}

convertCollection();

JSON Export (Sync)

import { convertBrunoCollectionToOpenAPISync } from '@gyeonghokim/bruno-to-openapi';
import fs from 'fs';

function convertCollection() {
  // Convert Bruno collection directory to OpenAPI specification synchronously
  const result = convertBrunoCollectionToOpenAPISync('./path-to-your-bruno-collection-directory');

  // Save as JSON file
  fs.writeFileSync('openapi-spec.json', JSON.stringify(result.spec, null, 2));
  console.log('OpenAPI specification saved as openapi-spec.json');
}

convertCollection();

YAML Export (Sync)

import { convertBrunoCollectionToOpenAPISync } from '@gyeonghokim/bruno-to-openapi';
import yaml from 'js-yaml';
import fs from 'fs';

function convertCollection() {
  // Convert Bruno collection directory to OpenAPI specification synchronously
  const result = convertBrunoCollectionToOpenAPISync('./path-to-your-bruno-collection-directory');

  // Convert to YAML and save
  const yamlString = yaml.dump(result.spec, { indent: 2 });
  fs.writeFileSync('openapi-spec.yaml', yamlString);
  console.log('OpenAPI specification saved as openapi-spec.yaml');
}

convertCollection();

Features

  • Converts Bruno collections to OpenAPI 3.x specifications
  • Supports all common HTTP methods and parameters
  • Handles authentication configurations
  • Preserves request/response examples
  • Maintains folder structures as tags
  • Supports both JSON and YAML output formats
  • Provides synchronous and asynchronous conversion options
  • Includes collection validation utilities

API Reference

The library exports the following functions:

  • convertBrunoCollectionToOpenAPI(collectionPath): Asynchronously takes a Bruno collection directory path and returns a Promise resolving to the conversion result containing the OpenAPI specification.
  • convertBrunoCollectionToOpenAPISync(collectionPath): Synchronously takes a Bruno collection directory path and returns the conversion result containing the OpenAPI specification (Note: The full synchronous implementation has limitations and it's recommended to use the async version).
  • isValidBrunoCollection(collectionPath): Asynchronously validates if a given path contains a valid Bruno collection and returns a Promise resolving to true if valid.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the MIT License.