ruster-env Ashok S K
winget install --id=AshokSK.ruster-env -e ruster-env injects variables directly into your current session—just like source .env on Linux.
winget install --id=AshokSK.ruster-env -e ruster-env injects variables directly into your current session—just like source .env on Linux.
> Bend the environment to your will.
A blazingly fast, session-persistent environment variable manager built specifically for Windows (PowerShell & CMD).
ruster-env injects variables directly into your current terminal session, making them available for every subsequent command you run—just like source .env on Linux.
--no-overwrite protects your system PATH and other critical variables.URL=${HOST}:${PORT}).The easiest way to install is via the Windows Package Manager.
winget install ruster-env
ruster-env-windows-x64.zip from the Releases page.ruster-core.exe and ruster-env.cmd) into a folder.If you installed via Winget or added the Manual folder to PATH, CMD users are ready to go. PowerShell users need a one-time profile update.
Run the init command to get the setup script for your specific installation path:
ruster-env init --shell powershell
Copy the output command. It will appear as follows:
Invoke-Expression (& "C:\Path\To\ruster-core.exe" init --shell wershell | Out-String)
Open your PowerShell profile:
notepad $PROFILE
Paste the copied command into the file and save it.
Restart PowerShell.
> [!TIP]
> Alternatively, run the copied command in your current powershell session to start using it immediately.
No extra setup required if the folder is in your PATH. The ruster-env.cmd wrapper handles everything automatically.
Injects variables from .env into your current session.
ruster-env load
API_KEY is now available in your shell.--verbose: See exactly what is being set.--no-overwrite: Skips variables that already exist in your system (e.g., prevents hijacking USERNAME).Quickly add or remove a single variable for the current session.
# Set a variable
ruster-env set DATA=Production
# Remove a variable
ruster-env unset DATA
Checks what is actually live in your system.
ruster-env show
List Mode: Prints all active system variables (hides internal Windows vars like =::).
Single Mode: Prints just the value (perfect for scripts).
# Copy DB URL to clipboard
ruster-env show DB_URL | clip
Runs a single command with variables loaded, without modifying your current shell.
# Run a command with variables loaded from .env.test file (default=.env) isolated to that process
> ruster-env run --path .env.test -- python -c "import os; print(os.environ['WELCOME_MSG'])"
Hello World!
# Verify the variable did NOT leak into the current session
> ruster-env show WELCOME_MSG
Error: Variable 'WELCOME_MSG' is not set in the current environment.
Removes variables defined in your .env file from the session.
ruster-env unload
ruster-env supports a robust syntax superset:
# Comments are supported
PORT=8080
HOST=localhost
# Quotes are stripped automatically
SECRET_KEY="super_secret_value"
SINGLE_QUOTES='works_too'
# Interpolation (References other variables)
# Order matters! Define base vars first.
DATABASE_URL=postgres://${HOST}:${PORT}/mydb