I haven't tried this myself so I apologize if it ends up being bad, but I've seen Aider [0] get linked a few times from people who wanted a CLI solution for AI code completion.
Aider is really cool for small projects, but it builds a repo map instead of using RAG. That works on small codebases, but totally fails to be useful on large ones.
>5k source files. They don't fit into the context. I know I can limit what is sent, and I can attach files in the Aider chat myself. But this is not perfect for making an LLM answer questions about a codebase when I don't know much context beforehand. With Cursor, I can just do "@codebase How is a %feature% implemented?", and it's very quick and often helpful with a couple of follow-ups.
I haven't tried this myself so I apologize if it ends up being bad, but I've seen Aider [0] get linked a few times from people who wanted a CLI solution for AI code completion.
[0]: https://aider.chat/