Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Commit c33be50

Browse files
committed
docs(cli): add Windows VS Code bootstrap note
1 parent ad25634 commit c33be50

2 files changed

Lines changed: 233 additions & 0 deletions

File tree

apps/cli/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ curl -fsSL https://raw.githubusercontent.com/RooCodeInc/Roo-Code/main/apps/cli/i
2121
- Node.js 20 or higher
2222
- macOS Apple Silicon (M1/M2/M3/M4) or Linux x64
2323

24+
On Windows, use the Roo Code VS Code extension as the runtime. See
25+
[Windows VS Code Bootstrap](docs/WINDOWS_VSCODE_BOOTSTRAP.md) for a repeatable
26+
workspace launch pattern that keeps provider setup, auth, and approvals in Roo.
27+
2428
**Custom installation directory:**
2529

2630
```bash
Lines changed: 229 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,229 @@
1+
# Windows VS Code Bootstrap
2+
3+
The CLI quick installer currently targets macOS Apple Silicon and Linux x64. On
4+
Windows, use the Roo Code VS Code extension as the runtime. A small workspace
5+
launch config can make that extension flow repeatable without replacing Roo's
6+
normal provider setup, authentication, approvals, or mode behavior.
7+
8+
This pattern is useful when a team wants a local script to reopen a workspace,
9+
load a prompt file, and optionally select a project mode or provider profile.
10+
Keep the application itself standalone; VS Code and Roo are only the control
11+
plane.
12+
13+
## Roo Defaults To Preserve
14+
15+
For first-time users, follow the extension's normal setup first:
16+
17+
1. Install Roo Code in VS Code.
18+
2. Open the target workspace folder.
19+
3. Open the Roo panel.
20+
4. Choose an API provider and model in Roo's settings.
21+
5. Complete any provider-owned sign-in or API-key setup.
22+
6. Start a small manual task to confirm the profile works.
23+
24+
The bootstrapper should preserve these defaults:
25+
26+
- If no provider profile is supplied, Roo uses the active or mode-sticky profile.
27+
- If no mode is supplied, Roo starts in its default Code mode.
28+
- Provider auth stays inside Roo and VS Code SecretStorage.
29+
- User approval and auto-approval settings remain Roo settings.
30+
- Model-specific defaults, such as reasoning effort, should be left alone unless
31+
the launch config explicitly overrides them.
32+
33+
## Minimal Launch Config
34+
35+
This file is a local handoff format for a helper script or helper extension. It
36+
is not a Roo Code API contract.
37+
38+
`.roo-launch.json`:
39+
40+
```json
41+
{
42+
"requestId": "replace-with-a-new-id-per-launch",
43+
"autostart": true,
44+
"promptFile": ".roo/prompts/init.md",
45+
"newTab": true
46+
}
47+
```
48+
49+
`.roo/prompts/init.md`:
50+
51+
```markdown
52+
You are Roo Code initializing this workspace.
53+
54+
First read:
55+
56+
- AGENTS.md
57+
- the repo README, if present
58+
- package, build, or project files that identify the stack
59+
60+
Then produce a concise workspace orientation and wait for the next concrete
61+
build task.
62+
```
63+
64+
With this minimal config, the helper only opens Roo and starts the prompt. Roo
65+
keeps using whichever provider profile and mode the user already configured.
66+
67+
## Optional Project Mode
68+
69+
Project modes are a normal Roo Code customization path through `.roomodes`.
70+
Add a project mode only when the workspace needs scoped behavior that differs
71+
from the built-in Code, Ask, Architect, Debug, or Orchestrator modes.
72+
73+
`.roomodes`:
74+
75+
```yaml
76+
customModes:
77+
- slug: app-builder
78+
name: App Builder
79+
roleDefinition: |-
80+
You are Roo Code working as a focused builder for this repository.
81+
Read the workspace instructions first, then implement the user's task.
82+
whenToUse: Build, revise, or inspect this repository using local project instructions.
83+
description: Focused builder mode for this workspace.
84+
groups:
85+
- read
86+
- command
87+
- edit
88+
source: project
89+
```
90+
91+
Then reference the mode in `.roo-launch.json`:
92+
93+
```json
94+
{
95+
"requestId": "replace-with-a-new-id-per-launch",
96+
"autostart": true,
97+
"promptFile": ".roo/prompts/init.md",
98+
"mode": "app-builder",
99+
"newTab": true
100+
}
101+
```
102+
103+
## Optional Provider Profile
104+
105+
Use an explicit profile only when the workspace launcher should activate a
106+
specific Roo provider profile. Otherwise, omit `profile` and let Roo use the
107+
active or mode-sticky profile configured by the user.
108+
109+
For ChatGPT Plus/Pro users, the OpenAI Codex provider can be configured like
110+
this:
111+
112+
```json
113+
{
114+
"requestId": "replace-with-a-new-id-per-launch",
115+
"autostart": true,
116+
"promptFile": ".roo/prompts/init.md",
117+
"mode": "app-builder",
118+
"newTab": true,
119+
"profile": {
120+
"name": "App Builder Codex",
121+
"apiProvider": "openai-codex",
122+
"apiModelId": "gpt-5.5"
123+
}
124+
}
125+
```
126+
127+
If a selected model supports reasoning effort and the workspace intentionally
128+
wants to override the model default, include the provider fields Roo already
129+
uses:
130+
131+
```json
132+
{
133+
"profile": {
134+
"name": "App Builder Codex",
135+
"apiProvider": "openai-codex",
136+
"apiModelId": "gpt-5.5",
137+
"enableReasoningEffort": true,
138+
"reasoningEffort": "high"
139+
}
140+
}
141+
```
142+
143+
Do not put provider secrets, OAuth tokens, or API keys in `.roo-launch.json`.
144+
For `openai-codex`, Roo owns the OpenAI Codex OAuth flow. It does not use a
145+
user-supplied `OPENAI_API_KEY`.
146+
147+
## Helper Extension Shape
148+
149+
A local helper extension can read `.roo-launch.json`, activate Roo Code, and
150+
start the task:
151+
152+
```ts
153+
const roo = vscode.extensions.getExtension("RooVeterinaryInc.roo-cline")
154+
const api = roo?.isActive ? roo.exports : await roo?.activate()
155+
156+
if (config.profile) {
157+
const { name = "Workspace Profile", ...profile } = config.profile
158+
await api.upsertProfile(name, profile, true)
159+
}
160+
161+
const configuration: Record<string, unknown> = {}
162+
if (config.mode) {
163+
configuration.mode = config.mode
164+
}
165+
166+
await api.startNewTask({
167+
text: promptText,
168+
newTab: config.newTab !== false,
169+
configuration,
170+
})
171+
```
172+
173+
The helper should treat provider errors as Roo errors. If Roo reports that the
174+
provider is not authenticated, ask the user to finish sign-in in the Roo panel
175+
and rerun the launch command.
176+
177+
## PowerShell Wrapper Shape
178+
179+
The wrapper should stay project-neutral. It can write a launch config, open the
180+
workspace in VS Code, and trigger a helper extension URI.
181+
182+
```powershell
183+
param(
184+
[string]$Workspace = (Get-Location).Path,
185+
[string]$PromptFile = ".roo\prompts\init.md",
186+
[string]$Mode,
187+
[switch]$NoLaunch
188+
)
189+
190+
$workspacePath = (Resolve-Path -LiteralPath $Workspace).Path
191+
$promptPath = (Resolve-Path -LiteralPath (Join-Path $workspacePath $PromptFile)).Path
192+
193+
$config = [ordered]@{
194+
requestId = [guid]::NewGuid().ToString()
195+
autostart = -not $NoLaunch
196+
promptFile = $promptPath
197+
newTab = $true
198+
}
199+
200+
if ($Mode) {
201+
$config.mode = $Mode
202+
}
203+
204+
$configPath = Join-Path $workspacePath ".roo-launch.json"
205+
$config | ConvertTo-Json -Depth 10 | Set-Content -LiteralPath $configPath -Encoding UTF8
206+
207+
code -n $workspacePath
208+
209+
if (-not $NoLaunch) {
210+
$escaped = [Uri]::EscapeDataString($configPath)
211+
Start-Process "vscode://local.roo-workspace-launcher/launch?configPath=$escaped"
212+
}
213+
```
214+
215+
Provider-specific flags can be layered on top, but the default path should work
216+
with any provider the user already configured in Roo.
217+
218+
## Upstream Opportunity
219+
220+
This pattern can remain a documented Windows workaround, or Roo Code could
221+
absorb the core behavior as a first-class command:
222+
223+
```text
224+
Roo Code: Launch Task From Config
225+
```
226+
227+
That command could read a workspace-local config, optionally activate a provider
228+
profile, optionally select a mode, and start a task from a prompt file without a
229+
separate helper extension.

0 commit comments

Comments
 (0)