Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 13 additions & 22 deletions start.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ if ($wslLinuxNode -match "missing") {
Write-Host " WSL Node.js already installed" -ForegroundColor Green
}

# Step 6: Setup WSL - install TrueForge
# Step 6: Install TrueForge in WSL
Write-Host "[6/6] Setting up TrueForge in WSL..." -ForegroundColor Yellow
$wslTf = wsl -d Ubuntu -- bash -c 'command -v trueforge 2>/dev/null || echo missing'
if ($wslTf -match "missing") {
Expand All @@ -80,33 +80,24 @@ if ($wslTf -match "missing") {
Write-Host " TrueForge already installed in WSL" -ForegroundColor Green
}

# Launch TrueForge in WSL
Write-Host " Launching TrueForge in WSL..." -ForegroundColor Yellow
$wslScript = @'
#!/bin/bash
export PATH=/usr/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/sbin:$PATH
cd ~
npx @truefoundry/trueforge
'@
$scriptPath = "$env:TEMP\start-tf.sh"
[System.IO.File]::WriteAllText($scriptPath, $wslScript, [System.Text.UTF8Encoding]::new($false))
Start-Process wsl -ArgumentList "-d Ubuntu -- bash -c 'bash /mnt/c/$($env:TEMP -replace '\\','/')/start-tf.sh'"
Start-Sleep -Seconds 2
Write-Host " TrueForge terminal opened" -ForegroundColor Green

# Done
Write-Host ""
Write-Host "=========================================" -ForegroundColor Green
Write-Host " Everything is running!" -ForegroundColor Green
Write-Host "=========================================" -ForegroundColor Green
Write-Host ""
Write-Host " Next steps in the WSL TrueForge terminal:" -ForegroundColor Cyan
Write-Host " 1. Open http://localhost:3000" -ForegroundColor White
Write-Host " 2. Add your OpenAI API key" -ForegroundColor White
Write-Host " 3. Add MCP server -> http://localhost:8000/mcp" -ForegroundColor White
Write-Host " 4. Create agent 'missioncontrol'" -ForegroundColor White
Write-Host " 5. Use agent/system-prompt.md as system prompt" -ForegroundColor White
Write-Host " 6. Enable approval for rollback_deploy, restart_service" -ForegroundColor White
Write-Host " Now start TrueForge manually:" -ForegroundColor Cyan
Write-Host " 1. Open a NEW terminal" -ForegroundColor White
Write-Host " 2. Type: wsl" -ForegroundColor White

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

1. Launches wrong wsl distro 🐞 Bug ≡ Correctness

The setup installs Node.js and TrueForge in the distribution named Ubuntu, but the new manual step
runs plain wsl, which opens the user's default distribution. When another distribution is the
default, npx @truefoundry/trueforge runs in an environment this script never prepared and can fail
because Node/npm is absent or use an unrelated installation.
Agent Prompt
## Issue description
The manual instructions open the default WSL distribution even though the script installs all prerequisites specifically in the distribution named `Ubuntu`.

## Issue Context
Users with multiple WSL distributions can have a non-Ubuntu default, causing the subsequent TrueForge command to run in an unprepared environment.

## Fix Focus Areas
- start.ps1[89-93]

Change the instruction to `wsl -d Ubuntu`, or provide one command that explicitly invokes TrueForge in Ubuntu.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: The setup and installation steps explicitly target the Ubuntu WSL distribution, but the instructions launch the user's default distribution with plain wsl. If the default distribution is not Ubuntu, npx runs where Node.js and TrueForge were not installed, so the documented launch fails or starts a different environment. Launch the explicitly configured Ubuntu distribution instead. [api mismatch]

Severity Level: Major ⚠️
- ❌ TrueForge launch fails for non-Ubuntu WSL defaults.
- ⚠️ Manual startup can use the wrong Node.js environment.
- ❌ The TrueForge UI remains unavailable at localhost:3000.

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** start.ps1
**Line:** 91:91
**Comment:**
	*Api Mismatch: The setup and installation steps explicitly target the `Ubuntu` WSL distribution, but the instructions launch the user's default distribution with plain `wsl`. If the default distribution is not Ubuntu, `npx` runs where Node.js and TrueForge were not installed, so the documented launch fails or starts a different environment. Launch the explicitly configured Ubuntu distribution instead.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

Write-Host " 3. Type: cd ~" -ForegroundColor White
Write-Host " 4. Type: npx @truefoundry/trueforge" -ForegroundColor White
Write-Host ""
Write-Host " Then in TrueForge UI (http://localhost:3000):" -ForegroundColor Cyan
Write-Host " 1. Add your OpenAI API key" -ForegroundColor White
Write-Host " 2. Add MCP server -> http://localhost:8000/mcp" -ForegroundColor White
Write-Host " 3. Create agent 'missioncontrol'" -ForegroundColor White
Write-Host " 4. Use agent/system-prompt.md as system prompt" -ForegroundColor White
Write-Host " 5. Enable approval for rollback_deploy, restart_service" -ForegroundColor White
Write-Host ""
Write-Host " Dashboard: http://localhost:3001" -ForegroundColor Cyan
Write-Host " MCP Server: http://localhost:8001" -ForegroundColor Cyan
Expand Down