Skip to main content

๐Ÿป Bruno

๐Ÿ“š Table of Contentsโ€‹

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)โ€‹

  • 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

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 ๐Ÿป๐Ÿ“