Skip to main content

Bruno

Open-source, offline-first API client that stores collections as plain text files alongside your source code. No cloud sync, no account, no subscription - commit your requests to Git and review them in pull requests like any other code.

✓ Offline-first ✓ Git-native (plain text Bru files) ✓ No account required ✓ Built-in scripting ✓ CLI for CI/CD ✓ MIT open source

What is Bruno?

Bruno is an open-source API client built for developers who want their HTTP collections to live where their code lives - in a Git repository. While tools like Postman store collections in the cloud and require an account to collaborate, Bruno takes the opposite approach: every request is a plain text .bru file you can read, edit, diff, and commit without ever opening the GUI.

Bruno supports REST, GraphQL, and other HTTP APIs. It includes environments and variables, pre/post-request JavaScript scripting, assertions, authentication (bearer, basic, API key, OAuth 2.0), and a CLI runner for CI pipelines. The GUI app is available for macOS, Windows, and Linux. The project is fully open source under the MIT license with no paid tier or proprietary cloud component.

Key Features

Installation

# Install the Bruno CLI globally (for CI/scripting)
npm install -g @usebruno/cli

# Run a collection from the CLI
bru run --env production

# Run a specific folder of requests
bru run requests/users --env staging

# Run with environment variables and output JUnit XML (for CI)
bru run --env ci --reporter junit --output results.xml

# Download the GUI app (macOS / Windows / Linux)
# https://www.usebruno.com/downloads

GET Request with Assertions

Each request is a standalone .bru file. The assert block lets you declare expected response values inline - no separate test file needed.

# requests/users/get-user.bru
meta {
  name: Get User by ID
  type: http
  seq: 1
}

get {
  url: {{baseUrl}}/api/users/{{userId}}
  body: none
  auth: bearer
}

headers {
  Accept: application/json
  X-Request-ID: {{$randomUuid}}
}

auth:bearer {
  token: {{authToken}}
}

assert {
  res.status: eq 200
  res.body.id: eq {{userId}}
  res.body.email: isDefined
}

POST Request with Post-Response Script

Scripts run after a response arrives and can read the body, set variables, and chain into subsequent requests. Here a login request saves its returned token for use in later requests.

# requests/auth/login.bru
meta {
  name: Login
  type: http
  seq: 1
}

post {
  url: {{baseUrl}}/api/auth/login
  body: json
  auth: none
}

headers {
  Content-Type: application/json
}

body:json {
  {
    "email": "{{userEmail}}",
    "password": "{{userPassword}}"
  }
}

script:post-response {
  // Save the token for subsequent requests
  const token = res.getBody().token;
  bru.setVar("authToken", token);
}

assert {
  res.status: eq 200
  res.body.token: isDefined
}

Environments

Environment files define variables per target. Secret variable names are declared but their values are stored outside Git - Bruno keeps sensitive data out of your repository automatically.

# environments/staging.bru
vars {
  baseUrl: https://staging.api.example.com
  userId: 42
  userEmail: [email protected]
}

vars:secret [
  userPassword,
  authToken
]

# environments/production.bru
vars {
  baseUrl: https://api.example.com
  userId: 42
  userEmail: [email protected]
}

vars:secret [
  userPassword,
  authToken
]

Scripting API

Bruno's scripting layer exposes bru helpers for reading and writing variables, environment values, and request/response data. Use the Chai-style expect API for programmatic assertions.

// script:pre-request - runs before the HTTP request is sent
const timestamp = new Date().toISOString();
bru.setVar("requestTime", timestamp);

// Access environment variables
const baseUrl = bru.getEnvVar("baseUrl");
console.log("Sending request to:", baseUrl);

// script:post-response - runs after the response arrives
if (res.getStatus() === 401) {
  bru.setVar("authToken", "");
  console.warn("Token expired - clear and re-authenticate");
}

// Assertions in scripts (alternative to the assert block)
expect(res.getStatus()).to.equal(200);
expect(res.getBody()).to.have.property("id");

Bruno vs Postman

Feature Bruno Postman
Collection storagePlain text files on diskCloud (proprietary JSON export)
Git integrationNative - commit .bru filesRequires export/import
Account requiredNoYes
Open sourceYes (MIT)No
CI/CD runnerYes (bru CLI, free)Paid (Newman / Postman Cloud)
Published collection ecosystemGrowingLarge (Public API Network)

Pros and Cons

Pros

  • ✓ Collections stored as plain text - fully version-controllable
  • ✓ No cloud account, no telemetry, no subscription
  • ✓ Works offline without any setup
  • ✓ MIT open source - no vendor lock-in
  • ✓ Free CLI runner for CI/CD pipelines
  • ✓ Secrets never written to disk or committed to Git

