pkgx Management
Launchpad provides dedicated commands for installing and managing pkgx itself, which is the underlying engine that powers package installation.
Installing pkgx
If you don't have pkgx installed, Launchpad can install it for you:
launchpad pkgx
This will:
- Check if pkgx is already installed
- Download and install the latest version of pkgx if needed
- Set it up in a location that's accessible in your PATH
Installation Location
By default, pkgx is installed to:
/usr/local
if it's writable by the current user~/.local
as a fallback location
You can specify a different installation location:
launchpad pkgx --path ~/apps
Force Reinstallation
To reinstall or update pkgx even if it's already installed:
launchpad pkgx --force
Auto-update Configuration
pkgx has its own auto-update mechanism. Launchpad provides commands to manage this feature:
Check current auto-update status:
launchpad autoupdate
Enable automatic updates:
launchpad autoupdate:enable
Disable automatic updates:
launchpad autoupdate:disable
Handling Permissions
When installing to system directories like /usr/local
, you might need elevated permissions:
# With auto-sudo enabled (default)
launchpad pkgx
# If auto-sudo is disabled
sudo launchpad pkgx
# Or explicitly use sudo
launchpad pkgx --sudo
How pkgx Installation Works
When you run the pkgx installation command, Launchpad:
- Checks if pkgx is already installed and not forced to reinstall
- Creates the necessary installation directories
- Downloads the pkgx installation script from
https://pkgx.sh
- Runs the installation script with the specified installation path
- Verifies the installation
Automatic Installation
You don't need to explicitly install pkgx before using other Launchpad commands. If pkgx is required for an operation but not found, Launchpad will install it automatically.
pkgx Configuration
pkgx stores its configuration in ~/.config/pkgx/config.json
. Launchpad can modify this configuration through commands like autoupdate:enable
and autoupdate:disable
.
The configuration might look like:
{
"auto_update": true
}
Troubleshooting
If you encounter issues with pkgx installation:
Try running with verbose logging:
bashlaunchpad pkgx --verbose
Check if pkgx is properly installed:
bashwhich pkgx pkgx --version
Reinstall pkgx:
bashlaunchpad pkgx --force