Live data from Hacker News

Show HN: Ell – A command-line interface for LLMs written in Bash

github.com

1–10 of 88 posts

Show HN: Ell – A command-line interface for LLMs written in Bash

#1
Hi HN!

I've created a CLI tool called "ell" that allows you to interact with LLMs directly from your terminal. Designed with the Unix philosophy in mind, ell is simple, modular, and extensible. You can easily pipe input and output to integrate with other tools. Its templates and hook-based plugins enable you to customize and extend its functionality to suit any needs. Check out the README for usage instructions and examples.

I developed this tool because existing solutions often felt too heavy, with many dependencies, or they weren't friendly to piping and customization. I, on the contrary, wrote in almost pure Bash with least dependencies. Additionally, I found a lack of tools that could read past terminal output as context. Imagine encountering an issue in your terminal and being able to directly ask an LLM for help with a simple command—this is now possible with ell (see the demo video).

Known limitations:

- To maintain simplicity and efficiency, jq is used for JSON parsing.

- Cannot avoid curl to sending HTTPS requests. If only there were SSL / TLS support in `/dev/tcp/`!

- Perl is used to handle terminal escape sequences because regex in Bash does not support looking around.

- Markdown syntax highlighting is not perfect due to the need for streaming output. It relies on a simple state machine instead of a full parser, which may produce falsy results.

- Other known issues are listed in Github Issues. Please help add more!

I welcome any criticism and suggestions, whether it's about the idea or code!

Show HN: Ell – A command-line interface for LLMs written in Bash
github.com

Re: Show HN: Ell – A command-line interface for LLMs written in Bash

#3
Cool. The link to "Risks" in the README is broken.

What I would love: `ell -r` automatically, and an alias `fix` that proposes a fix, including making changes to a file. For example, say I have a typo in main.cc and do `gcc main.cc`. When I run `fix`, I want ell to propose a fix in the file with a diff. If I accept, it should make that change. Then it should propose running `gcc` again - and run it for me if I accept.

Re: Show HN: Ell – A command-line interface for LLMs written in Bash

#4

Cool. The link to "Risks" in the README is broken. What I would love: `ell -r` automatically, and an alias `fix` that proposes a fix, including making changes to a file. For example, say I have a typo in main.cc and do `gcc main.cc`. When I run `fix`, I want ell to propose a fix in the file with a diff. If I accept, it should make that change. Then it should propose running `gcc` again - and run it for me if I accept…

Regarding running ell -r automatically, you can just add it to your .bashrc

Re: Show HN: Ell – A command-line interface for LLMs written in Bash

#5
post #4

Cool. The link to "Risks" in the README is broken. What I would love: `ell -r` automatically, and an alias `fix` that proposes a fix, including making changes to a file. For example, say I have a typo in main.cc and do `gcc main.cc`. When I run `fix`, I want ell to propose a fix in the file with a diff. If I accept, it should make that change. Then it should propose running `gcc` again - and run it for me if I accept…

Regarding running ell -r automatically, you can just add it to your .bashrc

Yup. But the rest of the functionality is missing, I think.

Re: Show HN: Ell – A command-line interface for LLMs written in Bash

#6

Cool. The link to "Risks" in the README is broken. What I would love: `ell -r` automatically, and an alias `fix` that proposes a fix, including making changes to a file. For example, say I have a typo in main.cc and do `gcc main.cc`. When I run `fix`, I want ell to propose a fix in the file with a diff. If I accept, it should make that change. Then it should propose running `gcc` again - and run it for me if I accept…

> The link to "Risks" in the README is broken.

Fixed. Thanks for pointing out!

> `ell -r` automatically, and an alias `fix` that proposes a fix, including making changes to a file.

Good idea! `ell -r` can be added to `.bashrc`, but I'm not sure if it will conflict users' original configurations or there will be other issues. Except confirming a patch, I think it is feasible with template and plugins, but making actuall changes is challenging for me, both techinology wise and user interface design wise. I will try to figure out what can be possible

Re: Show HN: Ell – A command-line interface for LLMs written in Bash

#9
post #8

Hi, they're also trying to do something similar with shell. I'm not sure who's better. [demo]( https://x-cmd.com/mod/gemini ) [source code]( https://github.com/x-cmd/x-cmd/blob/main/mod/gemini/lib/main )

Cool! This is looks a lot fancier.

EDIT: I was wrong. Ignore the next paragraph.

~~I haven't looked into details but it looks reading from somewhere like `.bash_history`. That's a good idea to get user input from. But as far as I learned, it cannot use the terminal ouput as context. I might be wrong. I should read more about its implementation.~~

It turns out it cannot make use of terminal output. But I like it that it use awk to process the response. I might also be able to use awk to get rid of the dependencies of jq and perl. Thank you for letting me know this.

I will add it in the related projects chapter in README

Re: Show HN: Ell – A command-line interface for LLMs written in Bash

#10
I don't know why i keep getting the error:

"FATAL Template not found: ~/.ellrc.d/templates/default-openai.json"

after having cloned the repo in my home directory and created the configuration file in .ellrc in my home directory. Don't know, probably i'm doing something wrong... I'm new to bash projects, why does it search for the templates in .ellrc.d? what's the .d part? I don't understand.

Post reply on HN