I looked for similar tools;
Looks like tayuya is also written in Python, on mido and music21. It has a "get all notes to play" feature, mentions LilyPond tab output as a todo, and has a get_key(midi) method built on music21: https://github.com/vipul-sharma20/tayuya#get-all-notes-to-pl...
tayuya.tabs:note_nearest_to_fret: https://github.com/vipul-sharma20/tayuya/blob/master/tayuya/...
Kord has a fretboard visualizer tool: https://github.com/synestematic/kord#fretboard-tool
Textual is another way to create CLIs for Python scripts.
What about tab playback and CLI-based scrubbing?
There was a post a week or so ago about an LWN article about spotify/pedalboard, which is written in Python and built on JUCE (C++) and supports VST3 and LV2 plugins like a MIDI player or a wavetable synth and a Guitarix effects rack: https://news.ycombinator.com/item?id=44604024#44648290