Scripts2026年4月11日·1 分钟阅读

Bruno — Open-Source IDE for API Exploration & Testing

Bruno is an open-source IDE for exploring and testing APIs — a lightweight, offline-first alternative to Postman and Insomnia. Stores collections as plain text files in your filesystem so they version-control naturally with Git.

SC
Script Depot · Community
快速使用

先拿来用,再决定要不要深挖

这里应该同时让用户和 Agent 知道第一步该复制什么、安装什么、落到哪里。

Download from https://www.usebruno.com/downloads (Mac/Win/Linux) or:

# macOS
brew install bruno

# CLI for CI
npm i -g @usebruno/cli
bru run --env prod tests/

Create a request (users.bru):

meta {
  name: List Users
  type: http
  seq: 1
}

get {
  url: {{baseUrl}}/api/users
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
介绍

Bruno is an open-source, offline-first API client. Stores collections as plain .bru text files in your filesystem — perfect for Git versioning. The Postman-killer for teams who refuse cloud lock-in.

What Bruno Does

  • HTTP requests — REST, GraphQL, gRPC (beta)
  • Plain text storage.bru files in your repo
  • Environments — dev/staging/prod variables
  • Scripting — pre-request and post-response JavaScript
  • Tests — assertions on responses
  • Auth — Basic, Bearer, OAuth2, AWS Sig
  • CLIbru run for CI/CD
  • Offline — no account, no cloud sync

Architecture

Electron app + open .bru file format (similar to HTTP files). Each collection is a directory tree. Environment files are .env style. CLI shares the same engine for headless runs.

Self-Hosting

Desktop app — no server. Collections live in your Git repo.

# Project structure
my-api/
├── bruno.json
├── environments/
│   ├── dev.bru
│   └── prod.bru
└── users/
    ├── list.bru
    └── create.bru

Key Features

  • Plain text .bru format (Git-friendly)
  • Offline by default (no cloud account)
  • Environment variables
  • JavaScript scripting (pre/post)
  • Built-in assertions
  • CLI for CI/CD
  • OpenAPI/Postman import
  • Free, no paywall

Comparison

Tool Storage Cloud CLI Price
Bruno Plain text Optional Yes Free
Postman Cloud DB Required Newman Paid tiers
Insomnia YAML Optional Inso Paid tiers
Hoppscotch Cloud/local Optional Yes Free + paid

常见问题 FAQ

Q: 能从 Postman 迁移吗? A: 能。File → Import → 选 Postman collection JSON。Bruno 自动转 .bru 文件。

Q: 团队协作怎么做? A: 把 collection 存 Git 仓库,团队 push/pull。环境变量用 .env 隔离敏感信息。

Q: 支持 GraphQL 吗? A: 支持。请求类型选 GraphQL,自动提供 introspection。

来源与致谢 Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产