PackagerBuddy is a JSON config based software packager written entirely in Python.
Use Cases
- I set up (virtual) machines often and want to have a quick way of setting up software.
- I run multiple versions of the same software package.
- I don't like how software auto-updates and installs a newer version of itself.
If you wish to install the current master, use the following command:
# latest master
pip install git+git://github.com/cedricduriau/packagerbuddy.git
# specific version
pip install git+git://github.com/cedricduriau/packagerbuddy.git@{RELEASE}
The setup command will create all directories required to function. By default these are installed in the user home directory. To change the default location, see see Configure.
packagerbuddy setup
The add command requires two arguments. The software
argument used as alias to interact with, and the url
argument which needs to be an url containing a version placeholder.
packagerbuddy add --software codium --url https://github.com/VSCodium/vscodium/releases/download/{version}/VSCodium-darwin-arm64-{version}.zip
The remove command requires a single argument, the software
argument, which needs to match an already added software. To list the available software packages, see avail
command below.
packagerbuddy remove --software codium
The avail
command prints all software names that are present in the config, supported by PackgerBuddy.
packagerbuddy avail
The install
command requires two arguments. The software
argument which needs to match an alias in the software config and the version
argument which needs to form an existing download url. If the requested software version has already been installed, the install will stop.
packagerbuddy install --software codium --version 1.85.2.2401
Installing consists of five steps:
- Download the software from the url in the configs to the designated download directory.
- Unpack the downloaded content.
- Install/move the unpacked content to the designated install directory.
- Run the post install script from the designated scripts directory.
The list
command prints all installed software. PackagerBuddy knows the difference between ordinary directories and software it installed thanks to a package file which is written out at install time.
packagerbuddy list
The uninstall
command, well, does exactly that. It checks if the given software is installed at all and if so, proceeds to remove the file system contents in the designated install location.
The version
argument is optional. If it is passed, only given version will be removed. If it is not passed, all versions will be uninstalled of given software. Beware of this feature.
# uninstall all versions
packagerbuddy uninstall --software codium
# uninstall specific version
packagerbuddy uninstall --software codium --version 1.85.2.2401
PB_CONFIG
: Path of the software config.- default: custom file in the user home. (
~/.packagerbuddy/config/software.json
)
- default: custom file in the user home. (
PB_DOWNLOAD
: Directory the software will be downloaded to.- default: custom directory in the user home. (
~/.packagerbuddy/downloaded
)
- default: custom directory in the user home. (
PB_INSTALL
: Directory the software will be installed in.- default: custom directory in the user home. (
~/.packagerbuddy/installed
)
- default: custom directory in the user home. (
PB_SCRIPTS
: Directory of the post install scripts.- default: custom directory in the user home. (
~/.packagerbuddy/scripts
)
- default: custom directory in the user home. (
If you want to try out the example shipping with the repository, run following commands from the root of this repo:
cp -R ./darwin-arm64/examples/* ~/.packagerbuddy/