Sending commands from CB1 terminal to printer

Yes, Moonraker is the right interface process for such. See Remote API - Moonraker for the documentation.
Also see Announcing klipper-repl: the missing Klipper command line → you might find it useful