Skip to main content

Bruno Integration

Learn how to use Bruno API collections with Lighthouse.

Overview

Lighthouse integrates with Bruno, an open-source API client, to:

  • Browse API endpoints
  • Execute requests
  • View responses
  • Manage favorites and history

Configuration

Point Lighthouse to your Bruno collections:

// lighthouse.config.ts
export default defineLighthouseConfig({
brunoPath: './bruno', // Path to Bruno collections
// ...
});

Bruno Collection Structure

Lighthouse expects this structure:

bruno/
├── Collection-Name/
│ ├── folder.bru
│ ├── Core-Name/
│ │ ├── folder.bru
│ │ ├── HTTP-Proxy/
│ │ │ ├── folder.bru
│ │ │ └── request.bru
│ │ ├── HTTP-Direct/
│ │ │ └── request.bru
│ │ ├── SQS-Proxy/
│ │ │ └── queue.bru
│ │ └── SQS-Direct/
│ │ └── queue.bru

Browsing Requests

Navigate through collections in the Docs & API section:

┌─────────────────────────────────────────────────────────────┐
│ Docs & API │
├─────────────────────────────────────────────────────────────┤
│ │
│ ▼ Serverless-SST │
│ ▼ user │
│ ▼ HTTP-Proxy │
│ > GET list-users │
│ > POST create-user │
│ > GET get-user-by-id │
│ ▶ HTTP-Direct │
│ ▶ SQS-Proxy │
│ ▶ order │
│ ▶ product │
│ │
│ [Enter] Execute [F] Favorite [/] Search │
│ │
└─────────────────────────────────────────────────────────────┘

Executing Requests

  1. Navigate to a request
  2. Press Enter to execute
  3. View response in the panel
┌─────────────────────────────────────────────────────────────┐
│ Request: list-users │
├─────────────────────────────────────────────────────────────┤
│ │
│ GET http://localhost:5454/users │
│ │
│ Response: 200 OK (45ms) │
│ ───────────────────────── │
│ { │
│ "users": [ │
│ { "id": "1", "name": "John" }, │
│ { "id": "2", "name": "Jane" } │
│ ], │
│ "count": 2 │
│ } │
│ │
│ [R] Re-run [C] Copy [H] Headers [Esc] Back │
│ │
└─────────────────────────────────────────────────────────────┘

Variables

Lighthouse supports Bruno variables:

Folder Variables

Define in folder.bru:

vars {
baseUrl: http://localhost:5454
companyId: 123
authorization: Bearer token123
}

Request Variables

Use in requests:

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

Favorites

Mark frequently used requests as favorites:

  1. Navigate to request
  2. Press F to toggle favorite
  3. Access favorites from main menu

Request History

View recently executed requests:

┌─────────────────────────────────────────────────────────────┐
│ History │
├─────────────────────────────────────────────────────────────┤
│ │
│ 10:45:23 GET /users 200 45ms │
│ 10:44:12 POST /users 201 123ms │
│ 10:43:01 GET /users/123 200 32ms │
│ 10:42:15 GET /orders 200 67ms │
│ │
│ [Enter] Re-run [C] Clear History │
│ │
└─────────────────────────────────────────────────────────────┘

SQS Requests

Execute SQS requests to send messages:

post {
url: {{baseUrl}}/sqs/send
body: json
auth: inherit
}

body:json {
{
"queueName": "ProcessUserQueue",
"message": {
"userId": "{{userId}}",
"action": "process"
}
}
}

Quick search across all requests:

  1. Press / to open search
  2. Type to filter
  3. Enter to select
  4. Esc to cancel
┌─────────────────────────────────────────────────────────────┐
│ Search: user │
├─────────────────────────────────────────────────────────────┤
│ │
│ > GET list-users user/HTTP-Proxy │
│ POST create-user user/HTTP-Proxy │
│ GET get-user-by-id user/HTTP-Proxy │
│ POST process-user-queue user/SQS-Proxy │
│ │
│ [Enter] Select [↑↓] Navigate [Esc] Cancel │
│ │
└─────────────────────────────────────────────────────────────┘

Tips

  1. Use consistent naming: Keep request names descriptive
  2. Organize by core: Group related requests together
  3. Use variables: Avoid hardcoding values
  4. Document requests: Add descriptions in Bruno

Next Steps