Windows Environment Variable Manager is a Windows-first tool for managing
persistent User and Machine environment variables through the registry,
with a CLI-first workflow today and safer, more structured workflows planned.
Windows persistent environment variables are not just shell-local text files. They are registry-backed OS settings that affect how new processes inherit their environment. That creates a Windows-specific problem:
- programs are often launched from GUI surfaces like Explorer, shortcuts, and shells with different parent contexts
- work is spread across PowerShell,
cmd.exe, Git Bash, Nushell, terminal multiplexers, IDE terminals, and AI-driven agents - long values such as
PATHare easy to break and hard to reason about
This is different from the common Linux workflow where shell startup files and single-shell process trees are often enough for day-to-day environment management.
This project exists to make Windows environment variable management feel more deliberate, inspectable, and eventually reversible.
- lists persistent environment variable names
- gets persistent variable values
- sets persistent variable values
- deletes persistent variable values
- supports
userandmachinescopes - uses the Windows-backed .NET environment variable APIs
- provides CLI-first workflows with a future TUI direction
- it does not update the current shell session automatically
- it does not retroactively update already-running processes
- it does not yet provide PATH-specific editing workflows
- it does not yet provide local version history or rollback
- the TUI entrypoint exists, but the TUI is not feature-complete yet
Examples:
wem --help
wem list
wem list --scope machine
wem get PATH
wem get PATH --scope machine
wem set FOO Bar
wem set FOO Bar --scope machine
wem delete FOO
wem delete FOO --scope machine
wem tuiScope rules:
- accepted values are
userandmachine - omitted scope defaults to
user machinemutation requires an elevated Administrator shell
- persisted
UserandMachinevalues are updated correctly - the current shell session is not automatically refreshed
- already-running processes keep their existing environment blocks
- new processes may observe updated values only when launched from an updated parent context
Planned local configuration and version-history data will live under
%LOCALAPPDATA%\wem\.
Detailed mini-specs live under roadmaps/:
This project is early-stage and CLI-first.
The current focus is establishing correct Windows behavior first, then adding safer PATH editing, local version history, shell-session integration, and a resilient TUI.