It's possible to submit transactions using cardano cli. Here is an example (assumes you have gone through the steps to build the tx):
cardano-cli transaction submit --tx-file matx.signed --mainnet
I would like to follow up on the transaction after submitting. For that I need the transaction ID. Is there a way to derive or otherwise programatically figure out the transaction Id of a tx created in this manner?