Skip to main content
Version: 1.3.0

Installation Guide

This guide covers all installation methods for thresh on Windows with WSL 2.

Prerequisites

Windows

WSL 2 Required

# Check if WSL is installed
wsl --version

Expected output:

WSL version: 2.x.x.x
Kernel version: 5.x.x.x
Install WSL

If WSL is not installed:

wsl --install

Then restart your computer.


Installation Methods

Download Pre-built Binary

Windows:

# Create installation directory
New-Item -ItemType Directory -Force -Path C:\thresh

# Download latest release (v1.3.0)
Invoke-WebRequest -Uri "https://github.com/dealer426/thresh/releases/latest/download/thresh.exe" -OutFile "C:\thresh\thresh.exe"

# Add to PATH for current session
$env:Path += ";C:\thresh"

# Add to PATH permanently
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\thresh", [EnvironmentVariableTarget]::User)

# Verify installation
thresh --version

Linux:

# Download (Linux x64)
curl -LO https://github.com/dealer426/thresh/releases/latest/download/thresh-linux-x64

# Make executable
chmod +x thresh-linux-x64

# Move to PATH
sudo mv thresh-linux-x64 /usr/local/bin/thresh

# Verify
thresh --version

macOS:

# Download (macOS ARM64)
curl -LO https://github.com/dealer426/thresh/releases/latest/download/thresh-osx-arm64

# Make executable
chmod +x thresh-osx-arm64

# Move to PATH
sudo mv thresh-osx-arm64 /usr/local/bin/thresh

# Verify
thresh --version
Binary Size

The thresh binary is only 3.8 MB thanks to Native AOT + UPX compression!


GitHub Copilot Setup

thresh uses GitHub Copilot SDK for AI features (no API keys needed!).

1. Install GitHub CLI

winget install GitHub.cli

2. Authenticate

gh auth login

Follow the prompts to authenticate with your GitHub account.

3. Verify

# Check GitHub CLI
gh auth status

# Check thresh can access AI
thresh config status

Expected output:

thresh Configuration
═══════════════════════════════════════

GitHub Copilot: ✓ Authenticated
Default Model: gpt-4o
...

Verification

Test Installation

# Show version
thresh --version

Expected output:

thresh v1.3.0
Runtime: .NET 10.0.0
Platform: Windows/WSL (or Linux, macOS)
Binary Size: 3.8 MB

List Available Commands

thresh --help

List Built-in Blueprints

thresh blueprints

Expected output:

Available blueprints:

alpine-minimal - Minimal Alpine Linux environment
ubuntu-dev - Ubuntu development environment with common tools
python-dev - Python development environment
node-dev - Node.js development environment
...

Quick Test Environment

# Create a minimal environment (fastest)
thresh up alpine-minimal

# List environments
thresh list

# Access environment
wsl -d alpine-minimal # Windows
# or
docker exec -it alpine-minimal sh # Linux/macOS

# Clean up
thresh destroy alpine-minimal

Upgrading

Upgrade to Latest Version

# Windows - Download and replace
Invoke-WebRequest -Uri "https://github.com/dealer426/thresh/releases/latest/download/thresh.exe" -OutFile "C:\thresh\thresh.exe"

# Verify new version
thresh --version
# Linux/macOS - Download and replace
curl -LO https://github.com/dealer426/thresh/releases/latest/download/thresh-linux-x64
chmod +x thresh-linux-x64
sudo mv thresh-linux-x64 /usr/local/bin/thresh

# Verify
thresh --version

Uninstallation

Remove thresh

# Remove binary
Remove-Item C:\thresh\thresh.exe

# Remove from PATH (if added permanently)
# Open System Properties > Environment Variables
# Edit PATH and remove C:\thresh

# Remove configuration (optional)
Remove-Item -Recurse ~/.thresh

Clean Up Environments

Before uninstalling, clean up all environments:

# List all environments
thresh list

# Destroy each environment
thresh destroy <environment-name>

# Or destroy all (PowerShell)
thresh list | ForEach-Object {
$name = ($_ -split '\s+')[0]
thresh destroy $name --force
}

Troubleshooting

"Command not found" after installation

Windows:

# Check if thresh.exe exists
Test-Path C:\thresh\thresh.exe

# Add to PATH for current session
$env:Path += ";C:\thresh"

# Verify
thresh --version

Linux/macOS:

# Check if binary exists
ls -l /usr/local/bin/thresh

# Check PATH
echo $PATH

# Make sure /usr/local/bin is in PATH
export PATH="/usr/local/bin:$PATH"

"WSL not found" (Windows)

# Install WSL
wsl --install

# Restart computer
shutdown /r /t 0

"Permission denied" (Linux/macOS)

# Make binary executable
chmod +x /usr/local/bin/thresh

# Or if in current directory
chmod +x thresh

Binary won't run on Linux

# Check dependencies (none should be required for self-contained build)
ldd /usr/local/bin/thresh

# If issues, rebuild from source without Native AOT
dotnet publish -c Release -r linux-x64

Next Steps

Happy provisioning! 🚀