janhq/cortex.cpp

idea: CLI should not access backend services directly

Opened this issue · 1 comments

Problem Statement

CLI currently access the following services

https://github.com/menloresearch/cortex.cpp/blob/b31878db2580056232b9841a6e0b42e63cca8167/engine/cli/command_line_parser.cc#L50-L54

These are backend services. The CLI shouldn't access those as much as possible

TODO: figure out why the CLI needs them, and remove if possible

This will also remove unnecessary linking

https://github.com/menloresearch/cortex.cpp/blob/b31878db2580056232b9841a6e0b42e63cca8167/engine/cli/CMakeLists.txt#L75-L88

Feature Idea

See above

I do agree with this, the CLI library should be as minimal as possible, I think in my new refactor PR, I created a mechanism on how to "register" commands. We can utilize this method to register cmds that we really need for a speicific configuration. That will I guess minimize the amount of depencies implicitely.