Cons

  • ✗ Smaller ecosystem than Postman (fewer published collections)
  • ✗ GUI is less mature than Postman's (fewer advanced UI features)
  • ✗ No built-in team cloud sharing (Git repo is the collaboration layer)
  • ✗ Mock server support is limited compared to Postman
  • ✗ Fewer integrations with monitoring/alerting platforms

Frequently Asked Questions

What is Bruno?▼

Bruno is an open-source, offline-first API client for testing REST, GraphQL, and other HTTP-based APIs. It is designed as a direct alternative to Postman and Insomnia, with one key difference: every collection is stored as plain text files using Bruno's own Bru format on your local filesystem. There is no cloud sync, no account required, and no subscription - your API collections live alongside your source code in Git.

How does Bruno differ from Postman?▼

The biggest difference is that Bruno stores collections as plain text .bru files on disk, making them fully version-controllable with Git. Postman stores collections in its cloud by default and requires an account. Bruno has no cloud sync, no telemetry, no pricing tiers that gate features, and is open source under the MIT license. Postman has a more mature GUI, a larger ecosystem of published collections, and built-in cloud collaboration. If Git-native workflows and offline-first operation matter to you, Bruno is the better choice.

What is the Bru file format?▼

Bru is a simple, human-readable plain text format developed specifically for Bruno. Each .bru file represents one HTTP request and contains the method, URL, headers, body, authentication, pre/post-request scripts, and assertions - all in a clearly structured, diff-friendly format. Because .bru files are plain text, they can be reviewed in pull requests, searched with grep, and edited in any text editor without needing the Bruno GUI.

Can Bruno run in CI/CD pipelines?▼

Yes. Bruno ships a CLI tool (@usebruno/cli, installed via npm) that lets you run collections headlessly in any CI environment - GitHub Actions, GitLab CI, Jenkins, and others. You can target a specific environment file, output results as JUnit XML or JSON, and fail the build on assertion errors. This makes Bruno a complete API testing solution from local development through automated CI.

Is Bruno open source?▼

Yes. Bruno is fully open source under the MIT license. The source code is available on GitHub at github.com/usebruno/bruno. The core GUI application, the CLI runner, and the Bru language parser are all open source. There is no paid tier or proprietary cloud component - the entire tool is free to use, self-host, and contribute to.

Can I import existing Postman or Insomnia collections into Bruno?▼

Yes. Bruno supports importing collections exported from Postman (v2.1 JSON format) and Insomnia. After importing, Bruno converts each request into the .bru plain text format so you can immediately commit them to Git. Environment variables and authentication configs are also migrated. Some advanced Postman features may require manual adjustment after import.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Git Stash Manager OpenAPI Validator Git Cheatsheet Interactive Git Command Builder GitHub Actions Workflow Generator GitHub Actions YAML Linter API Response Mock Generator API Response Time Tester GitHub Stats Card Generator GitHub Actions Workflow Validator OpenAPI Schema Validator CI/CD Pipeline Generator OpenAPI Mock Generator GitHub Actions Matrix Builder GitHub Actions Cron Builder API Test Case Generator API Request Builder HTTP API Tester Git Commit Message Generator .gitignore Generator API Mock Server Config Generator Jest Testing Framework Guide API Rate Limit Calculator API Response Formatter & Analyzer LLM Cost Calculator Git Hooks Generator (Husky + lint-staged) AI Prompt Cost Calculator REST API Request Builder Vitest Guide — Vite-native Testing Cypress Frontend Testing Guide LLM Prompt Cost Calculator API Response Mocker ArgoCD Application Generator AI Rate Limit Calculator API Key Generator AI Commit Message Generator AI Doc Generator — Pro Tool AI Unit Test Generator — Pro Tool Developer Portfolio Checklist HTTP Methods Reference HTTP Code Snippet Generator HTTP Status Code Reference HTTP Status Code Reference JSON Diff Viewer JSON Diff Markdown Preview & Editor Markdown Table Generator README Generator Tech Stack Detector Rate Limiter Tester API Changelog Generator HTTP Mock Response Builder Rate Limit Calculator Webhook Tester CORS Policy Builder ArgoCD App Health Checker HTTP Status Code Lookup AI PR Description Generator HTTP Status Code Lookup ArgoCD App Diff Vue Component Generator HTTP Status Code Reference LLM Context Window Calculator LLM Token Counter k6 Load Test Script Generator Playwright E2E Test Generator Prompt Token Estimator Playwright E2E Testing Guide Mock Service Worker (MSW) API Mocking Guide Pulumi Modern IaC Guide HTML5 Canvas API Playground Prompt Injection Tester Token Context Calculator AI IDE Comparator OpenAI Function Calling Generator Token Counter & Cost Estimator AI API Rate Limit Calculator

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →