-
Notifications
You must be signed in to change notification settings - Fork 0
feat: full one-click start #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ Write-Host "=========================================" | |
| Write-Host "" | ||
|
|
||
| # Step 1: Check Docker | ||
| Write-Host "[1/5] Checking Docker..." -ForegroundColor Yellow | ||
| Write-Host "[1/6] Checking Docker..." -ForegroundColor Yellow | ||
| try { | ||
| docker info > $null 2>&1 | ||
| if ($LASTEXITCODE -ne 0) { throw } | ||
|
|
@@ -24,12 +24,12 @@ try { | |
| } | ||
|
|
||
| # Step 2: Start containers | ||
| Write-Host "[2/5] Starting containers..." -ForegroundColor Yellow | ||
| Write-Host "[2/6] Starting containers..." -ForegroundColor Yellow | ||
| docker compose up -d --build 2>&1 | Out-Null | ||
| Write-Host " PostgreSQL, Redis, MCP server started" -ForegroundColor Green | ||
|
|
||
| # Step 3: Wait for health | ||
| Write-Host "[3/5] Waiting for MCP server..." -ForegroundColor Yellow | ||
| Write-Host "[3/6] Waiting for MCP server..." -ForegroundColor Yellow | ||
| $retries = 0 | ||
| while ($retries -lt 15) { | ||
| try { | ||
|
|
@@ -46,7 +46,7 @@ if ($retries -ge 15) { | |
| } | ||
|
|
||
| # Step 4: Start dashboard | ||
| Write-Host "[4/5] Starting dashboard..." -ForegroundColor Yellow | ||
| Write-Host "[4/6] Starting dashboard..." -ForegroundColor Yellow | ||
| $dashboardDir = Join-Path $PSScriptRoot "apps\dashboard" | ||
| if (-not (Test-Path "$dashboardDir\node_modules")) { | ||
| Push-Location $dashboardDir | ||
|
|
@@ -56,36 +56,48 @@ if (-not (Test-Path "$dashboardDir\node_modules")) { | |
| Start-Process powershell -ArgumentList "-NoExit", "-Command", "cd '$dashboardDir'; npm run dev" | ||
| Write-Host " Dashboard starting on http://localhost:3001" -ForegroundColor Green | ||
|
|
||
| # Step 5: Setup WSL for TrueForge | ||
| Write-Host "[5/5] Setting up TrueForge in WSL..." -ForegroundColor Yellow | ||
| $wslNode = wsl -d Ubuntu -- bash -c "which node 2>/dev/null" | ||
| if (-not $wslNode) { | ||
| Write-Host " Installing Node.js in WSL..." -ForegroundColor Yellow | ||
| wsl -d Ubuntu -- bash -c "curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - && sudo apt-get install -y nodejs" 2>&1 | Out-Null | ||
| # Step 5: Setup WSL - install Linux-native Node.js | ||
| Write-Host "[5/6] Setting up WSL..." -ForegroundColor Yellow | ||
| $wslLinuxNode = wsl -d Ubuntu -- bash -c 'test -f /usr/bin/node && echo ok || echo missing' | ||
| if ($wslLinuxNode -match "missing") { | ||
| Write-Host " Installing Node.js 20 in WSL (first time only)..." -ForegroundColor Yellow | ||
| wsl -d Ubuntu -- bash -c 'curl -fsSL https://deb.nodesource.com/setup_20.x -o /tmp/ns.sh' | ||
| wsl -d Ubuntu -- bash -c 'sudo bash /tmp/ns.sh' | ||
| wsl -d Ubuntu -- bash -c 'sudo apt-get install -y nodejs' | ||
| Write-Host " Node.js installed in WSL" -ForegroundColor Green | ||
|
Comment on lines
+61
to
+67
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: The WSL discovery and installation commands do not validate their exit status. If Ubuntu is unavailable or curl, sudo, or apt fails, Severity Level: Major
|
||
| } else { | ||
| Write-Host " WSL Node.js already installed" -ForegroundColor Green | ||
| } | ||
| $wslTf = wsl -d Ubuntu -- bash -c "which trueforge 2>/dev/null" | ||
| if (-not $wslTf) { | ||
| Write-Host " Installing TrueForge in WSL..." -ForegroundColor Yellow | ||
| wsl -d Ubuntu -- bash -c "npm install -g @truefoundry/trueforge" 2>&1 | Out-Null | ||
|
|
||
| # Step 6: Setup WSL - install TrueForge | ||
| 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") { | ||
| Write-Host " Installing TrueForge in WSL (first time only)..." -ForegroundColor Yellow | ||
| wsl -d Ubuntu -- bash -c 'export PATH=/usr/bin:/usr/local/bin:$PATH && npm install -g @truefoundry/trueforge' | ||
| Write-Host " TrueForge installed in WSL" -ForegroundColor Green | ||
|
Comment on lines
+77
to
+78
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: Severity Level: Major
|
||
| } else { | ||
| Write-Host " TrueForge already installed in WSL" -ForegroundColor Green | ||
| } | ||
| Start-Process powershell -ArgumentList "-NoExit", "-Command", "wsl -d Ubuntu" | ||
| Write-Host " TrueForge terminal opened (WSL)" -ForegroundColor Green | ||
|
|
||
| # Launch TrueForge in WSL | ||
| Write-Host " Launching TrueForge in WSL..." -ForegroundColor Yellow | ||
| Start-Process powershell -ArgumentList "-NoExit", "-Command", "wsl -d Ubuntu -- bash -c 'export PATH=/usr/bin:/usr/local/bin:`$PATH && cd ~ && npx @truefoundry/trueforge'" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: The launch bypasses Severity Level: Major
|
||
| 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 terminal:" -ForegroundColor Cyan | ||
| Write-Host " 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 " 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 "" | ||
| Write-Host " Dashboard: http://localhost:3001" -ForegroundColor Cyan | ||
| Write-Host " MCP Server: http://localhost:8001" -ForegroundColor Cyan | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2. Valid node installs misdetected
🐞 Bug≡ CorrectnessAgent Prompt
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools