A lightweight, powerful CLI tool written in Go to convert Bruno API collections (.bru files) into Postman Collection v2.1 format.
- Recursive Conversion: Automatically traverses your project directories to find all
.brufiles. - Authentication Inheritance: Fully supports Bruno's authentication hierarchy (Global -> Folder -> Request). Inherited authentication is correctly resolved for each endpoint in the Postman collection.
- Documentation & Examples: Preserves your request documentation (Markdown) and saved response examples.
- Selective Export: Filter which folders to include in the final collection.
- Variable Replacement: Replace Bruno variables (e.g.,
{{baseUrl}}) with specific values or Postman variables during conversion. - Sensitive Data Sanitization: Remove specific headers or variables (like Admin Tokens) from the exported collection. Endpoints using removed variables in their URL or Body will be automatically skipped.
- Dynamic Output Naming: Automatically generates output filenames with timestamps if not specified.
If you have Go installed, you can install the tool directly:
go install github.com/jonathanhecl/bru-ship@latestEnsure you have Go installed (1.18+ recommended).
git clone https://github.com/jonathanhecl/bru-ship.git
cd bru-ship
go build -o bru-shipThis project uses GitHub Actions to automatically build and release binaries for multiple platforms (Windows, macOS, Linux) whenever a new tag is pushed.
To trigger a release:
- Create a new tag:
git tag v1.0.1 - Push the tag:
git push origin v1.0.1
The workflow will automatically:
- Build the application for Windows (amd64), Linux (amd64), and macOS (amd64/arm64).
- Create a GitHub Release with the artifacts.
Run the tool from your terminal. If no arguments are provided, it will display the help message.
./bru-ship [flags]| Flag | Description | Default |
|---|---|---|
-input |
Root directory of your Bruno collection. | . (Current Dir) |
-output |
Path for the generated Postman JSON file. If omitted, generates [Folders]-[Timestamp].json. |
collection.json (or dynamic) |
-title |
Title for the generated Postman Collection. | Collection Name from bruno.json or Directory Name |
-folders |
Comma-separated list of specific folders to include (e.g., Auth,Users). |
(All folders) |
-ignore |
Comma-separated list of keywords. Any endpoint whose name contains one of these keywords will be skipped (e.g., [DEPRECATED],Old). |
- |
-replace |
Replace a variable in URLs/Bodies. Format: key=value. Can be repeated. |
- |
-remove |
Remove a header or variable by key. Can be repeated. | - |
-env |
Name of the environment file to load variables from (e.g., Production). Looks in environments/<name>.bru. |
- |
-keep-folders |
Keep the folder structure in the generated collection. | false |
-verbose |
Enable verbose logging to see skipped endpoints and other details. | false |
1. Basic Conversion
Convert the current directory's Bruno collection to collection.json.
./bru-ship2. Selective Export with Replacements
Export only the Core and Billing folders, replace {{baseUrl}} with a staging URL, and remove the AdminSecret header.
./bru-ship -folders "Core,Billing" -replace "baseUrl=https://staging.api.com" -remove "AdminSecret" -env "Production"3. Custom Input and Output
Convert a collection located in ../my-api and save it as export.json.
./bru-ship -input "../my-api" -output "export.json"- Scans the input directory recursively.
- Parses
.brufiles using a custom parser (handling blocks likemeta,headers,body,vars). - Filters content based on your
-foldersflag. - Sanitizes and Replaces variables in URLs and Bodies according to your configuration.
- Generates a Postman v2.1 compatible JSON file.
MIT