= 1bm: single binary manager
image:https://img.shields.io/crates/v/onebm?style=flat-square[Crates.io,link=https://crates.io/crates/onebm]
1bm is a single (1) binary application manager. It installs, updates, uninstalls single binary applications (SBAs), just like a package manager would do to packages.
Due to limitations of Cargo, the crate is named onebm.
== Install and use
$ mkdir -p ~/.local/1bm/bin $ curl -O ~/.local/1bm/bin/1bm -sSL https://github.com/1bm/1bm/releases/latest/download/1bm-{linux,macos,windows.exe} $ echo 'export PATH="$HOME/.local/1bm/bin:$PATH"' >> ~/.config/fish/config.fish; source ~/.config/fish/config.fish
An installer is intentionally not provided because literally four lines won't cost you much time.
The download links are redirected to GitHub releases. You can as well download them from there manually.
$ 1bm i https://github.com/some/app/raw/master/app.1bmdist
$ 1bm i -n someapp https://github.com/some/app/raw/master/app.1bmdist
$ 1bm ls
$ 1bm up
$ 1bm up 1bm someapp
That's it. 1bm doesn't attempt to do more than that.
$ rm -rf ~/.local/1bm
For developers generating dist files and signatures,
please refer to <
== Why?
Nowadays, many CLI applications are built in a way so that they're delivered as a single binary, without depending on shared libraries. Also notably, AppImage is an attempt at doing so for GUI applications.
Using a full-blown software package manager, packages are often managed by people other than application authors, resulting in outdated versions or even abandoned packages.
How about using the package manager of the programming language the application is written in? First, language package managers, despite being called "package managers" just like software package managers, are used to manage source code packages (libraries), not binaries; second, the user has to install an additional piece of software they may otherwise make no use of.
Many authors now utilize public CI/CD services to deliver their applications; it's often trivial to download the binaries from such services.
Thus, it's reasonable to have an "application manager" for SBAs.
== How?
== Security?
Indeed, running pre-built binaries poses some security concerns. But unless you are hardcore enough to audit and build yourself all - I mean ALL - software you use, including the operating system, you are running things you don't 100% know.
It's always about trust. And you already trust the application author, or you won't use what they built in the first place.
Plus, the binaries are signed.
== Dist files and signatures
Dist files are JSON files with an ".1bmdist" extension. Fields of the JSON:
string
Signing public key.string
Default binary name.string
Different depending on download_type, see below.string
* ghr
Download through GitHub releases, always the latest release.
Has following additional fields (on top level).
The github_asset_regex_*
fields may be omitted if no binary is built for certain platform.
download_url string
GitHub repo slug, e.g. bnoctis/1bm
.
*github_asset_regex_linux string
regular expression to match asset name for Linux.
* github_asset_regex_macos string
regular expression to match asset name for macOS.
*github_asset_regex_windows string
regular expression to match asset name for Windows.
* url
Direct URL download, no version check.
** download_url string
Download URL.Signatures are generated with https://github.com/jedisct1/minisign[minisign]. signing_key above is the public key.
Signatures are expected to be placed alongside the binary,
named SIGNED_FILE.minisig
, e.g. 1bm.minisig
if the binary is 1bm
,
which is the default behavior of minisign.
== License
BSD 3-clause © Blair Noctis.