2025-06-14 Taking a look at repolocli
Repology is an interesting tool for checking whether a piece of software is packaged for operating systems (including FreeBSD). If you browse around enough code sites and software repos you could find badges that show something like Packaging status for various distros. here is a demo badge:
It seems these are powered by repology. Quite cool.
Usually for myself, I run this command at the FreeBSD terminal for my answers:
# find out if there is a package named foo
$ pkg search <packagename>
However, it would be nice to query repology directly (it has an API like all good mannered online databases) from the command line and bypass needing a browser. There happens to be a handy tool aptly named repology by Prof Callahan (aka Ibara) however THAT tool is written in D and unfortunately it's not packaged as a FreeBSD port (yet). However, since we're focusing on rust type things. Luckily, there happens to be options in Rust land for this. One tool I found is called repolocli which describes itself as
This repository is a WIP project to bring repology to the commandline.
Even if it's 'alpha', it still appears usable from the CLI which is sufficient for this case. And it is written in Rust (for better or worse). Assuming once again the reader has a working Rust installation on FreeBSD let's get cracking and try it out!
First, let's clone the repo and do a compile (compiled fine for me in a FreeBSD jail with rust (1.74) installed.
$ git clone https://github.com/matthiasbeyer/repolocli
$ cd repolocli
$ cargo build
Once the compile is ready, let's find something on the command line. This time instead of installing the utility, the demonstration I am going to show uses a common cargo idiom (cargo run) to just run an application.
$ cargo run -- --config ./repolocli.toml project rust | grep freebsd
Finished dev [unoptimized + debuginfo] target(s) in 0.05s
Running `target/debug/repolocli --config ./repolocli.toml project rust`
lang/rust-bootstrap - 1.87.0 - freebsd - newest -
lang/rust-bootstrap - 1.87.0 - freebsd - newest -
lang/rust-bootstrap - 1.87.0 - freebsd - newest -
lang/rust-bootstrap - 1.87.0 - freebsd - newest -
lang/rust-bootstrap - 1.87.0 - freebsd - newest -
lang/rust-bootstrap - 1.87.0 - freebsd - newest -
lang/rust-bootstrap - 1.87.0 - freebsd - newest -
lang/rust-bootstrap - 1.87.0 - freebsd - newest -
lang/rust - 1.87.0 - freebsd - newest -
lang/rust-nightly - 1.89.0.20250609 - freebsd - ignored -
Note, I had to feed the --config option directly when running from the command line otherwise I would get an error like the following
ERROR [repolocli] Error: Cannot find repolocli.toml
ERROR [repolocli] Caused by: Cannot find repolocli.toml
Enjoy!