Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Add unsloth to User PATH on Windows after install (#4597)

Daniel Han2683c2ab5830
diff --git a/install.ps1 b/install.ps1
index a4ed2658c95..ed656850d4b 100644
--- a/install.ps1
+++ b/install.ps1
@@ -623,6 +623,19 @@ shell.Run cmd, 0, False
New-StudioShortcuts -UnslothExePath $UnslothExe
+ # ── Add venv Scripts dir to User PATH so `unsloth studio` works from any terminal ──
+ $ScriptsDir = Join-Path $VenvDir "Scripts"
+ $UserPath = [System.Environment]::GetEnvironmentVariable("Path", "User")
+ if (-not $UserPath -or $UserPath -notlike "*$ScriptsDir*") {
+ if ($UserPath) {
+ [System.Environment]::SetEnvironmentVariable("Path", "$ScriptsDir;$UserPath", "User")
+ } else {
+ [System.Environment]::SetEnvironmentVariable("Path", "$ScriptsDir", "User")
+ }
+ Refresh-SessionPath
+ Write-Host "[OK] Added unsloth to PATH" -ForegroundColor Green
+ }
+
Write-Host ""
Write-Host "========================================="
Write-Host " Unsloth Studio installed!"