Bruno is the open-source, Git-first API client that keeps collections on disk as plain-text .bru / .yaml files—zero vendor lock-in. Cursor is the AI-powered code editor that turns natural-language prompts into production code.
Put them together and you can generate, test, and CI/CD-drive entire API suites without ever leaving your editor. This guide shows you how.
mkdir -p .cursor && touch .cursor/agents.md
agents.md so Cursor knows how to scaffold .bru files, environments, and tests.repo/
├─ .cursor/
│ └─ agents.md # Cursor rules for Bruno
├─ src/ # Your app code
├─ routes/
│ ├─ api/
│ │ ├─ data/
│ │ │ ├─ Get_Data.js
│ │ │ └─ Create_Data.js
│ │ │ └─ Update_Data.js
│ ├─ db/
│ │ ├─ local.js
│ │ └─ prod.js
│ └─ tests/
│ └─ users-test.js
"Create a Bruno collection for every Express route inside src/routes.
- Infer RESTful methods from file names
- Set baseURL from environment variable
- Add port variable default 3000
- Generate matching environment files for local, prod"
Open the same collection created by Cursor AI in Bruno.
"Write a GitHub Actions workflow that:
- Runs on every push
- Starts the application in the background
- Executes the whole Bruno collection
- Generate and uploads HTML report using Bruno CLI"
Generated result HTML file in CI/CD
"For each endpoint in bruno/collections add pre-request and test scripts that:
- Validate 200 OK
- Validate 400 for missing body
- Validate 401 for wrong token
- Check response schema against OpenAPI spec"
.env filesYou can use the Bruno Converter package to convert Postman/Insomnia and OpenAPI spec to Bruno.
Bruno's plain-text specs work with any AI:
Grab ready-made prompts from the official repo:
github.com/bruno-collections/ai-assistant-prompts
Cursor + Bruno turns API testing into a true part of the codebase:
Happy automated testing!