brunogen
v0.4.14
Published
Scan Laravel, Express.js, and Go API projects, normalize them into OpenAPI, and emit ready-to-try Bruno collections.
Maintainers
Readme
brunogen
Brunogen scans a Laravel, Express.js, or Go API codebase, normalizes what it finds into OpenAPI, and emits a Bruno collection you can try immediately.
Laravel is the strongest path today, with materially richer request and response inference. Express.js and Go support are already usable for conventional codebases, but they remain more heuristic.
Quick Start
Best first run: start with Laravel if you want the most complete inference path in under a minute.
npm i -g brunogen
brunogen init
brunogen generateDefault output:
.brunogen/openapi.yaml.brunogen/bruno/
If you are testing from this repository checkout instead of an installed package, run npm install, npm run build, and npm link once from the repository root first.
What You Get
openapi.yamlgenerated directly from routes, handlers, controllers, and request/response patterns- A ready-to-open Bruno collection under
.brunogen/bruno/ - Warnings for patterns Brunogen could not infer confidently
Framework Paths
| Framework | Current fit | First place to try | Demo |
| --- | --- | --- | --- |
| Laravel | Strongest path today | cd tests/fixtures/laravel && brunogen init && brunogen generate | Laravel demo |
| Express | Useful, still heuristic | cd tests/fixtures/express && brunogen init && brunogen generate | Express demo |
| Go | Experimental | cd tests/fixtures/gin && brunogen init && brunogen generate | Go demo |
To refresh the checked-in demo snapshots after an intentional output change:
npm run demo:laravel
npm run demo:express
npm run demo:goCommands
initcreates a starter config in the current directorygeneratescans the current project and writes OpenAPI plus a Bruno collectionwatchregenerates when supported source files changevalidatechecks generated OpenAPI outputdoctorshows environment and framework detection details
Works Best Today
- Laravel route scanning from
routes/*.php, including groups, prefixes, middleware hints, andapiResource - Laravel request inference from FormRequest rules, inline validation, and common manual accessors such as
query,header, typed accessors,has,filled,safe()->only(...), andenum(...) - Laravel response inference for direct arrays,
response()->json(...),noContent(), same-controller helpers,JsonResource,->additional(...), and common abort/error/not-found paths - Express scanning for mounted routers, straightforward request access patterns, and local response helpers
- Go Gin, Fiber, and Echo scanning for conventional route registration and direct JSON responses
- Bruno export with environments, baseline auth support, and native response
example {}blocks
How It Works
source code
-> framework adapter
-> normalized endpoint model
-> openapi.yaml
-> Bruno collectionOpenAPI becomes the internal source of truth after scanning. Bruno is the output target.
