NewsLab
Jun 28 21:11 UTC

Show HN: Bash4LLM+ – A lightweight, dependency-free Bash wrapper for LLM APIs (github.com)

9 points|by kamaludu||5 comments|Read full story on github.com
Bash4LLM is a single-file Bash wrapper for interacting with LLMs from the terminal. I created it because I wanted something simple that worked without installing Python, Node, or any other runtime.

It uses only Bash, curl, and jq. You can send prompts, start a small chat, process files line by line, stream output, and save session metadata in JSON format.

I tried to make it safe and predictable: no use of the system /tmp, no use of eval. Groq is supported by default, and other providers can be added with dedicated Bash scripts in the extras/providers/ folder.

Example:

  echo "explains the command: ls -l" | ./bash4llm

Comments (5)

5 shown
  1. 1. ifh-hn||context
    Why is this flagged?
  2. 2. dang||context
    The text got classified as genai, which is not allowed on HN itself - see https://news.ycombinator.com/newsguidelines.html#generated and https://news.ycombinator.com/item?id=47340079.

    We invited the user to rewrite it and I've moved that text to the top now, and re-upped the post so it gets its full time on /newest.

  3. 3. Chu4eeno||context
    You really should either just write it manually, or at least clean it up, 5kLOC of bash for POSTing and reading/writing files is a bit overkill (the code is extremely repetitive, verbose and just hard to follow).
  4. 4. kamaludu||context
    Yes, the code is big and bulky, i know. But i am a single person, not a team. I write simple and clear for me, because i need to mantain it. Only Bash, zero dependencies, i like this.

    thank you for your comment!

  5. 5. kamaludu||context
    well, i write Bash4LLM to be:

    . Portable - You need only: bash, coreutils, findutils, util-linux, gawk, curl, jq. No Python (slow), no Node (heavy), no Golang (need too many binaries, one for each OS, hard to maintain for one single person like me).

    . Single file - only one. I write many extras, but all are optional.

    . Idempotent - you copy it where you want and go!

    . Transparent - open the file and read.

    . Extras for all, and all optional: help file, extra providers, improved session engine, small GUI/CGI, etc...

    Default (embedded) provider is Groq, because when I start the project, was the best free API service for AI.

    I'm ready to answer to your question... with my terrible english...

    Cristian (kamaludu)