This is really cool!
Here's an example of using emacs to do it.
Uses tabnine for real time completion, and Copilot/Codex for more advance completions.
https://semiosis.github.io/posts/nlsh-plus-tabnine-real-time...
It uses NLSH and Cterm. https://semiosis.github.io/nlsh/ https://semiosis.github.io/cterm/