# Environment variable standards

> A simple standard for Johnny.Decimal-related environment variables.

It's helpful to define environment variables for use in your shell (see [`environ(7)`](https://man7.org/linux/man-pages/man7/environ.7.html)). The Johnny.Decimal system defines the following standards. Use them and your tools will work with mine.

## Namespace

Every variable starts `JD_`.

```zsh
export JD_VAR=something
```

### Hierarchy

For [multiple systems](/documentation/multiple-systems-overview/), the [system identifier](/documentation/acid-notation/#sysacid) comes before the item.

```zsh
# JD_<SYS identifier>_<item>

# ✅
export JD_D25_ROOT="/some/path"

# ❌
export JD_ROOT_D25="/some/path"
```

## Variables

### Filesystem root

```zsh
# Single system
export JD_PATH="/Users/john/Documents"

# Multiple systems
export JD_D25_PATH="/Users/john/Documents/D25"
```

### JDex root

If your JDex is accessible by your filesystem (e.g. an Obsidian vault) define its root.[^obsidian]

```zsh
# Single system
export JD_JDEX="/Users/john/Documents/JDex"

# Multiple systems
export JD_D25_JDEX="/Users/john/Documents/D25/JDex"
```

[^obsidian]: Noting that your Obsidian vault should live at `00.00` in your Johnny.Decimal system. That makes the path long so I simplified the example code. See [blog/0182](/blog/0182-jdex-data-and-storage/) for a deep-dive.