Back to browse
ShellTalk brings deterministic text-to-bash

ShellTalk brings deterministic text-to-bash

by podlp·Apr 22, 2026·9 points·0 comments

AI Analysis

●●SolidBig BrainCozy

No LLMs — template matching beats stochastic bash generation for reproducibility.

Strengths
  • Semantic Template Matching with BM25 and TF-IDF gives deterministic, reproducible output.
  • Automatically adapts between macOS BSD and GNU Linux coreutils flags and syntax.
  • Safety scoring flags destructive commands before execution — prevents rm -rf disasters.
Weaknesses
  • Text-to-bash is a narrow use case with limited real-world complexity to handle.
  • 167 templates won't cover edge cases that LLMs handle through generalization.
Target Audience

Developers who want reliable shell command generation without LLM variance

Similar To

Hunch · ShellGenie · Claude Code

Post Description

Hi HN! I built a CLI tool called ShellTalk for macOS, Linux, and web (WebAssembly) that maps English text to the corresponding Bash commands.

ShellTalk is written in Swift and available under the Apache 2.0 license on GitHub. I was inspired a few weeks ago after reading the Meta-Harness paper and seeing a tool called Hunch that did something similar using the Apple Foundation model. I often forget flag names and orders, but I wanted something that worked consistently. The 3B AFM worked surprisingly well with Hunch, but it felt slow and sometimes slight changes in what I wrote would result in very different outputs.

ShellTalk attempts to match the input with an intent category (Git, File I/O, etc), then a template, and finally to slot-fill and adapt to the specific command version and BSD vs GNU syntax. It has a few other tricks including using NSSpellChecker on macOS to auto-correct certain typos, and scores the output on safety (i.e. is the action destructive or non-reversible).

It's clearly far from perfect, but has very tight testing and validation cycles compared to using an LLM, is very portable, and might eventually work in other languages or environments like Windows. I'm curious to hear what others think.

Similar Projects