usebruno / bruno

Opensource IDE For Exploring and Testing Api's (lightweight alternative to postman/insomnia)
https://www.usebruno.com/
MIT License
27.28k stars 1.25k forks source link

Allow editing .env files in Bruno #2009

Open VictorioBerra opened 7 months ago

VictorioBerra commented 7 months ago

When im in Bruno working in my environments, I have to open my .env file in another program to edit them.

DanaEpp commented 7 months ago

When you refer to "working in an environment", what do you mean?

I can configure and update my environment from the top right.

image

However, that is to the environment .bru file, not a proper dotenv file.

Can you provide clarity on what you want to edit within Bruno?

VictorioBerra commented 7 months ago

The .env file @DanaEpp https://docs.usebruno.com/secrets-management/dotenv-file

This file lives at the collection level. And can be referenced in environments. It cannot however, be edited inside Bruno.

DanaEpp commented 7 months ago

OK, got it. So you basically want to edit the .env files just like you edit the bruno.json if you have Golden Edition.

It makes sense I guess.

For now, if you want to edit vars directly in Bruno you need to use Environments with "Secret Variables" (https://docs.usebruno.com/secrets-management/secret-variables) and let Bruno store them safely outside of the .bru file.

amberlionk commented 3 months ago

The better approach, would be just to show .env file in the left tree, where it shows api endpoints. That would be the best from perspective of user experience.

  1. user know there there is .env file for this collection.
  2. easy to edit: click, to open in tab, change, and that's it.

To edit thru config (the grid) icon - its a pain. But if you have a set of API, which all relies on some environment dependednt variable, now, there is no other way. for exsample:

/person/{{id}} /person/{{id}}/settings /person/{{id}}/orders

and you wont quickly run thru all of them, for few persons. instead of change in 1 tab, and after click,click,click user must open env settings, in dialog find field, change, save,close, and only after make calls in API tabs.