fern/snippets/setting-env-vars.mdx
Once you open a .baml file in VSCode, you should see a small button over every BAML function: Open Playground. Then you should be able to set environment variables in the settings tab.
Or type BAML Playground in the VSCode Command Bar (CMD + Shift + P or CTRL + Shift + P) to open the playground.
To send logs and traces to Boundary Studio, you need to set the BOUNDARY_API_KEY environment variable. This key is provided when you create an API key in your Boundary Studio dashboard.
BAML will do its best to load environment variables from your program. Any of the following strategies for setting env vars are compatible with BAML:
Dockerfilenext.config.jssecrets-store.csi.k8s.io.env file (using dotenv CLI)python-dotenv package in Python or dotenv package in Node.jsexport MY_SUPER_SECRET_API_KEY="..."
python my_program_using_baml.py
```python
from dotenv import load_dotenv
from baml_client import b
load_dotenv()
```
```typescript
import dotenv from 'dotenv'
import { b } from './baml_client'
dotenv.config()
```