# !repo-root

The `!repo-root` Atmos YAML function is used to retrieve the root directory of the Atmos repository.

## Usage

The `!repo-root` function can be called with default value:

```yaml
  # Get the root directory of the Atmos repository.
  # If the Git root is not found, it will return a default value if specified; otherwise, it returns an error.
  `!repo-root <default-value>`
```

## Examples

```yaml
vars:
  # `base_path` will be set to the root directory of the Atmos repository if present otherwise it will return an error
  base_path: !repo-root
```

```yaml
vars:
  # `base_path` will be set to the default value `default-value` if the Atmos repository root is not present
  base_path: !repo-root <default-value>
```
