Ba

Bash is All You Need for a language model REPL

Hacker News

Bash is All You Need for a language model REPL

I’ve recently just started tinkering with using local large language models, focusing on simple, low-dependency CLI setups. I ended up going down a bit of a rabbit hole: I wanted to see if I could build a functional model interaction REPL using exclusively standard command-line building blocks. I tried to abide by the Unix philosophy, breaking the REPL into the composition of a few small, single-purpose program. Because the data flow is just text streams fed through pipes, at any step you can inject tools to inspect or modify the data—like using `grep` to filter out strings before they hit the model, or `pv` to benchmark model throughput. Everything is ultimately tied together into an `agent` Bash script that codifies the interaction into a REPL. To my surprise, this setup seemed to be sufficient to get a working “agent” that largely resembles ones built by more complex frameworks. One motivation I have for sharing this here is to embed some semi-rhetorical questions: is that really all there is to a “modern agent”? Are the frameworks and libraries being tossed around overly complex and we really just need to keep it simpler? A few more details of potential interest: - Zero heavy dependencies: No `pip`, `npm`, package managers, virtual environments, etc. It just requires `bash`, `jq`, and `curl` to talk to the local model server. These should be available in most modern CLI environments. - Transparent, file-based state: The agent's memory is just an append-only `.jsonl` file (like `.bash_history`). If you want to rewind the agent's memory, you just run head on the log to drop the last few lines. - Standard exit codes for control flow: Tool execution is handled by checking standard Unix exit codes within a basic bash while loop. I suspect there are scaling limits to doing this all in shell, and I'm still figuring out the most elegant way to handle some of the edge cases, particularly around tool calling - but those appear to mostly be limitations of the underlying models. Nevertheless it's been a really fun experiment in stripping out bloat, and as I mentioned above, somewhat surprising at least from a neophyte perspective. Would love to hear thoughts and comments, particularly around the limitations to this orchestration and what features are otherwise missing due to bypassing the popular frameworks and libraries.

Share card

Actual performance

1points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: agent, model, models · Missing: mac, agents, macos
92%92% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Indie HackersFits the IH revenue-focused audience · Strong signals: started · Missing: supports, reddit linkedin, podcasting
91%91% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: ide, pipe, io · Missing: https docs, excited, just released
63%63% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Strong signals: way · Missing: mobile apps, ios, personal
40%40% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Strong signals: exclusive · Missing: plus, platform, intuitive
40%40% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
18%18% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

Br
BrainTripping - language model comedy64%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

BrainTripping - language model comedy

Hacker News283
I
I visualized an autoregressive language model in the browser70%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

I visualized an autoregressive language model in the browser

Hacker News3
Do
Do I Need a CDN?64%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Do I Need a CDN?

Hacker News2
A
A Transformer Is All You Need40%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A Transformer Is All You Need

Hacker News3
We
We Need The NBN32%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

We Need The NBN

Hacker News2
Cosmetic Dentist Baldivis
Cosmetic Dentist Baldivis18%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Are you in need of a Cosmetic Dentist Baldivis that can be t

Indie Hackers
aineed.in
aineed.in45%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Find the AI you need.

Indie Hackerscommitment-side-project
Nu
Numscript, a declarative language to model financial transactions65%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Numscript, a declarative language to model financial transactions

Hacker News202
Ec
Ecco – See what your NLP language model is “thinking”74%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Ecco – See what your NLP language model is “thinking”

Hacker News185
La
Language proposal - dave60%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Language proposal - dave

Hacker News24