๐ป Bruno
๐ Table of Contentsโ
- ๐ป Bruno
This framework is Bruno-first and optimized for Git-native, offline-first API development: file-based collections, clean diffs, deterministic reviews, and zero vendor lock-in.
It combines 5W1H with Good Prompt principles
(Clear role ยท Clear format ยท Clear goal ยท Clear context ยท Clear constraints)
The key idea:
๐ Bruno is a file-based API client, not a hosted platform
๐ Requests are source code, not UI state
๐ Git is the collaboration layer
๐๏ธ Context-ownedโ
These sections are owned by the prompt context.
They ensure clean, reviewable, production-grade Bruno usage.
๐ค Who (Role / Persona)โ
Default Persona (Recommended)โ
- You are a backend / platform / infra engineer
- You care about diffs, reviews, and reproducibility
- You prefer local tools over SaaS
- You treat API requests as code artifacts
Expected Expertiseโ
- HTTP fundamentals
- REST and/or GraphQL APIs
- Git workflows (PRs, reviews, diffs)
- Bruno collections & request files
- Environment variables & secrets
- Auth patterns (API keys, OAuth2, JWT)
- CLI-driven workflows
๐ ๏ธ How (Format / Constraints / Style)โ
๐ฆ Format / Outputโ
- Prefer:
- File-based collections committed to Git
- One request per file
- Show:
- Request definition + tests together
- Explain:
- why a request exists
- what it guarantees
- Use:
- Folders to model API structure
- Naming conventions for clarity
โ๏ธ Constraints (Bruno Best-Practice Rules)โ
- One repo (or folder) = one API surface
- Requests must be:
- deterministic
- reviewable
- Never commit:
- secrets
- tokens
- Environments are:
- local files
- ignored by Git
- Treat request files as source of truth
๐งฑ Collections-as-Files, Environments & Architectureโ
- Collection (folder)
- Represents an API or bounded context
- Request file
- Single HTTP interaction + assertions
- Environment
- Runtime configuration (local, staging, prod)
Clear separation:
- Files = intent
- Environments = configuration
- Git = collaboration & history
โก Git-first Workflows, Testing & Automationโ
- Typical workflow:
- Add or modify request files
- Review diffs in PR
- Run locally or via CLI
- Use tests to:
- assert status codes
- validate response shape
- Integrate with CI:
- run Bruno collections headlessly
- Prefer:
- text diffs
- code review
- reproducibility
Bruno shines where UI-heavy tools break down.
๐งช Reliability, Security & Portabilityโ
- Secrets stored in:
- environment files
- CI secret managers
- Collections are:
- portable
- offline-capable
- No cloud sync required
- No vendor lock-in
- Easy long-term maintenance
๐ Explanation Styleโ
- Code-first language
- Git-centric explanations
- Explain intent and guarantees
- Avoid UI walkthroughs
- Assume reader understands APIs and Git
โ๏ธ User-ownedโ
These sections must come from the user.
They define scope, collaboration model, and constraints.
๐ What (Task / Action)โ
Examples:
- Create a Git-tracked API test suite
- Review API behavior via PRs
- Replace Postman with a local tool
- Build deterministic API checks
๐ฏ Why (Intent / Goal)โ
Examples:
- Eliminate vendor lock-in
- Enable clean code reviews
- Improve reproducibility
- Support offline development
๐ Where (Context / Situation)โ
Examples:
- Backend repositories
- Platform / infra repos
- OSS projects
- CI pipelines
โฐ When (Time / Phase / Lifecycle)โ
Examples:
- API design phase
- Refactor / migration
- CI hardening
- Long-term maintenance
๐ Final Prompt Template (Recommended Order)โ
1๏ธโฃ Persistent Context (Put in repo README)โ
# Bruno Usage Rules
You are using Bruno as a Git-first, file-based API client.
## Core Principles
- Requests are code
- Git is the collaboration layer
- Environments are never committed
## Structure
- One API per folder
- One request per file
- Clear, stable naming
## Security
- No secrets in Git
- Use env files and CI secrets
## Automation
- Tests live with requests
- Bruno CLI runs in CI
2๏ธโฃ User Prompt Templateโ
What I want to do:
[Describe the API or testing goal.]
Why it matters:
[Reproducibility, reviewability, automation.]
Where this applies:
[Repo, CI, local dev.]
(Optional)
When this is needed:
[Design, migration, maintenance.]
(Optional)
โ Fully Filled Exampleโ
What I want to do:
Replace Postman collections with a Git-tracked Bruno setup.
Why it matters:
We want clean PR diffs and deterministic API tests.
Where this applies:
Backend monorepo and CI pipeline.
When this is needed:
During API stabilization.
๐ง Why This Ordering Worksโ
- Files before UI ensures reviewability
- Git before collaboration avoids lock-in
- Determinism before convenience scales teams
Bruno turns API requests into code.
Git turns changes into conversations.
Determinism builds trust.
Happy hacking with Bruno ๐ป๐