If you need a CLI version to uncompress 7Zip or RAR files try the following:
(Multi-format)
Move uncompressed files lsar and unar to /usr/local/bin
https://cdn.theunarchiver.com/downloads/unarMac.zip
(7Zip format)
After pkg installs files 7z 7za 7zr are located in /usr/local/bin
https://raw.githubusercontent.com/rudix-mac/pkg/master/p7zip-16.02.pkg