
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@gyeonghokim/bruno-to-openapi
Advanced tools
Convert Bruno API collections to OpenAPI 3.0 specification
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.
Install the package using npm:
npm install @gyeonghokim/bruno-to-openapi
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.
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();
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();
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();
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();
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.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.
This project is licensed under the MIT License.
FAQs
Convert Bruno API collections to OpenAPI 3.0 specification
We found that @gyeonghokim/bruno-to-openapi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.