I need a tool that generates bech32 from public key. Would be great if it's in c++ or python
you can use
https://coinb.in/#verify to generate 3 different format addresses from a pubkey
it's not commandline and based on javascript, but you can check its source code
https://github.com/OutCast3k/coinbin/ that should give you some ideas if you want to write your own code in c++ or python