---
name: working-dir
description: The path where all commands should be run. Default is current directory.
type: string
env:
  - TG_WORKING_DIR
---

import { Aside } from '@astrojs/starlight/components';

Specifies the working directory where Terragrunt should execute its commands. By default, Terragrunt uses the current directory.

Example:

```bash
terragrunt run plan --working-dir /path/to/infrastructure/prod
```

<Aside type="note">
The `--working-dir` flag behaves differently for `run --all` commands versus single unit commands.

For `run --all`, Terragrunt will execute in all subdirectories of the working directory, while for `run` commands it will execute only in the specified directory.
</Aside>
