creation of a platform for controlling an avatar via terminal input

Hi,
I am working on a project involving a humanoid robot with high human likeness. I need to develop a platform that will allow me to control an avatar with the same input values that I use to control the robot, i.e. a vector of values or an xml containing the values of the servomotors in the robot’s skull, and which allow certain facial expressions.
I would then need to create an avatar with a customised control rig (or possibly remap the basic metahuman control rig) whose values can be controlled not only via the sliders, but also via the value passed in real time via the terminal.

Doing various searches I only find references to the possibility of controlling an avatar through a video recorded with an iphone, or at any rate regarding the creation of animations, but nothing involving real time and the use of a terminal, so I thought I’d ask here to be directed to some similar project or some tool that could help me.

Thanks in advance!