How can I “Open an app from an unidentified developer” without using the GUI?
You'll either have to change the settings under System Preferences > Security &amp; Privacy > General > Allow applications downloaded from: to Anywhere or in a Terminal, strip the xattr com.apple.quarantine attribute from the downloaded file(s).

xattr -dr com.apple.quarantine "unidentified_thirdparty.app"