Skip to main content

Overview

Bruno stores collections as plain text files directly on your filesystem, making it perfect for version control. Unlike cloud-based API tools, Bruno uses Git-friendly formats that enable true collaboration through pull requests, branches, and code reviews.

File Structure

Bruno collections are organized in a simple directory structure:

Collection Configuration

The bruno.json file contains collection settings:
bruno.json

Request Files

Each request is stored as a .bru file using plain text markup:
ping.bru

Environment Files

Environment variables are stored in .bru files:
environments/Prod.bru

Git Workflow

1

Initialize Git repository

Create a new Git repository for your collection:
2

Create a .gitignore file

Add files you want to exclude:
.gitignore
3

Push to remote repository

Add a remote and push:

Collaboration Workflows

Feature Branch Workflow

1

Create a feature branch

2

Add new requests

Create new .bru files in Bruno and organize them:
3

Commit your changes

4

Push and create pull request

Then create a PR on GitHub/GitLab for review.

Team Collaboration

Clone Collection

Team members can clone and start working:
Open the folder in Bruno to start testing.

Pull Latest Changes

Stay in sync with team updates:
Bruno will automatically reflect the changes.

Review Changes

Review API changes in pull requests:
  • See exactly what requests changed
  • Review test scripts and assertions
  • Check environment variable updates

Resolve Conflicts

Merge conflicts are easy to resolve since .bru files are plain text:

Branch Strategies

Gitflow for API Collections

  • Production-ready API tests
  • Only merge from release branches
  • Protected branch with required reviews

Managing Secrets

Never commit sensitive data to version control!

Using Environment-Specific Files

Create separate environment files and exclude secrets:
.gitignore

Environment Variable Templates

Commit template files instead:
environments/Production.bru.template
Team members copy and fill in their own values:

Using Process Environment Variables

Reference system environment variables in Bruno:
environments/Prod.bru
Set them in your shell or CI/CD:

Git Best Practices

Follow conventional commit format:
Each commit should represent a single logical change:
Protect important branches on GitHub/GitLab:
  • Require pull request reviews
  • Require status checks (CI tests) to pass
  • Require branches to be up to date
  • Restrict who can push
Tag important versions:
Delete merged feature branches:

Monorepo vs Multi-repo

Keep all API collections in one repository:
Pros:
  • Single source of truth
  • Easy to share environments
  • Simpler dependency management
Cons:
  • Larger repository size
  • Requires discipline for organization

Code Review Checklist

When reviewing Bruno collection pull requests:
  • Request URLs use environment variables (not hardcoded)
  • No secrets or sensitive data committed
  • Tests include proper assertions
  • Request names are descriptive
  • Folder organization is logical
  • Environment files follow naming conventions
  • Pre-request and post-response scripts are documented
  • Changes work with existing collection structure

Advanced: Git Hooks

Automate checks with Git hooks:
.git/hooks/pre-commit
Make it executable:

Integration with Code

Store Bruno collections alongside your application code:
Add npm scripts:
package.json

Why Bruno Works Better with Git

Plain Text Format

.bru files are human-readable text files, perfect for diff tools and merge operations.

File-per-Request

Each request is its own file, preventing merge conflicts when multiple people work on different endpoints.

No Binary Exports

Unlike Postman exports, everything is editable text that works seamlessly with Git.

Offline-First

No cloud sync means full control over your version history through Git.
Pro tip: Use Bruno’s Golden Edition for end-to-end encrypted cloud storage while still maintaining full Git workflow compatibility.