How do I add the wifi and bluetooth icon to the menubar programatically (from the command line)?
I believe the Wi-Fi one is there by default, but if you want to be sure, you can use 

open '/System/Library/CoreServices/Menu Extras/Bluetooth.menu'

open '/System/Library/CoreServices/Menu Extras/AirPort.menu'

to add them to the menu bar.

(Note: those paths are valid from at least El Capitan to Catalina.)