Why use setup scripts?
When working in parallel with worktrees, each new worktree may need dependencies installed or other development environment preparation. A setup script runs those steps for you, so you do not have to repeat them manually every time you create a worktree.Configure a setup script in project settings
You can configure setup for a project in Settings → Scripts or in.radius/settings.toml. Radius runs it every time it creates a new worktree for
that project. It does not run when you reopen an existing worktree.
Variables available to setup scripts
Radius automatically provides every setup script with information about the new worktree and its place in the browser:
The script also receives variables configured in the project’s
[environment]
settings. See Environment and files
for configuration and inheritance details.
Install dependencies
For many projects, setup can be a single install command:npm install, bundle install, or
uv sync.
Set up your workspace
For instance, here is a short example that installs dependencies, then opens a terminal and localhost server beside the new worktree’s chat:Move a larger setup into a file
When the setup becomes long enough to test or reuse on its own, move it into a shell script. Save this asscripts/setup-worktree.sh: