bruno icon indicating copy to clipboard operation
bruno copied to clipboard

CLI STDOUT output

Open rochacbruno opened this issue 2 years ago • 2 comments

Hi,

Maybe I am missing something, but I was not able to find the answer, I am doing.

❯ cat settings.bru 
meta {
  name: settings
  type: http
  seq: 1
}

get {
  url: http://localhost:5001/api/automation-hub/_ui/v1/settings/
  body: none
  auth: none
}

❯ bru run settings.bru
Running Request 

settings (200 OK) - 93 ms

Requests:    1 passed, 1 total
Tests:       0 passed, 0 total
Assertions:  0 passed, 0 total
Ran all requests - 93 ms

And that is great for tests.

But I am trying to reuse the same .bru files I have to chain requests on the CLI and I see I can pass --output to have it saved to a file, however I wanted to have output send to the STDOUT so I can '|' to other application such as jq is that possible?

Something like:

$ bru run settings.bru --output stdout | jq
{

 ...
}

rochacbruno avatar Oct 30 '23 18:10 rochacbruno

up on this, I'm also interested on this feature

paulopacitti avatar Feb 22 '24 20:02 paulopacitti

Yeah, I'd like to use Bruno in some of my pipelines, it would be really useful to have have this feature. In my opinion, if the --format flag is provided but no --output flag, stdout would be a reasonable target.

jzorn avatar Mar 21 '24 11:03 jzorn

+1 to script and pipe directly to jq for processing

dernorberto avatar Sep 09 '25 15:09 dernorberto