{"slug": "show-hn-say-my-name-talk-to-your-terminal-you-still-press-enter", "title": "Show HN: Say My Name – talk to your terminal, you still press Enter", "summary": "A developer released Say My Name (smn), a fully local voice-to-shell-command tool that runs on the 3B-parameter qwen2.5-coder-3b-instruct model with a 32K context window and injects the user's live shell context — aliases, functions, roughly 400 personal scripts, command history, working-directory contents and git state — into each request. The tool types the generated command at the prompt via zsh's print -z and never auto-runs it; in a demo, a misheard utterance produced mkdir -p ~/backups, which the user rejected with Ctrl-C before execution. The project ships a pytest suite (test_unit.py for deterministic repair and safety regexes, test_battery.py for live runs that auto-skip without a local endpoint) and exit codes 0 for ok, 2 for UNKNOWN, 3 for DANGEROUS and 4 for gate error.", "body_md": "Utterance in, one shell command out — **fully local**, riding a local LLM\ngate (`qwen2.5-coder-3b-instruct`, 32K ctx). The core idea: a small local\nmodel can't match a frontier model's bash knowledge in weights, but on\nthis narrow domain it doesn't have to — it gets the user's **actual shell\ncontext injected** (aliases, functions, ~400 personal scripts, real\ncommand history, cwd contents, git state) plus a hard output contract.\n\nDesigned to match the push-to-talk discipline of a separate ops repo: zero network, nothing resident — the model loads on first request and idle-unloads after 15 min (pre-warmed while a terminal holds focus via a focus-watcher helper).\n\n*Mid-demo the engine mishears a mumble — `# heard: Goof backup director.` — and types `mkdir -p ~/backups`. It was never run:\nreviewed, rejected with Ctrl-C, next utterance proceeds. The review\nstep is the safety model, and the GIF shows it working.*\n\nSay **\"pull up kay nines\"** — two spoken words. The digit never exists\nin speech, and neither does a dash: \"K-NINES\" is only how this page\nwrites the pronunciation. 0.57 s later, `k9s` is sitting at your\nprompt. From a live run:\n\n```\nheard: Pull up K9s.\nresult=command cmd=k9s\n```\n\nNothing in the stack maps \"kay nines\" to a command. Two hops do it: the\nacoustic model turns the *sounds* \"kay\" + \"nines\" into the token `K9s`\n— spoken word to letter and digit, no hyphen ever entering the\npipeline; the **tool card** — the compact snapshot of your shell the\nmodel sees on every call (the personal tools found in your `PATH`, a\nhistory tail, your aliases, the current directory, git state; built\nfresh per utterance, nothing stored, nothing leaves the machine) —\ncarries the real spelling `k9s` because that tool is really installed; the 3B\nreconciles the two and emits the tool exactly as it exists on your\nmachine. **Your PATH is the dictionary** — you never spell anything,\nand the system never guesses a spelling you don't have. When the\nacoustics are worse (\"chasm\" for the `kasm` tool), the deterministic\nrepair layer (`_skeleton` + difflib against card tool names) catches\nthe mishear — the clever hop is the model's, the safety net is plain\nPython you can read.\n\n| File | Purpose | \n|---|---|\n| `smn` | CLI: `smn \"list files here sorted by size\"` → command on stdout.`--card` dumps the context card. Exit codes: 0 ok · 2 UNKNOWN · 3 DANGEROUS · 4 gate error. | \n| `smn.zsh` | Interactive wrapper (\"say my name\"): `smn <utterance>` types the command at your prompt via`print -z` (you press Enter — nothing auto-runs); zle widget on`^X^C` transforms the typed request in-place. | \n| `tests/` | pytest suite. `test_unit.py` : deterministic machinery — repair branches, normalization, arg parser, safety regexes.`test_battery.py` : live battery, safe outputs really executed in a fixture dir, auto-skips without a local endpoint (marker`live` ).`run_battery.py` is a pytest alias. | \n| `demo/bin/` | generic demo tools (backup, notes). The battery scopes its tool index to these via `SMN_BIN_DIRS` — it never reads your real ~/.local/bin. | \n\n```\n./smn \"list the files in this directory sorted by size\"\nsource ~/say-my-name/smn.zsh\nsmn show the biggest file here        # appears at your prompt, Enter runs it\n# or: type \"list hidden files here\", press Ctrl-X Ctrl-C\n\n# tests (pytest is the only dev dependency)\npytest tests/                  # unit + live battery (live skips if no endpoint)\npytest -m \"not live\" tests/    # unit only\n\n# debug: what was heard, as a shell comment before the command\n./smn --debug \"which kasm\"     # or: SMN_DEBUG=1 ./smn \"which kasm\"\n```\n\nSpoken exactly as shown; the dash in \"K-NINES\" is page notation, you say \"kay nines\".\n\n| You say | Appears at your prompt | What happened | \n|---|---|---|\n| \"pull up kay nines\" | `k9s` | whisper writes `K9s` from the sounds alone; the PATH-built card supplies the real spelling | \n| \"show the code for the Jarvis script\" | `cat $(which jarvis)` | a request about a *file* answers`cat` /`less` — never runs it | \n| \"open the Jarvis bash script that is used to open hermes desktop\" | `less $(which jarvis)` | the relative clause (\"that is used to…\") is a description, not a second command | \n| \"witch chasm\" | `which kasm` | mishear repaired — sound-shape skeleton + fuzzy match against card tool names | \n| \"delete everything in this folder\" | *nothing typed* | destructive shape flagged and withheld — Enter is yours, always | \n\nThe jarvis pair above is the verb lesson in one glance: same tool, two verbs, two different commands — \"show the code\" reads, \"open hermes desktop\" would launch.\n\n**Tools in these receipts.** [k9s](https://k9scli.io)\n([GitHub](https://github.com/derailed/k9s)) — the Kubernetes TUI — and\n[Kasm Workspaces](https://kasmweb.com)\n([GitHub](https://github.com/kasmtech)) — container-per-browser sessions.\nBoth are exactly why this project exists: short, unguessable names you\nsay constantly and can't afford to mistype.\n\nEverything configurable, one place per layer. Precedence everywhere:\n**CLI flags > environment variables > config file > built-in defaults.**\n\n**The config file** — `~/.config/say-my-name/config` (XDG). Key = value,\n`#` comments:\n\n```\n# gate = http://127.0.0.1:8383\n# model = qwen2.5-coder-3b-instruct-q4_k_m.gguf\n# bin_dirs = ~/.local/bin:~/bin:/usr/local/bin\n# temp = 0.1\n# debug = off\n```\n\nAll commented = all defaults; uncomment a line to override it. The one\nworth setting is `bin_dirs`: the default covers the usual personal\ndirs, but **you should really load your whole PATH** —\n\n```\nbin_dirs = $PATH\n```\n\n— and the tool index becomes every directory on your PATH except the\ndistro's system bins (`/usr/bin`, `/usr/sbin`, `/bin`, `/sbin`). That\nexclusion is deliberate: a literal full-PATH index is ~6000 entries of\ntools the model already knows from its weights — it would drown a small\nmodel's context and slow every dictation. Your PATH's personal half\n(~100–300 tools on a typical box) is the part it cannot guess, and\n`/usr/local/bin` — where hand-installed tools live — is included.\nThe exclusion list is platform-aware: on macOS, the Homebrew prefixes\n(`/opt/homebrew/bin`, and `/usr/local/bin` on Intel macs) are excluded\ntoo — brew is the mac's package manager, and its thousands of tools\nare as well known to the weights as any Linux distro's.\n\n**The debug toggle** — `mkdir -p ~/.config/say-my-name && touch ~/.config/say-my-name/debug` turns on the `# heard: <transcript>`\ncomment for every dictated command; `rm` the file turns it off. No\nrestart, no keybind edit. The legacy path `~/.config/vibe-term/debug`\nstill works; the new one wins.\n\n**Environment variables** (same tier, per-invocation): `SMN_GATE`,\n`SMN_MODEL`, `SMN_BIN_DIRS` (colon-separated; the special value\n`$PATH` loads every PATH dir except system bins), `SMN_TEMP`,\n`SMN_DEBUG`, `SMN_ALIASES` (live alias dump from your shell),\n`SMN_CONFIG` (alternate config file — what the test suite uses\nfor hermetic runs), and `HISTFILE` / `SMN_ZSHRC` to point the\nhistory and alias sources at bash or another shell.\n\n**Where the push-to-talk keys are wired** (the vibe-* layer, house ops\nside, never published): i3 binds in `~/.config/i3/config`\n(`VIBE_WINDOW_AWARE`, `VIBE_PTT_KEY` per key) and the Windows-key\nwatcher unit `~/.config/systemd/user/vibe-super-ptt.service`.\n\n**Names, one paragraph.** *say-my-name* is the package: repo name and\nconfig directory. *smn* is the command and the engine — one\nstdlib-only Python file in the repo root, callable as\n`smn \"...\"` from any shell or script; once you source `smn.zsh`,\n`smn` becomes the interactive zsh function that types the command\nat your prompt and binds ^X^C. *vibe-*-ptt* is the house\npush-to-talk wiring (key capture, recording, typing) — ops-side\nonly, never published. One name for everything you type.\n\n**The engine runs anywhere Python 3 does — and pulls in nothing.**\n`smn` is a one-line launcher over a single stdlib-only engine: no pip,\nno venv, no dependency resolution. The Python installation pain people\nremember is packaging pain, and none of it applies — `smn \"...\"` just\nworks on any mainstream distro. The context card is built at call time\nfrom YOUR machine (PATH tools, shell history, aliases, cwd, git\nstate), so nothing about the author's setup is baked in: different\nterminal layout, different history — different card, same engine.\n\n**The machine-specific part is the wiring, and it isn't shipped.**\nThe receipts in this README were captured through X11 + i3 + zsh:\nwhisper for STT, xdotool to type. On Wayland, swap the typing layer\nfor `wtype` or `ydotool`; on macOS, `cliclick` or osascript replace\nxdotool; on another shell, skip `smn.zsh` and call\n`smn` directly. The contract is one text string in, one command\nout — any STT front-end and any hotkey daemon can drive it.\n\n**Out of the box you get** the engine, the zsh wrapper, and about a\nminute of config. The mic-to-typing loop is reference wiring, not a\nturnkey app — bring your own front-end.\n\nThe engine is text-in, command-out — the mic, the key, and the typing layer are yours to wire. The loop a front-end runs:\n\n1. **A key** — bind one in your window manager; hold-to-talk or\npress-once/press-again both work.\n2. **Record** while it's active —`arecord -q -f cd /tmp/utt.wav` (Linux ALSA; macOS:`sox -d /tmp/utt.wav` or`ffmpeg -f avfoundation -i :0 /tmp/utt.wav` ).\n3. **Transcribe** — any STT. A local one keeps the whole pipeline on\nyour machine:`whisper-cli -m <model> -f /tmp/utt.wav -nt` (whisper.cpp).\n4. **Call smn** —`cmd=$(smn \"$text\")` — and type the result at the\nfocused terminal:`xdotool type --delay 12 \"$cmd\"` (X11; macOS:`cliclick t:<cmd>` or an osascript keystroke).\n5. **Stop there.** Never send Return — the human reviews the command\nand presses Enter themselves. That is the product.\n\n`examples/ptt-toggle.sh` is a ~40-line reference implementing exactly\nthis loop, toggle-style: bind it to a hotkey, press once to record,\npress again to get the command typed. Every stage is overridable via\nenvironment (recorder, STT, engine path) and `DRY_RUN=1` prints the\nloop instead of typing it. It is a starting point, not the polished\npath — commercial dictation tools have solved mic picking and key\ncapture better than a shell script ever will; swap those parts freely,\nkeep step 4's contract and step 5's rule.\n\nThe claim that the model \"knows `/usr/bin` from its weights\" is\nmeasurable, so we measured it. Same utterances, two runs: once with the\nreal card (a 398-tool `$PATH` index), once with the tool index\n**emptied** — `SMN_BIN_DIRS` pointed at an empty directory. The card\nstill carried environment, aliases, and history; only the tool index\nwas deleted.\n\nSystem tools didn't notice:\n\n| Utterance | With the index | Index emptied | \n|---|---|---|\n| \"how much disk space is free\" | `df -h` | `df -h` | \n| \"what is listening on port 443\" | `ss -tnlp \\| grep 443` | `lsof -nP -iTCP:443 -sTCP:LISTEN` | \n| \"show the last 30 lines of the journal for the docker service\" | `journalctl --user -u docker -n 30` | same | \n| \"git log the last five commits oneline\" | `git log -n 5 --oneline` | same | \n| \"show my ip address\" | `ip a` | same | \n| \"show me the free memory\" | `free -h` | same | \n| \"what process is using the most memory\" | `ps aux --sort=-%mem` | `ps -eo … --sort=-%mem` | \n| \"find all the pdf files in this directory\" | `find . -name \"*.pdf\"` | same | \n\n**8/8 both columns.** Deleting the entire tool index does not dent\nsystem-tool accuracy — that knowledge is in the weights. Which is the\nout-of-the-box experience, measured: zero configuration, zero index,\nand the commands a terminal user actually says all resolve.\n\nThe house tools, same experiment:\n\n| Utterance | Index emptied | \n|---|---|\n| \"pull up k9s\" | `k9s` — public tool, the weights know it | \n| \"show me the code for the jarvis script\" | `cat $(which jarvis)` — the name is in the utterance | \n| \"check the status of the llm gate\" | `llm-gate status` — spoken name + history patterns | \n| \"we want to invoke the brave proxy browser\" | **`start-local-proxy`** — the original failure, reproduced on demand | \n\nThe boundary, in three rules:\n\n- **Public tools** (`df` ,`git` ,`k9s` ): the weights carry them; the\nindex is irrelevant.\n- **Your tools, when you name them** (\"the jarvis script\"): the spoken\nname carries them; the index guarantees the spelling and the\nsubcommands.\n- **Your tools, when you describe intent instead of a name** (\"the\nBrave Proxy browser\"):**only the index carries them.** With no\nindex, the model reaches for the nearest visible shape — and picked\nthe wrong one (`start-local-proxy` , an SSH tunnel) from the incident\nthat motivated the PATH index in the first place.\n\nDelete the index and the failure comes back. That's the whole argument\nfor `bin_dirs = $PATH` in one experiment.\n\n- The model is never trusted: destructive patterns (`rm -r` ,`dd` ,`mkfs` ,\npipe-to-shell) trip exit code 3 and are**blocked from being typed** .\n- The danger class is deliberately narrow — the unrecoverable\n(filesystems, databases, boot, firewall rules). Routine process\ncontrol (`kill` ,`killall` ,`pkill` ) is NOT gated: it types at your\nprompt and Enter is yours. This is not a babysitter — anyone who\nwires their own microphone to their own shell has accepted the\nconsequences of their commands, and the review gate is the contract.\n- Default UX is review-then-Enter (`print -z` ), matching the staged→ratify\ndoctrine — the model assembles, the human executes.\n- The context card (aliases/history/cwd) is real user data — it goes only\nto `127.0.0.1:8383` and stays on the box. Never send it to a remote API.\n- Test harness executes only allowlisted read-only commands (ls/find/df/ss\n… + grep/head/sort pipes) — see `tests/run_battery.py` .\n\nThe unit suite runs with **no model at all**:\n\n```\npytest tests/                     # 208 tests; live battery auto-skips\n```\n\nFor the full path you need any OpenAI-compatible local server —\npoint `smn.toml` at it and you're running:\n\n- `ollama serve` →`http://127.0.0.1:11434/v1` (any small instruct\nmodel; a ~3B coder model is what this was built around)\n- `llama-server` (llama.cpp) →`http://127.0.0.1:8080/v1`\n- vLLM / LM Studio → their own `:8000` /`:1234` ports\n\nThen `smn \"list the files here sorted by size\"` from any repo\ndirectory, and `python3 tests/run_corpus.py` to run the 539-utterance\nsweep against your box.\n\nThe engine is stdlib-only and talks to exactly one network peer: the\nOpenAI-compatible endpoint in your `smn.toml`. Point it at localhost,\nrun the STT and the model on the same box, and the network cable can\nstay unplugged — no telemetry, no vendor, nothing to meter. That makes\nit a fit for the rooms where a cloud assistant isn't a worse option\nbut a disqualified one: air-gapped analysis boxes, classified\nsegments, adversarial labs where the mic policy writes the\nrequirements. Add the review-then-Enter default and voice doesn't get\nto skip audit in a room where a command can reimage a target.\n\n**Tested live: pytest suite 150/150 (unit + live battery), runtime-verified** (safe\nanswers executed for real; destructive flagged rc=3; out-of-scope\nUNKNOWN rc=2). The seeded 539-utterance fuzz corpus runs through the\nreal engine path against an invariant oracle — sweep lineage across\nrepair rounds: 89 → 61 → 34 → 8 → **0 violations**, zero gate errors.\nRun it yourself: `python3 tests/run_corpus.py` (uses your `smn.toml`\nendpoint). The corpus is receipt-driven from the development\nmachine — on yours it measures YOUR box, and entries for tools you\ndon't have installed will miss; the oracle and the repair layer are\nthe deliverable, not your local zero.\nWarm latency ~0.1–0.6s per request via the gate; cold\nload ~3s. Getting there took prompt iterations that are themselves the\nkey research findings:\n\n1. Bare script NAMES in the card were not enough — the model picked the\nwrong tool (`a100-session` for an llm-gate question). Fix: per-tool\ndescriptions**and usage blocks** (subcommands) auto-extracted from\nscript headers →`llm-gate status` chosen correctly.\n2. Small-model attention is a seesaw: teaching `journalctl --user` made\nit answer*port* questions with journalctl. Fix: explicit contrast\nrules (\"port N is NOT a log question\").\n3. It loopholes: asked for a poem, it emitted `echo \"Capybaras are…\"` .\nFix: rule against echo/printf prose → correct UNKNOWN.\n4. Host facts matter: `lsof` without`-nP` prints the port as its\n/etc/services name — the taught pattern itself was subtly\nwrong until`-nP` .\n5. History is context, and it drifts: after a session of hand-running\n`kasm version` , the card's history section biased the model to\nanswer \"which kasm\" with bare`kasm` . Fix: a contrast rule\n(\"'which X' wants the location, even when the history shows X being\nrun\") plus a battery case for the utterance class. The same drift\nclass flipped the delete-all answer between`rm -rf *` and`rm -i *` — the safety net now flags any`rm` with a glob and`find -delete` .\n\nThe typed CLI above is the debug path. The real interface is a\npush-to-talk key: hold, speak, release — the assembled command appears\nat your prompt. Nobody types \"smn\" or the tool's name; the key itself\nis the entry point. The command is typed for review; **Enter stays\nhuman**; UNKNOWN → the transcript types verbatim (nothing is lost);\nDANGEROUS is never typed, only notified + logged.\n\nGetting from \"works in the CLI\" to \"works from the microphone\" took five fixes, each measured on a live failure (genericized; house specifics live in the ops repo's dictation README):\n\n1. **STT bias** : the STT engine had never seen the custom tool's name\nand heard it as a common English word. Fix: add your own tool names\nto the STT engine's initial prompt. Rare-name mishears are the #1\nvoice failure and this is the cheapest fix in the stack.\n2. **Homophone repair belongs in the harness, not the prompt** : a\nprompt rule (\"resolve near-homophones against the context\")\nmeasurably did NOT fix the mishear — the model still refused.\nWorking fix in smn: when the first pass returns UNKNOWN, ONE\ndeterministic retry — per-word difflib ≥ 0.8 against the card's\ntool names, OR consonant-skeleton equality (drop vowels, fold\nch/k/q/x→k: \"beacon\" and a tool named`bcn` both reduce to`bcn` ),\nOR a merged-word split (\"whichbeacon\" → \"which\" + \"beacon\", halves\nrepaired independently). Only-after-refusal firing means passing\nrequests are never touched (battery 16/16 through every change).\n3. **Normalize transcripts before the first pass** : real STT output is\nsentence-cased with trailing punctuation (\"Which beacon.\"), which\nskews a 3B; decapitalize + strip`.!?` first.\n4. **Flag values must not leak into the utterance** :`--cwd DIR \"request\"` was building the utterance \"DIR request\" — the voice\nsink always passes`--cwd` , so every call was silently\npath-prefixed. Value-consuming flags must skip their argument in\nthe positional collector.\n5. **The trigger key must match what the keyboard actually sends** :\nthe first binding used a keysym the physical board never emits —\nthe key never fired, and the failure looked like the lane's. Verify\nwith`xmodmap -pk` , then prove the binding with a synthetic`xdotool keydown/keyup` and read the log.\n\nRouting recipe (one key, no modes to remember): make the habitual PTT key window-aware — focused window is a terminal → command lane; any other window → transcript verbatim, so prose dictation into chat boxes is never lane'd. Keep one pure-verbatim key as the escape hatch for prose-into-terminal (commit messages).\n\nGitHub publication: live (private) under the Capybara Consulting org\nas **say-my-name**; the sanitization pass (strip hostnames, usernames,\nhouse paths/vocabulary; homophone example genericized to `grep` in the\npublic prompt) runs at cut time — this dev README still names house\nspecifics on purpose.\n\nRoadmap after validation: System 1 Jev-style router tier (grammar-locked\nsmall model deciding intent/safety/route-up), probe-head router per\nthe AnyJev recipe. ~~Voice trigger~~ **done** — see the voice-path\nsection above.", "url": "https://wpnews.pro/news/show-hn-say-my-name-talk-to-your-terminal-you-still-press-enter", "canonical_source": "https://github.com/Capybara-Consulting/say-my-name", "published_at": "2026-12-03 21:08:35+00:00", "updated_at": "2026-12-03 21:16:36.973570+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "large-language-models", "ai-agents"], "entities": ["Say My Name", "smn", "qwen2.5-coder-3b-instruct", "k9s", "kasm", "zsh", "pytest", "whisper"], "also_reported_by": [], "takeaway": "Injecting a per-utterance shell context card (PATH tools, aliases, history tail, cwd, git state) into a 3B local model lets it emit exact installed tool names like k9s, with a deterministic difflib skeleton-repair layer catching mishears such as \"chasm\" for kasm.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/show-hn-say-my-name-talk-to-your-terminal-you-still-press-enter", "markdown": "https://wpnews.pro/news/show-hn-say-my-name-talk-to-your-terminal-you-still-press-enter.md", "text": "https://wpnews.pro/news/show-hn-say-my-name-talk-to-your-terminal-you-still-press-enter.txt", "jsonld": "https://wpnews.pro/news/show-hn-say-my-name-talk-to-your-terminal-you-still-press-enter.jsonld"}}