(评论)
(comments)

原始链接: https://news.ycombinator.com/item?id=41138085

隆重推出“ell”,这是一款轻量级命令行界面 (CLI) 工具,旨在促进通过终端与大型语言模型 (LLM) 的交互。 与 Unix 哲学一致,“ell”简单、可扩展,并且通过管道输入和输出与各种系统实用程序兼容。 模板和插件挂钩的使用使用户能够根据自己的具体要求定制“ell”。 使用“ell”的快速指南可以在随附的文档中找到。 “ell”的创建源于作者对带有过多包袱的繁琐替代方案的观察,例如大量的依赖项或与管道和定制的有限兼容性。 通过主要使用 Bash 编写,“ell”最大限度地减少了依赖性要求,同时提供了高效的用户体验。 此外,它还允许用户在查询法学硕士时利用以前的终端输出作为上下文,从而解决了一个常见的痛点。 例如,在终端内遇到问题现在可以通过简单的命令向法学硕士寻求帮助。 'ell' 的一些限制: - 使用jq进行JSON解析以确保简化的性能。 - 尽管“/dev/tcp/”中缺乏本机 SSL/TLS 支持,但仍使用 cURL 来发出安全的 HTTPS 请求 - 由于 Bash 中正则表达式的限制,使用 Perl 处理终端转义序列。 - 由于需要流式输出并使用基本状态机而不是综合解析器,因此出现了不完美的 Markdown 语法突出显示。 这可能会导致错误的结果。 - 其他挑战已记录在项目的 GitHub 存储库中。 欢迎旨在确定和解决这些问题的贡献。 鼓励有关概念方面和编码技术的建设性反馈和建议!

相关文章

原文
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!

联系我们 contact @ memedata.com