jq, yq, yx, xq

By chimo on (updated on )

This is one of those times where I did a search, which yielded an unexpected but interesting result, which led me to a CLI tool, which led me to another CLI tool... It's almost like the web is built on links, or something.

I am interested in running my own LXC/Incus image server for my own little LAN. I know I can create images on Incus Host A, make them “public” (within the LAN) and other Incus Hosts can access them. I am wondering, however, if I can run a standalone server (in a container!) for that purpose. For fun.

While I was researching this (still am, with a brief hiatus to write this blog post), I landed on the Default image server Incus documentation page. Sounds like “Simple streams” might be of interest. Down the page, it talks about the “incus-simplestreams” tool. I don’t seem to have this tool installed on Alpine Linux, so I searched the repos:

apk search incus
...
tiny-cloud-incus-3.1.0-r0

This doesn’t seem to be related to simplestreams, but it piqued my interest.

I went to the package’s homepage and read the README, which lists yx in its requirements.

Now this also got me curious because I know and use jq for JSON. I am aware of yq for YAML although I haven’t used it yet. So now I kind of want to know what the difference is between yq and yx.

A couple of searches later I stumble upon “jq, xq and yq - Handy tools for the command line”. Well, I should’ve seen that coming: xq is for XML (and HTML, etc).

It gets even more fun when apparently sometimes you’re Executing “yq” but “jq” gets executed.

Alright, where am I? What year is this? What was I doing?

Right… simplestreams. The command I should’ve ran first is “apk search cmd:incus-simplestreams”:

  • incus-feature-utils-6.7.0-r4
  • incus-utils-6.0.3-r1

I still don’t know the difference between yq and yx, and I’m not much farther in my image server research, but now I have a blog, I guess?