bruno/packages/bruno-cli/readme.md

65 lines
1.5 KiB
Markdown
Raw Normal View History

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-04-01 10:10:23 +02:00
To install the Bruno CLI, use the node package manager of your choice, such as NPM:
2023-04-01 10:10:23 +02:00
```bash
npm install -g @usebruno/cli
```
## Getting started
2023-04-01 10:10:23 +02:00
Navigate to the directory where your API collection resides, and then run:
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-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
```
Or run all requests in a collection's subfolder:
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-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
```
If you need to collect the results of your API tests, you can specify the --output option:
```bash
bru run folder --output results.json
```
## Demo
![demo](assets/images/cli-demo.png)
2023-04-01 10:10:23 +02:00
## Support
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
<!-- An absolute link is used here because npm treats links differently -->
See [https://github.com/usebruno/bruno/releases](https://github.com/usebruno/bruno/releases)
2023-04-01 10:10:23 +02:00
## License
[MIT](license.md)