If by "CLI"", you just mean "terminal", I've used ellama in emacs as a frontend to ollama and llama.cpp. Emacs, can run on a terminal, and that's how I use it.
If you specifically want "CLI", I'm sure that there are CLI clients out there. Be almost zero functionality, though.
Usually a local LLM server, what does the actual computation, is a faceless daemon, has clients talk to it over HTTP.
EDIT: llama-cli can run on the commandline for a single command and does the computation itself. It'll probably have a lot of overhead, though, if you're running a bunch of queries in a row
the time to load a model is significant.