Does not sound like a Linux distro problem. Can you name any free software pieces that fit the description? If they exist, they're likely to be in a lot of distros' package repos already.
I think I've tried some TUI chatbot with a small llama LLM recently, just out of curiosity. It was available in Arch repo by default. Can't remember the name though.