Skip to content

NestBrunoYour NestJS API, always in sync with Bruno

A Rust CLI that reads your controllers and their imported DTOs β€” statically, without ever running your application β€” and keeps a Bruno API collection synchronized with the API you are actually building.

It follows your imports ​

A @Body() parameter is just a type name β€” unless your tool understands what that name points to. NestBruno resolves DTO declarations in separate files and turns them into usable request bodies:

ts
// users.controller.ts
import { CreateUserDto } from './dto/create-user.dto';

@Controller('users')
export class UsersController {
  @Post()
  create(@Body() dto: CreateUserDto) {}
}
ts
// dto/create-user.dto.ts
export class CreateUserDto {
  name: string;
  email: string;
  password: string;
}

Generated Bruno request β€” body included:

json
{
  "name": null,
  "email": null,
  "password": null
}
text
Controller ──▢ imported DTO ──▢ property extraction ──▢ JSON skeleton ──▢ Bruno request

Class DTOs and Zod schemas (z.object, z.infer, createZodDto, statically provable transformations) are both supported β€” through relative imports, barrels and re-exports, bounded to four hops. Anything NestBruno cannot resolve confidently stays an empty body, never a guessed one.

Measured, not marketed ​

Component benchmarks from the shipped Criterion suite (release build; i7-1255U, Linux; see methodology):

~40 Β΅s
resolve a controller's imported DTO
~540 Β΅s
extract 100 controllers / 300 routes
~12 ms
discover 1,000 files
~13 ms
no-op sync of a 750-request collection

Component benchmarks, not full-pipeline timings; absolute values vary with hardware. Reproduce with cargo bench.

Two commands to a living collection ​

sh
nestbruno init     # write nestbruno.toml with sane defaults
nestbruno watch    # generate the collection, then keep it in sync

Edit src/users/users.controller.ts:

ts
@Controller('users')
export class UsersController {
  @Get(':id')
  findOne(@Param('id') id: string) {}

  @Post()
  create(@Body() dto: CreateUserDto) {}
}

…and the collection updates itself:

txt
Changed: src/users/users.controller.ts
  Routes affected: 2
  Created: 1  Updated: 1  Deleted: 0  Conflicts: 0

What lands in your repo ​

txt
bruno/
β”œβ”€β”€ bruno.json
└── Users/
    β”œβ”€β”€ find-one.bru      # GET {{baseUrl}}/users/:id   + path params
    └── create.bru        # POST {{baseUrl}}/users      + JSON body skeleton

Every .bru file is valid Bruno β€” generated files round-trip through Bruno's own parser β€” and ends with a tool stamp in its docs block, which is how NestBruno knows what it owns and what you own. Hand-written requests and files you edited are preserved and reported as conflicts, never overwritten.

Give Your AI Agent NestBruno Knowledge ​

Install the official Agent Skill and your coding agent learns to operate NestBruno: inspect NestJS routes and DTO metadata through machine-readable JSON, keep Bruno collections in sync safely, and generate or update accurate API documentation from verified results β€” instead of guessing from decorators.

npx skills add Silent-Watcher/nestbruno --skill nestbruno

The skill ships from this repository β€” no npm package, no extra install. See the Agent Skill guide for what the agent learns and how to use it.