Skip to content

Getting started

Winenv supports Windows 11. A fresh installation needs only regular PowerShell, a network connection, and WinGet, which Windows 11 normally provides through App Installer.

Open a regular PowerShell window and run:

Terminal window
irm https://raw.githubusercontent.com/YangYuS8/winenv/main/install.ps1 | iex

The installer will:

  1. resolve the latest stable GitHub Release;
  2. download the versioned ZIP and SHA256SUMS, then verify SHA-256;
  3. install that version under %LOCALAPPDATA%\Winenv\versions;
  4. create the global win command;
  5. probe the real paths and versions of PowerShell 7, fzf, and mise, reusing compatible installations;
  6. install only the runtime capabilities that are still missing.

Open a new PowerShell window when it finishes:

Terminal window
win check
win

English is the canonical interface language. On first run, Winenv follows the current Windows UI culture and selects Simplified Chinese for a zh-* culture; all other cultures use English.

Terminal window
win lang # show the effective language and its source
win lang en # persist English
win lang zh # persist Simplified Chinese
win lang auto # return to system detection

Use -Lang en, -Lang zh, or -Lang auto for one invocation. The WINENV_LANG environment variable can set a session or automation default; an explicit -Lang takes precedence.

To select a language during installation:

Terminal window
& ([scriptblock]::Create((irm https://raw.githubusercontent.com/YangYuS8/winenv/main/install.ps1))) -Lang zh

WinGet is the foundational installation route on Windows. If winget.exe cannot be found, the installer first tries to re-register the App Installer already present on Windows 11. If that fails, it stops with directions for Microsoft Store or official repair paths.

Winenv does not silently elevate privileges or install PowerShell Gallery modules to obtain WinGet.

Import a local file or an HTTPS URL:

Terminal window
& ([scriptblock]::Create((irm https://raw.githubusercontent.com/YangYuS8/winenv/main/install.ps1))) -UserProfile C:\Users\me\my-winenv.json
& ([scriptblock]::Create((irm https://raw.githubusercontent.com/YangYuS8/winenv/main/install.ps1))) -UserProfile https://example.com/my-winenv.json

The profile becomes an independent layer. It does not overwrite the runtime layer or another user profile. See Composing profiles.

To create the win command without immediately installing profile software:

Terminal window
& ([scriptblock]::Create((irm https://raw.githubusercontent.com/YangYuS8/winenv/main/install.ps1))) -ToolOnly

Run win add later to apply the active profiles.

Terminal window
& ([scriptblock]::Create((irm https://raw.githubusercontent.com/YangYuS8/winenv/main/install.ps1))) -Version 0.13.0

Without -Version, the installer always uses the latest stable release. The regular win up command updates Winenv before updating managed software.