µllm
I am not an avid LLM user, but sometimes I want to use it to ask specific
questions where I expect the answer to be more specific than the one I would
get from Google. In the past I was using the desktop application of one
provider but I found various drawbacks and as a developer I wanted to do
something simple specific for myself.
There are multiple reasons for it, here are the main ones.
-
Use different models. Since the beginning of 2026 open weight
models are becoming increasingly more powerful so I wanted to have the
opportunity to try them.
-
Command Line Interface. I spend most of my time in the terminal, so
I wanted to something that I can use directly from a CLI instead of having
a desktop or (even worse) a browser application.
-
Privacy-first. It's not always easy to understand if and how your
data is going to be used by the provider. I want to make sure that the
provider I use have a strict zero data retention policy.
-
No subscription. I don't like subscriptions overall, and since I'm
not a heavy user I would be paying much less if I pay per token instead of
paying a monthly subscription. It depends of course which model I use and
for how long.
-
Multi-platform. I use multiple operating systems and multiple
architectures, so this project needs to work on all of them.
With this premise I started looking around and found out that the best
service for this is OpenRouter, and I
only needed to build a simple CLI around it.
Here are the supported features.
-
Support for multiple models. The CLI is not supporting all the
OpenRouter models because there are simply too many. I made a selection of
both open weight and proprietary models that is enough for all my use
cases.
-
Support for sessions. Sometimes I need to export a session so that
I can read it later on or I need to load it again later on, so I added the
support for saving and loading sessions.
-
Basic support for artifacts. If the model is generating an artifact
(e.g. a snippet of code) you should be able to open it in your editor and
change or save it. There is a basic support for this.
-
Support for attachments. In the prompt you can add a file using the
'@' prefix. This is useful to add more context to the model so it can
personalize the response for your use case.
-
Support for image generation. There are some image generation
models that can be used. If your terminal supports the Kitty graphics
protocol the output can be displayed directly in the terminal, otherwise
you can simply save the output as an image.
There are various commands supported in the CLI. Here is the list.
- /models shows the list of available models
- /model <model> selects a specific model (default:
openrouter/auto)
- /stats [on|off] turns on/off the statistics (default: on)
- /save-session <name> saves a session
- /load-session <name> load a session
- /artifacts show the list of artifacts
- /artifact <number> opens a specific artifact
- /editor opens an editor where you can write a more complex
prompt
- /image-save to save the image
There is no configuration file for µllm. There are (I think) sane
defaults, but if you want to change them my suggestion is to create an alias
in your shell configuration passing your preferred flags.
The only environment variable required is ULLM_OPENROUTER_API_KEY
containing the API key of OpenRouter to use.
Download the binary or the latest binary or the source code
here.
Changelogs
v002 (20 August 2026)
- Add support for images
- Change /compose to /editor
- Update model list
- Small bug fixes and UI improvements
v001 (4 August 2026)
Initial version.