xupg-rs is a unified CLI tool for managing and updating versions of PHP, MySQL, Node.js, and more. Whether you use standalone tools or environments like XAMPP, Laragon, or Node.js, xupg-rs helps you stay organized by simplifying version management.
- List installed and available tool versions (locally and online).
- Install specific versions of tools to custom paths.
- Manage PHP versions within XAMPP seamlessly.
- Support for multiple environments: XAMPP, Laragon, Node.js, etc.
(Requires Rust and Cargo installed on your machine.)
cargo install xupg-rsVerify the installation:
xupg --versionIf you want to build the project from the source:
-
Clone the repository:
git clone https://github.com/codad5/xupg-rs.git cd xupg-rs -
Build and install the project with Cargo:
cargo install --path .This will build the binary and place it in your Cargo bin directory (
~/.cargo/binby default). -
Verify the installation:
xupg --version
If Cargo’s bin directory isn’t in your
PATH, you may need to add it:export PATH="$HOME/.cargo/bin:$PATH"
Here are some common commands for managing tools using xupg-rs.
xupg list -p-p, --php: List all available PHP versions.-o, --online: Fetch online versions for download.
Example:
xupg list -p -oThis lists online-available PHP versions.
xupg list -pThis lists locally-installed PHP versions.
xupg install -p <version> -pa <path>-p, --php <version>: Install a specific PHP version.-pa, --path <path>: (Optional) Specify installation path.
Example:
xupg install -p 8.1.0This installs PHP version 8.1.0 to the default path.
xupg xampp php -s <version> -p <path>-s, --set <version>: Set a specific PHP version for XAMPP.-p, --path [path]: (Optional) Specify the XAMPP path.
Example:
xupg xampp php -s 8.0.0 -p c:/zampp/This sets PHP version 8.0.0 as the default for XAMPP installed at c:/zampp/.
To install PHP 7.4.0 directly into XAMPP’s PHP directory:
xupg xampp php -s 7.4.0This would install PHP 7.4.0 and set it as the default PHP version for XAMPP.
- On Windows, the default XAMPP path is
C:\xampp. - On Linux, the default XAMPP path is
/opt/lampp.
cached: Caches data for improved performance.colored: Adds color to terminal output.dirs-next: Manages directories and paths.fli: A framework for building CLI applications.indicatif: Displays progress bars during installation.reqwest: Handles HTTP requests (e.g., fetching online versions).serdeandserde_json: Parse JSON data.tokio: Supports asynchronous operations.zip: Manages compressed files during downloads.
- Fork the repository on GitHub.
- Create a new branch:
git checkout -b feature-branch
- Make your changes and commit:
git commit -m "Add new feature" - Push your branch:
git push origin feature-branch
- Open a Pull Request on GitHub.
This project is licensed under the MIT License. See the LICENSE file for more information.
- GitHub: codad5
- Portfolio: https://codad5.me
- Twitter: @codad5_
- Add Docker support for managing tools in containers.
- Enhance Windows support for Laragon integration.
- Promote the tool on
crates.iofor community feedback and adoption.
With xupg-rs, managing versions across environments becomes straightforward and efficient. Install it today and simplify your workflow! 🚀