Title: cll: Adding unix pipe support
Author: Alex Kirk
Published: December 14, 2023

---

# cll: Adding unix pipe support

December 14, 2023

Today I’ve added a little feature to [my cll tool](https://github.com/akirk/cll)(
[which I renamed again](https://alex.kirk.at/2023/10/20/chat-cli-renamed-and-added-ollama-support/)
but I think now I’ll stick to this) so that it can process stdin so that you can
do stuff like this:

    ```wp-block-code
    echo 'a presentation about the friends plugin for wordpress' | cgt -s 'Please create a reveal.js presentation based on the following notes. Ensure to use short titles and short few words on each list item. Please load the moon theme and scripts from the cdn.jsdelivr.net domain, dont use any reveal.js plugins. Respond with just the HTML, no outside comments.' > presentation.html
    ```

Which creates a presentation.html file that contains a full Reveal.js presentation
on the topic.

The systems prompt will tell the model how to behave so that you can also (granted
it doesn’t always work but it’s gotten better) tell it to output JSON which you 
can then parse:

    ```wp-block-code
    echo hello | cll -mllama2 -s 'please respond only in valid json' | jq .
    {
      "message": "hello",
      "type": "text"
    }
    ```

In “stdin mode,” it will only output the response from the LLM, you can turn that
back on using `-v` (as in verbose) although that additional output will go to stderr.

[AI](https://alex.kirk.at/category/ai/)

[ChatGPT](https://alex.kirk.at/tag/chatgpt/), [CLI](https://alex.kirk.at/tag/cli/),
[LLMs](https://alex.kirk.at/tag/llms/)

Read this next

[Previous Post](https://alex.kirk.at/2023/12/01/1903596/)

## One response to “cll: Adding unix pipe support”

 1. [alex.kirk.at](https://alex.kirk.at/2024/08/26/cll-now-works-with-local-files-and-improves-output-formatting/)
 2. [August 26, 2024](https://alex.kirk.at/2023/12/14/cll-adding-unix-pipe-support/comment-page-1/#comment-86008)
 3. I’ve written about my cll tool before and it is still my go-to way of communicating
    with LLMs. See the Github repo. As a developer,…
 4. [Log in to Reply](https://alex.kirk.at/wp-login.php?redirect_to=https%3A%2F%2Falex.kirk.at%2F2023%2F12%2F14%2Fcll-adding-unix-pipe-support%2F)

### Leave a Reply 󠀁[Cancel reply](https://alex.kirk.at/2023/12/14/cll-adding-unix-pipe-support/comment-page-1/?output_format=md#respond)󠁿

Only people in [my network](https://alex.kirk.at/friends/) can comment.

This site uses Akismet to reduce spam. [Learn how your comment data is processed.](https://akismet.com/privacy/)