Complete guide for setting up Gopher on Windows with automated setup and smart detection.
Version: v1.0.0+
Last Updated: October 2025
The easiest way to set up Gopher on Windows:
# Create bin directory
New-Item -ItemType Directory -Path "$env:USERPROFILE\bin" -Force
# Download latest release
$version = "1.0.0"
$url = "https://github.com/molmedoz/gopher/releases/download/v$version/gopher-windows-amd64.exe"
Invoke-WebRequest -Uri $url -OutFile "$env:USERPROFILE\bin\gopher.exe"
# Add gopher to PATH
$userPath = [Environment]::GetEnvironmentVariable("PATH", "User")
if ($userPath -notlike "*$env:USERPROFILE\bin*") {
[Environment]::SetEnvironmentVariable("PATH", "$env:USERPROFILE\bin;$userPath", "User")
}
Restart PowerShell, then verify:
gopher version
gopher init
This will:
Example output:
π Welcome to Gopher Setup Wizard!
π System Detection
===================
Platform: windows/amd64
Shell: PowerShell β
Symlink Directory: C:\Users\YourName\AppData\Local\bin
π― Setup Complete! Next Steps:
================================
STEP 1: Add Gopher's bin directory to PATH (CRITICAL!)
--------------------------------------------------------
Copy and run this PowerShell command as Administrator:
$userPath = [Environment]::GetEnvironmentVariable("PATH", "User")
$gopherBin = "C:\Users\YourName\AppData\Local\bin"
if ($userPath -notlike "*$gopherBin*") {
[Environment]::SetEnvironmentVariable("PATH", "$gopherBin;$userPath", "User")
}
Then RESTART your PowerShell terminal.
STEP 2: Install a Go version
gopher install 1.21.0
STEP 3: Switch to it
gopher use 1.21.0
β οΈ Important: If you have system Go installed, Gopher will warn you
about PATH order and provide exact commands to fix it.
STEP 4: Verify it works
go version
# Should show: go version go1.21.0 windows/amd64
π Directories created:
Config: C:\Users\YourName\gopher\config.json
Versions: C:\Users\YourName\gopher\versions
Downloads: C:\Users\YourName\gopher\downloads
State: C:\Users\YourName\gopher\state
Symlinks: C:\Users\YourName\AppData\Local\bin
Just copy and run the commands shown! β
Copy and run the PowerShell commands from gopher init output:
gopher install 1.21.0gopher use 1.21.0go versionThatβs it! π
Gopher uses a clean, visible directory structure on Windows (no hidden folders):
C:\Users\YourName\
βββ bin\
β βββ gopher.exe β Gopher executable
β
βββ gopher\ β Data directory (visible, no dot)
β βββ config.json β Configuration
β βββ versions\ β Installed Go versions
β β βββ go1.21.0\
β β β βββ bin\
β β β β βββ go.exe
β β β βββ src\
β β β βββ pkg\
β β βββ go1.22.0\
β βββ downloads\ β Temporary downloads
β β βββ go1.21.0.windows-amd64.zip
β βββ state\ β Active version tracking
β βββ active-version
β
βββ AppData\Local\
βββ bin\
βββ go.exe β Symlink to active version
Why βgopherβ (no dot)?
Why? Allows symlink creation without admin privileges.
How:
Alternative: Run PowerShell as Administrator when using gopher use.
Gopher now automatically detects PATH order issues!
When you run gopher use 1.21.0, Gopher will:
Why this matters: Windows searches PATH in order. If system Go comes first, it wins.
PS> gopher use 1.21.0
β Created symlink in C:\Users\YourName\AppData\Local\bin\go.exe
β οΈ WARNING: System Go will take precedence over Gopher-managed versions!
PATH Order Issue:
Position 1: C:\Program Files\Go\bin (System Go) β Found FIRST
Position 2: C:\Users\YourName\AppData\Local\bin (Gopher) β Found SECOND
This means 'go version' will still show system Go, not the version you just switched to.
TO FIX - Run this PowerShell command as Administrator:
$userPath = [Environment]::GetEnvironmentVariable("PATH", "User")
$gopherBin = "C:\Users\YourName\AppData\Local\bin"
$pathArray = $userPath -split ';' | Where-Object { $_ -ne $gopherBin }
$newUserPath = "$gopherBin;" + ($pathArray -join ';')
[Environment]::SetEnvironmentVariable("PATH", $newUserPath, "User")
# Restart your terminal for changes to take effect
Just copy and run the command! β
After modifying PATH, reload it in your current PowerShell session:
$env:PATH = [Environment]::GetEnvironmentVariable("PATH", "User") + ";" + [Environment]::GetEnvironmentVariable("PATH", "Machine")
Then verify:
where.exe go
# Should show Gopher's symlink FIRST:
# C:\Users\YourName\AppData\Local\bin\go.exe
# C:\Program Files\Go\bin\go.exe
# 1. Check gopher version
gopher version
# Should show: gopher v1.0.0
# 2. Check directories exist
Test-Path $env:USERPROFILE\gopher\versions
Test-Path $env:USERPROFILE\gopher\downloads
Test-Path $env:USERPROFILE\gopher\state
# All should return: True
# 3. Install a version
gopher install 1.21.0
# Should show single-line progress bar β
# 4. Switch to it
gopher use 1.21.0
# Should create symlink + warn about PATH if needed
# 5. Verify
go version
# Should show: go version go1.21.0 windows/amd64
# 6. Check symlink exists
Test-Path $env:LOCALAPPDATA\bin\go.exe
# Should return: True
# 7. Test switching
gopher use system
go version
# Should show system Go (if installed)
gopher use 1.21.0
go version
# Should show: go version go1.21.0
Solution A: Enable Developer Mode (see Step 1 above)
Solution B: Run as Administrator:
# Right-click PowerShell and select "Run as administrator"
gopher use 1.21.0
Cause: System Go appears before Gopher in PATH.
Solution: Gopher v1.0.0+ automatically detects this and shows you the exact fix command!
Just run gopher use <version> and follow the instructions it provides.
Cause: $env:USERPROFILE\bin not in PATH.
Solution:
$userPath = [Environment]::GetEnvironmentVariable("PATH", "User")
[Environment]::SetEnvironmentVariable("PATH", "$env:USERPROFILE\bin;$userPath", "User")
# Restart PowerShell
Cause: %LOCALAPPDATA%\bin not in PATH.
Solution: Run gopher use <version> again - it will show you the exact PATH command to run.
Check if Developer Mode is enabled:
# If this fails, Developer Mode is OFF:
gopher use 1.21.0
# Enable it in Settings or run as Administrator
Solution: Gopher v1.0.0+ automatically creates directories on first run!
Just run any gopher command and directories will be created:
gopher init
# or
gopher install 1.21.0
# List installed versions
gopher list
# List available versions
gopher list-remote
# Install a version
gopher install 1.21.0
# Switch to a version
gopher use 1.21.0
# Switch to system Go
gopher use system
# Show current version
gopher current
# Show system Go info
gopher system
# Create an alias
gopher alias create stable 1.21.0
# Use an alias
gopher use stable
# Check setup status
gopher status
# Debug information
gopher debug
gopher usewhere.exe gogopher alias create stable 1.21.0gopher use stablegopher uninstall 1.20.0# General help
gopher help
# Command-specific help
gopher help install
gopher help use
# Check system status
gopher status
# Debug information
gopher debug
# Show current PATH
$env:PATH -split ';'
# Check where go is found
where.exe go
# Check Gopher's symlink
Test-Path $env:LOCALAPPDATA\bin\go.exe
See: docs/internal/WINDOWS_RESET_GUIDE.md for complete reset instructions.
Quick reset:
Remove-Item "$env:USERPROFILE\bin\gopher.exe" -Force
Remove-Item "$env:USERPROFILE\gopher" -Recurse -Force
Remove-Item "$env:LOCALAPPDATA\bin\go.exe" -Force
# Clean PATH
$userPath = [Environment]::GetEnvironmentVariable("PATH", "User")
$cleanedPath = ($userPath -split ';' | Where-Object {
$_ -ne "$env:USERPROFILE\bin" -and
$_ -ne "$env:LOCALAPPDATA\bin"
}) -join ';'
[Environment]::SetEnvironmentVariable("PATH", $cleanedPath, "User")
# Restart PowerShell and start fresh
%LOCALAPPDATA%\bin (user-specific)docs/USER_GUIDE.mddocs/FAQ.mddocs/internal/WINDOWS_RESET_GUIDE.mddocs/internal/WINDOWS_PATH_RELOAD.mdWindows Terminal provides better Unicode support and performance:
$env:PATH = [Environment]::GetEnvironmentVariable("PATH", "User") + ";" + [Environment]::GetEnvironmentVariable("PATH", "Machine")
gopher status
gopher debug
where.exe go
# Gopher's symlink should be FIRST
Youβre all set! Gopher is now installed and configured on Windows.
Next steps:
gopher install 1.21.0gopher use 1.21.0For more help: Run gopher help or visit https://github.com/molmedoz/gopher
Last Updated: October 2025
Version: v1.0.0+