A rustup-inspired XGo toolchain manager for macOS, Linux, and Windows.
macOS / Linux
curl -fsSL https://raw.githubusercontent.com/fanfeilong/xgoup/main/scripts/install.sh | bashTo skip PATH modification (print instructions only):
curl -fsSL https://raw.githubusercontent.com/fanfeilong/xgoup/main/scripts/install.sh | bash -s -- --no-modify-pathWindows
curl.exe -fsSL "https://github.com/fanfeilong/xgoup/releases/latest/download/xgoup-windows-amd64.zip" -o "%TEMP%\xgoup-win.zip" && tar -xf "%TEMP%\xgoup-win.zip" -C "%TEMP%" && "%TEMP%\xgoup.exe" self install -modify-path=true$zip="$env:TEMP\xgoup-win.zip"; curl.exe -fsSL "https://github.com/fanfeilong/xgoup/releases/latest/download/xgoup-windows-amd64.zip" -o $zip; $d=Join-Path $env:TEMP xgoup-extract; Remove-Item -Recurse -Force $d -ErrorAction SilentlyContinue; Expand-Archive -Path $zip -DestinationPath $d -Force; & (Join-Path $d xgoup.exe) self install -modify-path=trueNote: xgo requires Go >= 1.19 on PATH. xgoup toolchain install --method standard will auto-install Go when missing/outdated (Windows: winget; macOS: brew; Linux: apt/dnf/yum/apk/pacman).
xgoup initInstall a toolchain:
xgoup install latest --method source --ref main
xgoup default latestRun your XGo program using the selected toolchain:
xgo run main.xgoLink an existing local XGo build:
xgoup toolchain install localdev --method linked --path /path/to/xgo
xgoup default localdevSupported now:
initinstall(standard/source/linked)updatelist(--json)remove(--purge)defaultwhichenv(sh|zsh|fish|powershell)doctordoc(open XGo spec / classfile / docs / demo / tutorial in browser)ide install(install XGo extension to Cursor / VS Code)
Also available (grouped form): xgoup toolchain <install|update|list|remove> ...
For run / which / env, xgoup resolves toolchain in this order:
--toolchain <name>XGO_TOOLCHAINenvironment variable- nearest
xgo-toolchain.tomlin current directory or parent directories - global default toolchain from config
Project override file example:
toolchain = "latest"Default home: ~/.xgoup (override with XGOUP_HOME)
toolchains/toolchain directoriesmetadata/per-toolchain metadata (*.env)config.tomlgenerated config
standardmethod is platform-specific (macOS: Homebrew; Windows: official release zip; Linux: distro package manager when available).sourcemethod usesgit clone + ./all.bashand is the recommended path for latest XGo features.
Install the official Go/XGo extension (goplus.gop) into Cursor / VS Code:
xgoup ide installBuild the local xgoup binary from this repo:
xgo build -o ./dist/xgoup ./cmd/xgoup
./dist/xgoup init- GitHub Actions workflow:
.github/workflows/release.yml - Trigger:
- Push a tag like
v0.1.0, or - Run workflow manually (
workflow_dispatch) with aversioninput.
- Push a tag like
- Output:
xgoup-<version>-darwin-amd64.tar.gzxgoup-<version>-darwin-arm64.tar.gzxgoup-<version>-linux-amd64.tar.gzxgoup-<version>-linux-arm64.tar.gzxgoup-<version>-windows-amd64.zipxgoup-<version>-windows-arm64.zipchecksums.txt
- Release artifacts contain native
xgoup/xgoup.exebinaries.