Skip to main content

Bin package manager, a package manager based on Github release

Project description

bin package manager

English | 简体中文

Bin package manager (BPM) is a Github release-based package manager that allows users to install and manage binaries from any Github release.

BPM is currently supported on Linux and Windows, python >= 3.9.

[!CAUTION] Risk Warning: Be aware of the potential risk of BPM Linux damaging your computer. By using BPM to install software, you accept this risk and trust third-party Github release packagers.

[TIP] BPM guarantees parity, i.e., bpm install followed immediately by bpm uninstall will not change the system in any way.

Why use it?

In non-rolling release Linux distributions, the version of softwares in official source are often too low to use some new features.

Rolling distributions, such as Archlinux, are also unable to install software from the AUR as root.

A common way to manage packages on Windows is scoop, but it requires the packager to maintain a "manifest" list.

Installation

BPM needs to be installed to root user.

pip

Linux

sudo pip install bin-package-manager --break-system-packages
sudo bpm

Note the risk of potentially breaking system packages.

Windows

pip install bin-package-manager
bpm

pipx

You can use pipx to install BPM.

sudo pipx install bin-package-manager

pipx will only install for the current user, so sudo is required. Alternatively, you can track on this issue and use other methods mentioned there.

Source code

If you don't want to use pipx, you can also download and use the source code.

BPM requires these libs, please install them manually.

git clone https://github.com/lxl66566/bpm.git
cd bpm
python3 -m bpm
# or use poetry to install dependencies and run: `poetry install && poetry run python -m bpm`

Usage

  • Install: bpm i <package>
  • Run bpm -h and bpm i -h for more help.
❯ bpm i -h
usage: bpm install [-h] [-b [BIN_NAME]] [-l [Archive]] [-q] [--one-bin] [--prefer-gnu] [-n] [-i] [--filter [FILTER ...]] [--sort [SORT]] packages [packages ...]

positional arguments:
  packages              Package name or github url to install

options:
  -h, --help            show this help message and exit
  -b [BIN_NAME], --bin-name [BIN_NAME]
                        specify the binary executable filename, otherwise use package name by default.
  -l [Archive], --local [Archive]
                        install from local archive.
  -q, --quiet           not ask, install the best match repo.
  --one-bin             install given binary only. Use package name as binary name by default.
  --prefer-gnu          bpm prefers musl target by default, you can change this default option.
  -n, --dry-run         print the install position, but not install actually.
  -i, --interactive     select asset interactively.
  --filter [FILTER ...]
                        filter assets
  --sort [SORT]         sort param in github api, use `best-match` by default. The value could be `stars`, `forks`, `help-wanted-
                        issues`, `updated`.

How it works

Linux

BPM automatically determines the file structure in the asset and installs it to the appropriate location on the system. The current installation is like:

  1. install binary
  2. merge the lib, include, share, man, bin directories into the system
  3. install completions
  4. install services (if exists systemd)

BPM automatically adds the .old suffix to existing files to avoid overwrite. The .old files will be restored in uninstalling.

Windows

BPM downloads asset into %userprofile%/bpm/app/<name> and creates shortcuts and cmd runner for the executables to %userprofile%/bpm/bin, which is added to %path%.

After v2.2.9, single .exe and .msi can be also downloaded and installed.

Develop

git clone https://github.com/lxl66566/bpm.git
cd bpm
poetry install
poetry run python -m unittest bpm/**/*.py  # run tests

TODO

  • no pre release
  • try install
  • windows support
  • offline install
  • install from github link
  • update from local
  • exe and msi support

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bin_package_manager-2.2.10.tar.gz (22.2 kB view details)

Uploaded Source

Built Distribution

bin_package_manager-2.2.10-py3-none-any.whl (25.4 kB view details)

Uploaded Python 3

File details

Details for the file bin_package_manager-2.2.10.tar.gz.

File metadata

  • Download URL: bin_package_manager-2.2.10.tar.gz
  • Upload date:
  • Size: 22.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.6.35

File hashes

Hashes for bin_package_manager-2.2.10.tar.gz
Algorithm Hash digest
SHA256 299654426eb3389dfce0762cc93a9e349e357bee4443b3b2ad0eefc60995175c
MD5 1d7fe40a6493b8aa15b1db9f9343aa2e
BLAKE2b-256 3c95dd85090e73ef43a4f13e7d46911ab2548e820fc9d6e3604bba9496e3d9cc

See more details on using hashes here.

File details

Details for the file bin_package_manager-2.2.10-py3-none-any.whl.

File metadata

File hashes

Hashes for bin_package_manager-2.2.10-py3-none-any.whl
Algorithm Hash digest
SHA256 7cbcb0331bd24ca600e6515a4a87aa431da90bac92d69748c659e2438a05f91c
MD5 937d5694f346eedf4a4148ce3418d058
BLAKE2b-256 e52c5864494f49116f5f7036d5e31f2040678dbe364aec2d7ac26827cf504dfa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page