Skip to main content

/usr/bin/cat for the LLM era

Project description

/usr/bin/cat for LLMs

llcat is an LLM program with very little ambition.

That's why it's awesome.

llcat

You can handle this!


List the models on OpenRouter:

uvx llcat -s https://openrouter.ai/api -m

Go ahead, do that one right now. I'll wait.


llcat solves all your problems.

Yes. Every one.

It can also:

  • Pipe things from stdin and/or be prompted on the command line.
  • Store conversation history optionally, as a boring JSON file.
  • Do tool calling using the OpenAI spec. There's an example in this repository (and below).
  • Use local or remote servers, authenticated or not.
  • List models using -m without arguments. Specify a model with the argument.

Free Samples? Sure! It's Free Software.

  • pipx install llcat
  • uvx llcat

Dependencies? Just the requests library.

It's llcat, not llmcat. Let's keep it pronounceable.

Feels nice to be unambitious.

Examples

Let's start with llama:

$ llcat -s https://openrouter.ai/api \
        -m meta-llama/llama-3.2-3b-instruct:free \
        -c /tmp/convo.txt \
        -k $(cat openrouter.key) \
        "What is the capital of France?"

Continue with Qwen:

$ llcat -s https://openrouter.ai/api \
        -m qwen/qwen3-4b:free \
        -c /tmp/convo.txt \
        -k $(cat openrouter.key) \
        "And what about Canada?"

And finish on the local network:

$ llcat -s http://192.168.1.21:8080 \
        -c /tmp/convo.txt \
        "And what about Japan?"

One conversation, hopping across models and servers.

Pure sorcery.

Summon Some More

Want to store state? Let's go!

$ source fancy.sh
$ llc-server http://192.168.1.21:8080
$ llc "write a diss track where the knapsack problem hates on the towers of hanoi"

Now go read the four lines of fancy.sh

Surprise! It's just an example. Environment variables and a wrapper function. That's all you need.

The Tool Call To Rule Them All

This example, a very strange way to play mp3s, uses the sophisticated 21 line example_tool_program.py included in this repository.

It also uses DA`/50's pretty little streaming markdown renderer, streamdown.

tc

Kablam! Alright a16z where's my $50 million?

The enterprise applications are limitless...

Boring Documentation

usage: llcat [-h] [-c CONVERSATION] [-m [MODEL]] [-k KEY] [-s SERVER]
                [-tf TOOL_FILE] [-tp TOOL_PROGRAM]
                [prompt ...]

positional arguments:
  prompt                Your prompt

options:
  -h, --help            show this help message and exit
  -c, --conversation CONVERSATION
                        Conversation history file
  -m, --model [MODEL]   Model to use (or list models if no value)
  -k, --key KEY         API key for authorization
  -s, --server SERVER   Server URL (e.g., http://::1:8080)
  -tf, --tool_file TOOL_FILE
                        JSON file with tool definitions
  -tp, --tool_program TOOL_PROGRAM
                        Program to execute tool calls

Brought to you by DA`/50: Make the future obvious.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llcat-0.6.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llcat-0.6.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file llcat-0.6.0.tar.gz.

File metadata

  • Download URL: llcat-0.6.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.11

File hashes

Hashes for llcat-0.6.0.tar.gz
Algorithm Hash digest
SHA256 ca868a1ec7aedf8205ba264a71f4117874f48f42cce9c5184a4b8747bcd3bdba
MD5 b921d4221da43c3dae486e679c0f4c7d
BLAKE2b-256 1e123bab4bcfbdc461f7f6eaaeb8b73182e94d4a7f1317bc8e629f003bda6f67

See more details on using hashes here.

File details

Details for the file llcat-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: llcat-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.11

File hashes

Hashes for llcat-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 71c3b8321011ebd3de0137afb2cc0faa8b9febcccc6e1ed998de2b3e63b83c68
MD5 b8a23b4c355796ef587286a56153094c
BLAKE2b-256 61df8586d150302c273e7655070b35e74f1e7af92d436add8fd59f3075187143

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page