Set Environment Variable
set_environment_variableAdd or update a single variable in an existing Bruno environment while preserving all other variables.
Instructions
Set (add or update) a single variable in an existing Bruno environment. MERGES into the environment — all other variables are preserved.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Variable key to set. | |
| value | Yes | Variable value. | |
| secret | No | Whether the variable is a secret. Persisted. IMPORTANT: marking a variable secret means its VALUE IS NOT SAVED — Bruno stores a secret variable as a name only (.bru lists it under vars:secret, .yml writes secret: true with no value) and keeps the value outside the collection, so `value` is discarded. Omit this to leave an existing variable's secret state untouched; pass false to convert a secret variable back to a plain one carrying `value`. | |
| enabled | No | Whether the variable is enabled. Persisted: enabled=false is written as a disabled variable. | |
| environment | Yes | Name of the existing environment. | |
| collectionPath | Yes | Absolute path to existing collection directory. |