(N.B. the Replicad studio code editor on that site seems to be broken today, which is a bummer -- it wasn't when I last checked)
CadQuery might not be in Ubuntu repositories on its own (same with Build123D -- these are python libraries really) but have you tried looking for cq-editor? (I think that's in Homebrew as well.)
https://snapcraft.io/install/cadquery-editor/ubuntu
To be fair I'd probably install the VSCode support for Build123D and CadQuery instead, because 1) this is code-CAD and you really manage it as such, and 2) I'm not that fond of the cq-editor environment.
https://marketplace.visualstudio.com/items?itemName=bernhard...
https://github.com/bernhard-42/vscode-ocp-cad-viewer
This extension can install Build123D or CadQuery for you if you have a python setup for VSCode.