A custom CLIent (get it? CLI and client how funny) for different AI things. Primarily chatting, but also some embedding functionality
Privacy friendly: this piece of bytes does not write any data to the drive unless explicitly told to
The format this thing uses for naming models is interfaces. It is provider:model. Available providers:
-
ollama(optionalOLLAMA_HOSTvariable (http://localhost:11434by default) just like the official Ollama client) -
google(set theGEMINI_API_KEYenv var with the API key)
Since it is a Rust project, it is pretty straightforward
cargo install --git https://github.com/rdsq/claiThis is the main functionality of this project, though not the only one
Simplest one of them, simply generate a response from a prompt. So it's something like
clai gen ollama:gemma3:1b "Hello World"You can also attach an image with --image path/to/image.jpg if the model supports it
This is exactly what you would expect. Open a chat with a chatbot
clai chat ollama:gpt-ossChat mode also has commands! Type /help in chat to see more
It also has a feature where you can define an autosave file in gen and chat using the --file option
To read these JSON files, you can use this command
clai read ./chat.jsonThese are rather for fun, obviously
Make two AIs talk to one another, forever
You can define them to be the same model, different ones, whatever sounds fun
clai model-with-model "Hello World" ollama:mistral google:gemini-2.0-flashMake a model talk forever. With no inputs, just talk into the void, and see how it goes (probably weird)
clai monologue ollama:phi4These are not about chatbots, they're about embeddings
Basically a thing that evaluates the semantic meaning of strings
So basically, you can do stuff like
clai semsearch ollama:nomic-embed-text \
'fruit' \
'apple' 'strawberry' 'banana'Or with files
clai semsearch ollama:nomic-embed-text 'nice weather' --input-format file my-posts/*Or with JSON (which is for the next feature)
This one is useful as caching embeddings for the semsearch command. So:
clai embed ollama:nomic-embed-text 'The weather is nice today' 'Cats are awesome' 'Rust is cool' 'hello world' --output-format json > my-posts.jsonAnd then:
cat my-posts.json | clai semsearch ollama:nomic-embed-text -f json 'programming'