azd app env
Print the effective environment a service receives when it runs.
Usage
azd app env [service] [flags]Flags
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--all | - | bool | false | Print the resolved environment for every service |
--format | - | string | dotenv | Output format: `dotenv`, `shell`, `powershell`, or `json` |
--keys | - | bool | false | Print variable names only |
--prefix | - | stringArray | - | Only include variables whose names start with the given prefix (repeatable) |
--no-mask | - | bool | false | Print raw values instead of masking secret-shaped values |
--explain | - | bool | false | Show the source of each effective value and any sources it overrode |
--diff | - | bool | false | Compare the resolved environment of two services (pass two service names) |
--env-file | - | string | - | Path to a `.env` file to merge, matching `azd app run` |
--write | - | bool | false | Write the resolved environment to a `.env` file instead of printing it |
--out | - | string | - | Destination folder for `--write` files (writes `<service>.env`); defaults to each service directory |
Examples
azd app env [service] [flags]azd app env apiazd app env api --format shellazd app env api --format powershell | iexazd app env api --format jsonazd app env api --no-maskazd app env api --explainazd app env --diff api webazd app env api --keysazd app env api --writeDetailed Documentation
For complete documentation including flows, diagrams, and advanced usage, see the full command specification.
View full env specification →