Native, blazing fast, zero-configuration PHP version manager for Arch Linux and other Linux/macOS environments, heavily inspired by fnm.
PVM uses pre-compiled static PHP CLI binaries from Static PHP CLI (SPC) to completely bypass compilation times and library dependency hell on Linux.
- 🚀 Blazing Fast: Written in Rust natively. Execution means zero overhead compared to Docker wrappers.
- ✨ Zero Configuration: Auto-switches PHP versions based on
.php-versionfiles. - 📦 Static Binaries: No compilation needed. The
pvm installcommand instantly downloads self-contained executables with most common extensions pre-baked. - 🧩 Multi-Package Selection: Pick which packages to install per version —
cli,fpm, and/ormicro(micro.sfx) — via an interactive MultiSelect prompt.cliis the default. - 🐘 Native Composer Support: Works out of the box with your system's global Composer without any explicit proxy or configuration.
- 🖱️ Interactive TUI Menus: Run
pvmwithout arguments to launch a master selection menu. Or run commands likepvm use/pvm ls-remote/pvm uninstallwithout parameters to select actions via a visual UI. - 🏷️ Smart Aliasing: Install and use patches cleanly by saying
pvm install 8.4. PVM dynamically figures out the highest patch (8.4.18) underneath the hood. - 🔄 Patch Update Check:
pvm use 8.4notices when a newer patch (e.g.8.4.19) is available and offers to install and switch in one step. - 📝
.php-versionBootstrap:pvm initinteractively picks a major.minor and writes.php-versionfor the current directory. - 🗑️ Clean Uninstall:
pvm uninstall(aliasrm/remove) removes a version's binaries; warns when removing the active one. - 🐚 Multi-Shell: Bash, Zsh, and Fish wrappers generated by
pvm env, with concurrency-safe per-PID env files locked viafs4. - ⚡ Cached Cloud Resolution: Quickly check for new versions on
dl.static-php.devunder lightning-fast 24-hour JSON caching.
We provide an automatic install script that detects your platform exactly like fnm and downloads the pre-compiled native pvm binary directly from GitHub Releases into ~/.local/share/pvm/bin, and then instructs you how to append the hook to your profile.
Using a script (macOS/Linux)
curl -fsSL https://raw.githubusercontent.com/WebProject-xyz/php-version-manager/main/install.sh | bashBuilding from Source If you prefer to compile the application from scratch using Rust:
git clone git@github.com:WebProject-xyz/php-version-manager.git
cd php-version-manager
chmod +x build.sh
./build.sh# Enter the master interactive TUI menu
pvm
# Install a specific PHP version (by minor alias or fully-qualified).
# Opens a MultiSelect to pick packages: cli (default), fpm, micro.
pvm install 8.4 # alias: pvm i 8.4
# Install the absolute latest version available
pvm install latest
# Use a version in the current shell.
# Auto-prompts to install + switch if a newer patch exists upstream.
pvm use 8.4
# List all local installed versions alongside their specific aliases
pvm ls # alias for: pvm list
# Interactively view and install available cloud versions
pvm ls-remote # alias: pvm list-remote
# Print the currently active PHP version
pvm current
# Remove an installed version (interactive picker if no arg).
pvm uninstall 8.3 # aliases: pvm rm 8.3 / pvm remove 8.3
# Write a .php-version file for this directory (interactive picker)
pvm initIf you run pvm init or manually create a .php-version file in a project directory containing 8.3, PVM will automatically switch to your best local 8.3.x patch when you cd into that folder. The cd hook is installed via pvm env (Bash, Zsh, or Fish — auto-detected from $SHELL).