I have implemented OT-CLI-FTD communication between two EFR32MG12 MCUs using the command line terminal, but now how could I handle it without the command line terminal for its initial setups. So that I could implement it in the MCUs themselves.
The OpenThread CLI makes calls to the OpenThread API. You can use that as a reference to what OpenThread APIs you need to call.
We have a Developing with OpenThread APIs codelab. At the same time, many OpenThread platforms include examples in their SDKs.