> For the complete documentation index, see [llms.txt](https://fig.gitbook.io/fig/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fig.gitbook.io/fig/apps/key-concepts/reading-environment-variables.md).

# Reading Environment Variables

`fig.env` is an object that contains environment variables from the shell. For the moment,`fig.env` is only available when you explicitly call a fig command from the shell. This means `fig.env` is null if you link from one app to another without running a command in the user's terminal.

**Examples**

```
let currentDirectory = fig.env.PWD
let xpc = fig.env["XPC_SERVICE_NAME"]
```

The most important environment variables probably be `PWD`, `HOME` and `USER` (note all-caps)
