TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Llm2sh – Translate plain-language requests into shell commands

67 pointsby RandomBK10 months ago
This is my take on the common &quot;use llms to generate shell commands&quot; utility. Emphasis is placed on good CLI UX, simplicity, and flexibility.<p>`llm2sh` supports multiple LLM providers and lets LLMs generate multi-command sequences to handle complex tasks. There is also limited support for commands requiring `sudo` and other basic input.<p>I recommend using Groq llama3-70b for day-to-day use. The ultra-low latency is a game-changer - its near-instant responses helps `llm2sh` integrate seamlessly into day-to-day tasks without breaking you out of the &#x27;zone&#x27;. For more advanced tasks, swapping to smarter models is just a CLI option away.

10 comments

padolsey10 months ago
Cool! I’m experimenting with something like this that uses docker containers to ensure it’s sandboxed. And, crucially, rewindable. And then I can just let it do ~whatever it wants without having to verify commands myself. Obviously it’s still risky to let it touch network resources but there’s workarounds for that.
评论 #40995578 未加载
yjftsjthsd-h10 months ago
Some really nice things:<p>+ GPLv3<p>+ Defaults to listing commands and asking for confirmation<p>+ Install is just &quot;pip install&quot;<p>+ Good docs with examples<p>Is there a way to point at an arbitrary API endpoint? IIRC llama.cpp can do an OpenAPI compatible API so it should be drop in?
评论 #40992339 未加载
conkeisterdoor10 months ago
This looks great! I would use this if you had a dispatcher for using a custom&#x2F;local OpenAI-compatible API like eg llama.cpp server. If I can make some time I&#x27;ll take a stab at writing one and submit a PR :)
评论 #40992345 未加载
causal10 months ago
This looks good.<p>I created something similar using blade a while back, but I found that using English to express what I want was actually really inefficient. It turns out that for most commands, the command syntax is already a pretty expressive format.<p>So nowadays I&#x27;m back to using a chat UI (Claude) for the scenarios where I need help figuring out the right command. Being able to iterate is essential in those scenarios.
MuffinFlavored10 months ago
How much time does this gain you from the perspective of &quot;you have to double check its output and hope it didn&#x27;t make a mistake&quot;?
评论 #40995792 未加载
llagerlof10 months ago
Nice tool. I am using ai-shell for that purpose.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;BuilderIO&#x2F;ai-shell">https:&#x2F;&#x2F;github.com&#x2F;BuilderIO&#x2F;ai-shell</a>
Y_Y10 months ago
There are plenty of variations on this tool around, it would be nice to see a comparison.
评论 #40995805 未加载
amelius10 months ago
Does it understand commands such as &quot;get this Nvidia driver to work&quot;?
评论 #40995602 未加载
评论 #40995798 未加载
francisduvivier10 months ago
Wonder how this compares to open interpreter.
fire_lake10 months ago
Would consider rewriting in a language that is more portable? Ideally this would be a single binary, excluding the models!
评论 #40993266 未加载