chore: align install flow with latest OpenClaw and remove marketing copy

This commit is contained in:
2026-03-09 21:26:40 +08:00
parent 966f7e0ac8
commit 2007545b1d
4 changed files with 105 additions and 448 deletions

View File

@@ -143,43 +143,31 @@ if (Get-Command git -ErrorAction SilentlyContinue) {
}
# ─────────────────────────────────────────────
# Step 3: Install OpenClaw
# Step 3: Install / Update OpenClaw
# ─────────────────────────────────────────────
Write-Info "Checking OpenClaw..."
Write-Info "Installing / updating OpenClaw..."
$needsInstall = $true
npm install -g openclaw@latest 2>&1 | Write-Host
if ($LASTEXITCODE -ne 0) {
Write-Err "OpenClaw installation failed. Please run manually: npm install -g openclaw@latest"
}
# Refresh PATH
$env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
# Add npm global bin to PATH
try {
$null = Get-Command openclaw -ErrorAction Stop
Write-Ok "Found OpenClaw."
$needsInstall = $false
} catch {
Write-Info "Installing OpenClaw..."
}
if ($needsInstall) {
npm install -g openclaw@latest 2>&1 | Write-Host
if ($LASTEXITCODE -ne 0) {
Write-Err "OpenClaw installation failed. Please run manually: npm install -g openclaw@latest"
}
# Refresh PATH
$env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
# Add npm global bin to PATH
try {
$npmPrefix = (npm config get prefix 2>$null).Trim()
if ($npmPrefix) {
$userPath = [Environment]::GetEnvironmentVariable("Path", "User")
if (-not ($userPath -split ";" | Where-Object { $_ -ieq $npmPrefix })) {
[Environment]::SetEnvironmentVariable("Path", "$userPath;$npmPrefix", "User")
$env:Path += ";$npmPrefix"
}
$npmPrefix = (npm config get prefix 2>$null).Trim()
if ($npmPrefix) {
$userPath = [Environment]::GetEnvironmentVariable("Path", "User")
if (-not ($userPath -split ";" | Where-Object { $_ -ieq $npmPrefix })) {
[Environment]::SetEnvironmentVariable("Path", "$userPath;$npmPrefix", "User")
$env:Path += ";$npmPrefix"
}
} catch {}
}
} catch {}
Write-Ok "OpenClaw installed."
}
Write-Ok "OpenClaw installed / updated."
# ─────────────────────────────────────────────
# Step 3: Launch interactive setup
@@ -189,12 +177,8 @@ Write-Host "========================================" -ForegroundColor Green
Write-Host " OpenClaw installed! Starting setup..." -ForegroundColor Green
Write-Host "========================================" -ForegroundColor Green
Write-Host ""
Write-Host " Tip: When the setup wizard asks for a provider," -ForegroundColor White
Write-Host " choose MiniMax for a 7-day free trial - no credit card needed." -ForegroundColor White
Write-Host " Sign up: https://platform.minimax.io" -ForegroundColor Cyan
Write-Host ""
openclaw onboard --accept-risk --flow quickstart --node-manager npm --skip-skills
openclaw onboard --accept-risk --flow quickstart --install-daemon --node-manager npm --skip-skills
Write-Host ""
Write-Host "========================================" -ForegroundColor Green