Skip to content

The rock-solid Bash package manager.

License

MPL-2.0, MIT licenses found

Licenses found

MPL-2.0
LICENSE
MIT
LICENSE.basher
Notifications You must be signed in to change notification settings

bash-bastion/basalt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7000535 · Jul 14, 2021
Jul 13, 2021
Jul 5, 2021
Jul 14, 2021
Jul 14, 2021
Jul 14, 2021
Jul 14, 2021
Jul 8, 2021
Jun 24, 2014
Feb 14, 2016
Jul 3, 2021
Jul 7, 2021
Jul 9, 2021
Jul 18, 2014
Jul 11, 2021
Jul 10, 2021
Jul 5, 2021
Jul 5, 2021

Repository files navigation

bpm

bpm is the ultimate Bash (and Zsh, Fish, etc.) Package Manager


STATUS: ALPHA

bpm is a fork of basher that adds a ton of new functionality. It makes it significantly easier to install Bash, Zsh, etc. projects to your computer. Often, these projects / scripts are not available through official apt, DNF, pacman repositories, or even from unofficial sources like third party apt repositories or the AUR

Let's say you want to install rupa/z, tj/git-extras, aristocratos/bashtop, and JosefZIla/bash2048. Simply run the following

$ bpm add rupa/z tj/git-extras aristocratos/bashtop JosefZIla/bash2048

This symlinks all executable scripts to a common directory. It does this for completion files and man pages as well

$ ls -l --color=always ~/.local/share/bpm/cellar/bin/
... bash2048.sh -> /home/edwin/.local/share/bpm/cellar/packages/github.com/JosefZIla/bash2048/bash2048.sh
... bashtop -> /home/edwin/.local/share/bpm/cellar/packages/github.com/aristocratos/bashtop/bashtop
... git-alias -> /home/edwin/.local/share/bpm/cellar/packages/github.com/tj/git-extras/bin/git-alias
... git-archive-file -> /home/edwin/.local/share/bpm/cellar/packages/github.com/tj/git-extras/bin/git-archive-file
...

To be able to access the binaries, completion files, and man pages in your shell, simply add a two-liner in your shell configuration

# ~/.bashrc
export PATH="${XDG_DATA_HOME:-$HOME/.local/share}/bpm/source/pkg/bin:$PATH"
eval "$(bpm init bash)" # zsh and fish are also supported

See Installation and Getting Started for more details

Alternatives Comparison

Why not use bpkg or Basher? Because bpm...

  • Can install multiple packages at once
  • Install local dependencies for a particular project (bpkg and basher)
  • Does not use a package.json that clobbers with NPM's package.json (bpkg)
  • Does not automatically invoke make commands on your behalf (bpkg)
  • Does not automatically source a package.sh for package configuration (basher)
  • Is able to install more repositories out-of-the-box
  • Respects the XDG Base Directory specification (bpkg)
  • Is faster (bpm considers exec and subshell creation overhead)
  • Has a much improved help output (basher)
  • Prints why a command failed, rather than just printing the help menu (basher)
  • Better bpm completion scripts
  • More flexibly parses command line arguments (basher)
  • Install local directories as packages (bpkg)

I I forked Basher because it had an excellent test suite and its behavior for installing packages made more sense to me, compared to bpkg