> ## Documentation Index
> Fetch the complete documentation index at: https://radiusbrowser.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Environment and copied files

> Configure repository variables, local secrets, and ignored files copied into Radius worktrees.

Project environment values are available to:

* Terminals opened for the project or one of its worktrees
* Startup, setup, named run, and archive commands
* Agent processes working in the project

## Add shared variables

Put non-secret team values in `.radius/settings.toml`:

```toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
version = 1

[environment.variables]
NODE_ENV = "development"
DEV_SERVER_PORT = "5180"
```

These values are inherited by every worktree created from the project.

## Store local variables and secrets

Use `.radius/settings.local.toml` for machine-specific values. Values under
`environment.secrets` are hidden in the settings page after they are saved.

```toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
version = 1

[environment.variables]
DEV_SERVER_PORT = "5190"

[environment.secrets]
API_TOKEN = "local-secret"
```

<Warning>
  `environment.secrets` is valid only in `.radius/settings.local.toml`. Radius reports
  a diagnostic if a shared settings file contains secrets.
</Warning>

## Remove an inherited variable

Use `environment.unset` in the local file to remove a shared variable on your
machine:

```toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
version = 1

[environment]
unset = ["DEV_SERVER_PORT"]
```

## Radius-provided variables

Radius also supplies repository and workspace context:

| Variable                | Value                                   |
| ----------------------- | --------------------------------------- |
| `RADIUS_PROJECT_ROOT`   | Source checkout that owns the settings. |
| `RADIUS_WORKSPACE_PATH` | Active project or worktree path.        |
| `RADIUS_WORKSPACE_NAME` | Active workspace name.                  |
| `RADIUS_DEFAULT_BRANCH` | Effective `git.base_ref`.               |

Terminals created for CLI automation also receive `RADIUS_WINDOW_ID`,
`RADIUS_GROUP_ID`, and `RADIUS_TAB_ID`. See [Startup scripts](/docs/guides/startup-scripts).

## Copy ignored files into worktrees

Use `files.include` for local configuration that a worktree needs but Git does
not track:

```toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
[files]
include = [
  ".env.local",
  "config/development.json",
  "certificates/*.pem",
]
```

When Radius creates a worktree, it copies matching files from the source project
while preserving their relative paths.

Only files that Git considers ignored are copied. Radius skips directories,
symbolic links, paths outside the project, and `.radius/settings.local.toml`.

<Tip>
  Add copied files to `.gitignore` before listing them under `files.include`.
  A tracked file already arrives through Git and does not need this setting.
</Tip>

## Override the copied-file list

`files.include` is a single list rather than a merged collection. Defining it
in `.radius/settings.local.toml` replaces the shared list for your machine.

```toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
[files]
include = [".env.local", ".npmrc.local"]
```

For every environment and file key, see the
[settings file reference](/docs/project-settings/file-reference).
