for mac you only need to use brew install p7zip
7z a -mhe=on -pPASSWORD "../cv.7z"
same command on windows need to install 7z command line
7z.exe a -mhe=on -pPASSWORD "..\sot.7z"
to compress folder
7z a -r -mhe=on -pPASSWORD dbeaver.7z dbeaver
on ubuntu install p7zip (recommanded p7zip-full & p7zip-rar)
you can decompress files using
7z x -pPASSWORD cv.7z
N.B: PASSWORD (in capital letter) is the password