> ## 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.

# Startup scripts

> Automatically arrange a new project or worktree group with an ordinary shell script.

A startup script is an ordinary executable shell script. It does not require a
Radius SDK or separate runtime.

## How startup works

When you create a configured project or worktree group, Radius:

1. Creates the group.
2. Opens its terminal tab.
3. Starts the configured command.
4. Provides the current group, terminal, and window IDs.

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
RADIUS_GROUP_ID
RADIUS_TAB_ID
RADIUS_WINDOW_ID
```

## Create the script

Save this as `scripts/open-radius-workspace.sh`:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
#!/usr/bin/env bash
set -euo pipefail

: "${RADIUS_GROUP_ID:?RADIUS_GROUP_ID is required}"
: "${RADIUS_TAB_ID:?RADIUS_TAB_ID is required}"

radius group rename "$RADIUS_GROUP_ID" "Development"

radius tab open "https://linear.app/linear/issue/LIN-111/welcome-to-linear"
radius tab open "https://github.com/electron/electron/pull/48091"

local_server="$(radius tab open "http://localhost:3000" --right-of "$RADIUS_TAB_ID" --size 60%)"
radius tab wait "$local_server" --load --timeout-ms 30000
radius tab focus "$local_server"
```

Make it executable:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
chmod +x scripts/open-radius-workspace.sh
```

## Configure the group

Open the project group's menu, choose **Settings**, then set **Startup command**
under **Scripts** to:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
./scripts/open-radius-workspace.sh
```

Or add the same command to `.radius/settings.toml`:

```toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
[scripts]
startup = "./scripts/open-radius-workspace.sh"
```

The next time you create the project or worktree group, Radius runs the script in
its terminal.

<Note>
  Startup arranges the Radius group. It is separate from the setup command that
  installs dependencies inside a newly created worktree. See
  [Scripts and automation](/docs/project-settings/scripts-and-automation).
</Note>

## Failure behavior

Completed commands remain visible if a later command fails. Radius does not roll
back the group or keep enforcing the layout after the script exits.

Use `set -euo pipefail`, validate required variables at the top, and use
`tab wait` when a later step depends on a page finishing navigation.
