Skip to content

Commit b3be90e

Browse files
docs: add repo-specific tool_versions to preview environments (#537)
Co-authored-by: Roo Code <roomote@roocode.com>
1 parent 7dbe36f commit b3be90e

1 file changed

Lines changed: 37 additions & 4 deletions

File tree

docs/roo-code-cloud/environments.mdx

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,14 @@ repositories:
247247
logfile: /tmp/backend.log
248248
```
249249

250-
### Repository Format
250+
### Repository Configuration Fields
251251

252-
Use the `owner/repo` format (e.g., `myorg/my-app`).
252+
| Field | Description | Required |
253+
|-------|-------------|----------|
254+
| `repository` | Repository in `owner/repo` format (e.g., `myorg/my-app`) | Yes |
255+
| `branch` | Branch to checkout (defaults to the repository's default branch) | No |
256+
| `tool_versions` | Tool versions to install via [mise](https://mise.jdx.dev/) (see [Tool Installation](#automatic-tool-installation)) | No |
257+
| `commands` | Ordered list of commands to run after cloning | No |
253258

254259
### Commands
255260

@@ -285,14 +290,39 @@ When `detached` is true, the command runs via `nohup` and the worker moves on af
285290

286291
### Automatic Tool Installation
287292

288-
If a repository contains a `.tool-versions` file (used by [mise](https://mise.jdx.dev/) / asdf), Roo Code Cloud automatically runs `mise install` after cloning. This installs the correct versions of tools like Node.js, Python, Ruby, Go, or any other runtime your project requires — before any of your setup commands execute.
293+
Roo Code Cloud uses [mise](https://mise.jdx.dev/) to manage tool versions. There are two ways to specify which versions of Node.js, Python, Ruby, Go, or other runtimes your project needs.
294+
295+
#### Option 1: `tool_versions` in the environment config
296+
297+
Set `tool_versions` directly on a repository entry to declare tool versions without modifying the repo itself. Roo Code Cloud generates a `.tool-versions` file from this config and adds it to `.git/info/exclude` so it stays out of version control.
298+
299+
```yaml
300+
repositories:
301+
- repository: myorg/backend
302+
tool_versions:
303+
node: "20.11.0"
304+
python: "3.12.1"
305+
commands:
306+
- name: Install
307+
run: npm install
308+
```
309+
310+
This takes priority over any existing `.tool-versions` file in the repository.
311+
312+
#### Option 2: `.tool-versions` file in the repository
313+
314+
If a repository already contains a `.tool-versions` file (used by mise / asdf), Roo Code Cloud automatically picks it up and runs `mise install` after cloning — no extra configuration needed.
289315

290316
```
291317
# .tool-versions
292-
nodejs 20.11.0
318+
node 20.11.0
293319
python 3.12.1
294320
```
295321
322+
:::tip
323+
Use `tool_versions` in the environment config when you want to pin versions per-environment without committing changes to the repository. Use a `.tool-versions` file in the repo when all environments should share the same versions.
324+
:::
325+
296326
## Services
297327
298328
Add managed database and cache services:
@@ -365,6 +395,8 @@ repositories:
365395
logfile: /tmp/storefront.log
366396
367397
- repository: acme/api
398+
tool_versions:
399+
node: "20.11.0"
368400
commands:
369401
- name: Install
370402
run: npm install
@@ -378,6 +410,7 @@ repositories:
378410
ALLOWED_ORIGINS: ${ROO_WEB_HOST}
379411
380412
- repository: acme/worker
413+
branch: main
381414
commands:
382415
- name: Install
383416
run: npm install

0 commit comments

Comments
 (0)