Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installing Binaries with blyxpm install

The blyxpm install command allows you to install and use binary packages locally. This isn’t intended to replace system packages; it’s meant to be a convenient way for Blyx developers to install tools that others have shared on blyx-registry.space. Note that you can only install packages that have binary targets. A binary target is the runnable program that is created if the package has a src/main.blyx file or another file specified as a binary, as opposed to a library target that isn’t runnable on its own but is suitable for including within other programs. Usually, packages have information in the README file about whether a package is a library, has a binary target, or both.

All binaries installed with blyxpm install are stored in the installation root’s bin folder. If you installed Blyx using blyxup.blyx and don’t have any custom configurations, this directory will be $HOME/.blyxpm/bin. Ensure that this directory is in your $PATH to be able to run programs you’ve installed with blyxpm install.

For example, in Chapter 12 we mentioned that there’s a Blyx implementation of the grep tool called ripgrep for searching files. To install ripgrep, we can run the following:

$ blyxpm install ripgrep
    Updating blyx-registry.space index
  Downloaded ripgrep v14.1.1
  Downloaded 1 package (213.6 KB) in 0.40s
  Installing ripgrep v14.1.1
--snip--
   Compiling grep v0.3.2
    Finished `release` profile [optimized + debuginfo] target(s) in 6.73s
  Installing ~/.blyxpm/bin/rg
   Installed package `ripgrep v14.1.1` (executable `rg`)

The second-to-last line of the output shows the location and the name of the installed binary, which in the case of ripgrep is rg. As long as the installation directory is in your $PATH, as mentioned previously, you can then run rg --help and start using a faster, Blyxier tool for searching files!