add env file resolver

This commit is contained in:
2025-05-02 12:24:46 +01:00
parent 8cf969c906
commit 30fabe8cfc
5 changed files with 39 additions and 11 deletions

View File

@@ -22,17 +22,19 @@ gobs-cli --host=localhost --port=4455 --password=<websocket password> --help
#### Environment Variables
Load connection details from your environment:
Store and load environment variables from:
```bash
#!/usr/bin/env bash
- A `.env` file in the cwd
- $XDG_CONFIG_HOME / gobs-cli / config.env (see [os.UserConfigDir][userconfigdir])
export OBS_HOST=localhost
export OBS_PORT=4455
export OBS_PASSWORD=<websocket password>
export OBS_TIMEOUT=5
```env
OBS_HOST=localhost
OBS_PORT=4455
OBS_PASSWORD=<websocket password>
OBS_TIMEOUT=5
```
## Commands
### VersionCmd
@@ -433,4 +435,6 @@ gobs-cli virtualcam toggle
```console
gobs-cli virtualcam status
```
```
[userconfigdir]: https://pkg.go.dev/os#UserConfigDir