Refresh your shell environment instantly — without restarting your terminal.
rpath is a cross-platform environment manager that rebuilds and safely applies your PATH and environment variables to the current shell session, similar to sourcing .bashrc on Linux but primarily built for Windows, also works on macOS, and Linux.
Note
Think: source ~/.bashrc but for PATH changes everywhere.
On Windows, PATH changes are fragmented and painful:
- You install a tool → PATH updates don’t apply
- You restart terminals constantly
- You log out just to refresh environment variables
- Each shell behaves differently
rpath fixes this by:
- rebuilding your environment from all system sources
- computing a safe, deduplicated PATH
- applying updates directly into the current shell session
No restarts. No hacks. No manual copying.
- One-command refresh:
rpath - Cross-platform: Windows, Linux, macOS
- Shell support: PowerShell, cmd, bash, zsh, fish
- PATH diagnostics (duplicates, invalid entries, risks)
- Diff, repair, snapshot & restore system state
- Environment version tracking
- Integrations: VS Code, Explorer, WSL, Git Bash
- Optional watcher/service mode
- Offline refresh path; hosted install and
rpath upgradeuse explicit GitHub Release downloads - Safe execution model (no silent system mutation)
irm https://get.rpath.dev/install.ps1 | iexcurl -fsSL https://get.rpath.dev/install.sh | shThe hosted installer verifies release checksums, installs a user-local binary, and asks whether to install shell integration for the detected shell.
Install shell integration:
rpath installOr explicitly:
rpath install --shell powershell
rpath install --shell cmd
rpath install --shell bashRestart your terminal once, then:
rpathFrom now on, PATH refresh works instantly.
irm https://get.rpath.dev/uninstall.ps1 | iexcurl -fsSL https://get.rpath.dev/uninstall.sh | shThe uninstall scripts remove the hosted-install binary and PATH entry. Local snapshots and versions are kept unless you pass the purge option.
rpath cannot directly modify a parent shell process (this is a system limitation).
Instead it:
- Builds a safe environment plan
- Emits shell-compatible commands
- Executes them via a small installed wrapper
Example:
eval "$(rpath --emit --shell bash)"PowerShell:
Invoke-Expression (& rpath --emit --shell pwsh)Fish:
rpath --emit --shell fish | sourcerpath Rebuild environment plan
rpath --emit Emit shell update commands
rpath print Print computed PATH
rpath doctor Diagnose environment issues
rpath diff Show PATH differences
rpath repair Fix PATH issues safely
rpath snapshot save Save current state
rpath snapshot list List snapshots
rpath snapshot restore Restore snapshot
rpath version list Show tracked environment versions
rpath version diff Compare versions
rpath upgrade Upgrade the installed binary
rpath install Install shell integration
rpath uninstall Remove shell integration
rpath watch Track environment changes
rpath integrate Connect external tools
rpath is designed to be non-destructive:
❌Never modifies system PATH directly during refresh❌Never silently writes system-wide changes❌Never performs network calls during refresh✅Only emits shell-safe commands✅Requires explicit install, uninstall, or upgrade commands for persistent changes✅Creates backups before modifying profiles✅Refuses invalid or unsafe PATH plans
rpath builds PATH from multiple trusted sources:
- User + system registry PATH
- Current process environment
- Git for Windows / MSYS (if present)
- Critical system directories preserved automatically
- Shell profiles (
.bashrc,.zshrc, etc.) /etc/environment- Package managers (Homebrew, Nix, Snap, Flatpak)
- User-local bin paths
rpath stores:
- snapshots (manual saves)
- version history (automatic tracking)
- integration markers
- watcher state
Stored locally in platform data directories.
For scripting and automation:
rpath doctor --json
rpath snapshot list --json
rpath diff --jsoncargo build --workspace
cargo run -- --helpcargo fmt --all -- --check
cargo clippy --workspace --all-targets -D warnings
cargo test --workspace
cargo doc --workspace --no-depsrpath-core– environment model & PATH plannerrpath-shell– shell emittersrpath-integrations– external integrationsrpath– CLI binary
If changes don’t apply:
rpath installThen restart your terminal.
For debugging:
rpath doctor --verbose
rpath diff
rpath repairSee:
