How to design the best APIs with Bruno

Friends on the dark side of dev, you’ve probably used Postman to test your APIs, and I don’t blame you because it’s a really powerful tool that has found its way into the hearts of many developers.

However, you also know how a bit cumbersome it can be, especially when it comes to using it to collaborate on a big project.

Luckily, I have something pretty cool to share with you: Bruno, an open-source project that promises to revolutionize the world of API clients.

To understand the value of Bruno, imagine a tool that allows you to store your API collections so that you can then store and test them directly from your source code repository, thanks to the Bru language. This allows you to enjoy simple version control and say goodbye to cumbersome workspaces—great for working collaboratively with your colleagues without any hassle.

To get started with Bruno, all you have to do is install the tool by downloading it for Windows, macOS, and Linux from the official website. Then you just have to describe the entire API you are designing. I invite you to watch this video to understand how it works:

Bruno is also available from the command line. You can install it using your favorite Node package manager, such as NPM:

npm install -g @usebruno/cli

Then, with the Bruno CLI in hand, you can run entire collections of APIs via simple commands directly from your terminal. This makes the process of testing and automating APIs much easier.

To use the CLI, first navigate to the directory containing your API collection and run the following command:

bru run

You can also run a single query like this:

bru run request.bru

Or, if you want to run all the queries in a folder, use this command:

bru run folder

To specify an environment, simply add the option: --env

bru run --env env_name

Note that Bruno also exists as an extension for Visual Studio Code.

All in all, Bruno is a lightweight and versatile alternative to traditional API clients, offering a simpler and more efficient approach to working with API collections. With its seamless integration with the source code repository and command line, Bruno makes teamwork easy and hassle-free.

Enough to say goodbye to Postman, right?

"Because of the Google update, I, like many other blogs, lost a lot of traffic."

Join the Newsletter

Please, subscribe to get our latest content by email.

Mohamed SAKHRI
Mohamed SAKHRI

I'm the creator and editor-in-chief of Tech To Geek. Through this little blog, I share with you my passion for technology. I specialize in various operating systems such as Windows, Linux, macOS, and Android, focusing on providing practical and valuable guides.

Articles: 1417

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Leave a Reply

Your email address will not be published. Required fields are marked *