> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usebruno.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Process Environment Variables

## Overview

Process environment variables are used to store sensitive information, such as API keys, passwords, and other secret values. These values are typically stored in a .env file. For more details on secret management, refer to the [secret management](https://docs.usebruno.com/secrets-management/dotenv-file.md) section.

### Creating a Process Environment Variables

To create process environment variables, you can add a .env file to the root of your Bruno collection. This file will store your secrets, which can then be accessed throughout the collection.

#### Example

In your Bruno collection, the structure might look like this:

**bruno-collection**

**api-folder**

**customer-api**

**example.bru**

**emp-api**

**details.bru**

**lib.js**

**.env**

**.gitignore**

**bruno.json**

**package.json**

In the `.env` file, you would store a key-value pair, like this:

```bash showLineNumbers filename=".env" theme={null}
authkey = anc123
```

### Using the Process Environment Variables

To access the values stored in the `.env` file, you can use the `process.env` global object. For example, if you want to retrieve the key value from your `.env` file, you would use:

![image](https://mintcdn.com/bruno-a6972042/KbpwWkeN627E4ypz/images/screenshots/variables/creating-process-env-variables.webp?fit=max\&auto=format\&n=KbpwWkeN627E4ypz\&q=85\&s=f4074f1c78ae61a13ea6ff4e0c5fd771)

You can use `process.env.<secret-name>` throughout your Bruno collection to securely manage and access your environment variables.

![image](https://mintcdn.com/bruno-a6972042/QYCaSeVC3onHpqpv/images/screenshots/variables/using-process-env-variables.webp?fit=max\&auto=format\&n=QYCaSeVC3onHpqpv\&q=85\&s=ec2e59000ab92c36706df3b6db1d59f8)

> [!NOTE]
>
> Starting from Bruno **v3.1.0**, you can create and manage `.env` files directly inside Bruno at workspace level. Check the [Secret Management - Dotenv File](https://docs.usebruno.com/secrets-management/dotenv-file.md) section for more details.
