2023-02-07 23:15:27 +01:00
# bruno-cli
2023-04-01 10:10:23 +02:00
With Bruno CLI, you can now run your API collections with ease using simple command line commands.
2023-02-07 23:15:27 +01:00
2023-04-01 10:10:23 +02:00
This makes it easier to test your APIs in different environments, automate your testing process, and integrate your API tests with your continuous integration and deployment workflows.
## Installation
2023-09-25 23:48:53 +02:00
2023-04-01 10:10:23 +02:00
To install the Bruno CLI, use the node package manager of your choice, such as NPM:
2023-09-25 23:48:53 +02:00
2023-04-01 10:10:23 +02:00
```bash
npm install -g @usebruno/cli
```
## Getting started
2023-09-25 23:48:53 +02:00
2023-04-01 10:10:23 +02:00
Navigate to the directory where your API collection resides, and then run:
2023-09-25 23:48:53 +02:00
2023-04-01 10:10:23 +02:00
```bash
2023-04-01 10:25:32 +02:00
bru run
2023-04-01 10:10:23 +02:00
```
2023-09-25 23:48:53 +02:00
2023-04-01 10:10:23 +02:00
This command will run all the requests in your collection. You can also run a single request by specifying its filename:
```bash
2023-04-01 10:25:32 +02:00
bru run request.bru
2023-04-01 10:10:23 +02:00
```
2023-08-29 11:36:35 +02:00
Or run all requests in a collection's subfolder:
2023-09-25 23:48:53 +02:00
2023-02-07 23:15:27 +01:00
```bash
2023-04-01 10:25:32 +02:00
bru run folder
2023-04-01 10:10:23 +02:00
```
If you need to use an environment, you can specify it with the --env option:
2023-09-25 23:48:53 +02:00
2023-04-01 10:10:23 +02:00
```bash
2023-04-01 10:25:32 +02:00
bru run folder --env Local
2023-04-01 10:10:23 +02:00
```
2023-09-25 23:48:53 +02:00
If you need to collect the results of your API tests, you can specify the --output option:
```bash
bru run folder --output results.json
```
2023-04-01 10:16:13 +02:00
## Demo
2023-09-25 23:48:53 +02:00
2023-04-01 10:27:59 +02:00
![demo ](assets/images/cli-demo.png )
2023-04-01 10:16:13 +02:00
2023-04-01 10:10:23 +02:00
## Support
2023-09-25 23:48:53 +02:00
2023-04-01 10:10:23 +02:00
If you encounter any issues or have any feedback or suggestions, please raise them on our [GitHub repository ](https://github.com/usebruno/bruno )
Thank you for using Bruno CLI!
2023-09-04 08:54:18 +02:00
## Changelog
2023-09-25 23:48:53 +02:00
2024-03-11 13:16:14 +01:00
<!-- An absolute link is used here because npm treats links differently -->
2024-03-12 18:47:47 +01:00
See [https://github.com/usebruno/bruno/releases ](https://github.com/usebruno/bruno/releases )
2023-04-01 10:10:23 +02:00
## License
2023-09-25 23:48:53 +02:00
[MIT ](license.md )