Utterance in, one shell command out — fully local, riding a local LLM
gate (qwen2.5-coder-3b-instruct, 32K ctx). The core idea: a small local
model can't match a frontier model's bash knowledge in weights, but on
this narrow domain it doesn't have to — it gets the user's actual shell
context injected (aliases, functions, ~400 personal scripts, real
command history, cwd contents, git state) plus a hard output contract.
Designed 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).
Mid-demo the engine mishears a mumble — # heard: Goof backup director. — and types mkdir -p ~/backups. It was never run:
reviewed, rejected with Ctrl-C, next utterance proceeds. The review
step is the safety model, and the GIF shows it working.
Say "pull up kay nines" — two spoken words. The digit never exists
in speech, and neither does a dash: "K-NINES" is only how this page
writes the pronunciation. 0.57 s later, k9s is sitting at your
prompt. From a live run:
heard: Pull up K9s.
result=command cmd=k9s
Nothing in the stack maps "kay nines" to a command. Two hops do it: the
acoustic model turns the sounds "kay" + "nines" into the token K9s
— spoken word to letter and digit, no hyphen ever entering the
pipeline; the tool card — the compact snapshot of your shell the
model sees on every call (the personal tools found in your PATH, a
history tail, your aliases, the current directory, git state; built
fresh per utterance, nothing stored, nothing leaves the machine) —
carries the real spelling k9s because that tool is really installed; the 3B
reconciles the two and emits the tool exactly as it exists on your
machine. Your PATH is the dictionary — you never spell anything,
and the system never guesses a spelling you don't have. When the
acoustics are worse ("chasm" for the kasm tool), the deterministic
repair layer (_skeleton + difflib against card tool names) catches
the mishear — the clever hop is the model's, the safety net is plain
Python you can read.
| File | Purpose |
|---|---|
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. |
smn.zsh |
Interactive wrapper ("say my name"): smn <utterance> types the command at your prompt viaprint -z (you press Enter — nothing auto-runs); zle widget on^X^C transforms the typed request in-place. |
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 (markerlive ).run_battery.py is a pytest alias. |
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. |
./smn "list the files in this directory sorted by size"
source ~/say-my-name/smn.zsh
smn show the biggest file here # appears at your prompt, Enter runs it
pytest tests/ # unit + live battery (live skips if no endpoint)
pytest -m "not live" tests/ # unit only
./smn --debug "which kasm" # or: SMN_DEBUG=1 ./smn "which kasm"
Spoken exactly as shown; the dash in "K-NINES" is page notation, you say "kay nines".
| You say | Appears at your prompt | What happened |
|---|---|---|
| "pull up kay nines" | k9s |
whisper writes K9s from the sounds alone; the PATH-built card supplies the real spelling |
| "show the code for the Jarvis script" | cat $(which jarvis) |
a request about a file answerscat /less — never runs it |
| "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 |
| "witch chasm" | which kasm |
mishear repaired — sound-shape skeleton + fuzzy match against card tool names |
| "delete everything in this folder" | nothing typed | destructive shape flagged and withheld — Enter is yours, always |
The 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.
Tools in these receipts. k9s (GitHub) — the Kubernetes TUI — and Kasm Workspaces (GitHub) — container-per-browser sessions. Both are exactly why this project exists: short, unguessable names you say constantly and can't afford to mistype.
Everything configurable, one place per layer. Precedence everywhere: CLI flags > environment variables > config file > built-in defaults.
The config file — ~/.config/say-my-name/config (XDG). Key = value,
# comments:
All commented = all defaults; uncomment a line to override it. The one
worth setting is bin_dirs: the default covers the usual personal
dirs, but you should really load your whole PATH —
bin_dirs = $PATH
— and the tool index becomes every directory on your PATH except the
distro's system bins (/usr/bin, /usr/sbin, /bin, /sbin). That
exclusion is deliberate: a literal full-PATH index is ~6000 entries of
tools the model already knows from its weights — it would drown a small
model's context and slow every dictation. Your PATH's personal half
(~100–300 tools on a typical box) is the part it cannot guess, and
/usr/local/bin — where hand-installed tools live — is included.
The exclusion list is platform-aware: on macOS, the Homebrew prefixes
(/opt/homebrew/bin, and /usr/local/bin on Intel macs) are excluded
too — brew is the mac's package manager, and its thousands of tools
are as well known to the weights as any Linux distro's.
The debug toggle — mkdir -p ~/.config/say-my-name && touch ~/.config/say-my-name/debug turns on the # heard: <transcript>
comment for every dictated command; rm the file turns it off. No
restart, no keybind edit. The legacy path ~/.config/vibe-term/debug
still works; the new one wins.
Environment variables (same tier, per-invocation): SMN_GATE,
SMN_MODEL, SMN_BIN_DIRS (colon-separated; the special value
$PATH loads every PATH dir except system bins), SMN_TEMP,
SMN_DEBUG, SMN_ALIASES (live alias dump from your shell),
SMN_CONFIG (alternate config file — what the test suite uses
for hermetic runs), and HISTFILE / SMN_ZSHRC to point the
history and alias sources at bash or another shell.
Where the push-to-talk keys are wired (the vibe-* layer, house ops
side, never published): i3 binds in ~/.config/i3/config
(VIBE_WINDOW_AWARE, VIBE_PTT_KEY per key) and the Windows-key
watcher unit ~/.config/systemd/user/vibe-super-ptt.service.
Names, one paragraph. say-my-name is the package: repo name and
config directory. smn is the command and the engine — one
stdlib-only Python file in the repo root, callable as
smn "..." from any shell or script; once you source smn.zsh,
smn becomes the interactive zsh function that types the command
at your prompt and binds ^X^C. vibe--ptt* is the house
push-to-talk wiring (key capture, recording, typing) — ops-side
only, never published. One name for everything you type.
The engine runs anywhere Python 3 does — and pulls in nothing.
smn is a one-line launcher over a single stdlib-only engine: no pip,
no venv, no dependency resolution. The Python installation pain people
remember is packaging pain, and none of it applies — smn "..." just
works on any mainstream distro. The context card is built at call time
from YOUR machine (PATH tools, shell history, aliases, cwd, git
state), so nothing about the author's setup is baked in: different
terminal layout, different history — different card, same engine.
The machine-specific part is the wiring, and it isn't shipped.
The receipts in this README were captured through X11 + i3 + zsh:
whisper for STT, xdotool to type. On Wayland, swap the typing layer
for wtype or ydotool; on macOS, cliclick or osascript replace
xdotool; on another shell, skip smn.zsh and call
smn directly. The contract is one text string in, one command
out — any STT front-end and any hotkey daemon can drive it.
Out of the box you get the engine, the zsh wrapper, and about a minute of config. The mic-to-typing loop is reference wiring, not a turnkey app — bring your own front-end.
The engine is text-in, command-out — the mic, the key, and the typing layer are yours to wire. The loop a front-end runs:
- A key — bind one in your window manager; hold-to-talk or press-once/press-again both work.
- Record while it's active —
arecord -q -f cd /tmp/utt.wav(Linux ALSA; macOS:sox -d /tmp/utt.wavorffmpeg -f avfoundation -i :0 /tmp/utt.wav). - Transcribe — any STT. A local one keeps the whole pipeline on
your machine:
whisper-cli -m <model> -f /tmp/utt.wav -nt(whisper.cpp). - Call smn —
cmd=$(smn "$text")— and type the result at the focused terminal:xdotool type --delay 12 "$cmd"(X11; macOS:cliclick t:<cmd>or an osascript keystroke). - Stop there. Never send Return — the human reviews the command and presses Enter themselves. That is the product.
examples/ptt-toggle.sh is a ~40-line reference implementing exactly
this loop, toggle-style: bind it to a hotkey, press once to record,
press again to get the command typed. Every stage is overridable via
environment (recorder, STT, engine path) and DRY_RUN=1 prints the
loop instead of typing it. It is a starting point, not the polished
path — commercial dictation tools have solved mic picking and key
capture better than a shell script ever will; swap those parts freely,
keep step 4's contract and step 5's rule.
The claim that the model "knows /usr/bin from its weights" is
measurable, so we measured it. Same utterances, two runs: once with the
real card (a 398-tool $PATH index), once with the tool index
emptied — SMN_BIN_DIRS pointed at an empty directory. The card
still carried environment, aliases, and history; only the tool index
was deleted.
System tools didn't notice:
| Utterance | With the index | Index emptied |
|---|---|---|
| "how much disk space is free" | df -h |
df -h |
| "what is listening on port 443" | ss -tnlp | grep 443 |
lsof -nP -iTCP:443 -sTCP:LISTEN |
| "show the last 30 lines of the journal for the docker service" | journalctl --user -u docker -n 30 |
same |
| "git log the last five commits oneline" | git log -n 5 --oneline |
same |
| "show my ip address" | ip a |
same |
| "show me the free memory" | free -h |
same |
| "what process is using the most memory" | ps aux --sort=-%mem |
ps -eo … --sort=-%mem |
| "find all the pdf files in this directory" | find . -name "*.pdf" |
same |
8/8 both columns. Deleting the entire tool index does not dent system-tool accuracy — that knowledge is in the weights. Which is the out-of-the-box experience, measured: zero configuration, zero index, and the commands a terminal user actually says all resolve.
The house tools, same experiment:
| Utterance | Index emptied |
|---|---|
| "pull up k9s" | k9s — public tool, the weights know it |
| "show me the code for the jarvis script" | cat $(which jarvis) — the name is in the utterance |
| "check the status of the llm gate" | llm-gate status — spoken name + history patterns |
| "we want to invoke the brave proxy browser" | start-local-proxy — the original failure, reproduced on demand |
The boundary, in three rules:
- Public tools (
df,git,k9s): the weights carry them; the index is irrelevant. - Your tools, when you name them ("the jarvis script"): the spoken name carries them; the index guarantees the spelling and the subcommands.
- Your tools, when you describe intent instead of a name ("the
Brave Proxy browser"):only the index carries them. With no
index, the model reaches for the nearest visible shape — and picked
the wrong one (
start-local-proxy, an SSH tunnel) from the incident that motivated the PATH index in the first place.
Delete the index and the failure comes back. That's the whole argument
for bin_dirs = $PATH in one experiment.
- The model is never trusted: destructive patterns (
rm -r,dd,mkfs, pipe-to-shell) trip exit code 3 and areblocked from being typed . - The danger class is deliberately narrow — the unrecoverable
(filesystems, databases, boot, firewall rules). Routine process
control (
kill,killall,pkill) is NOT gated: it types at your prompt and Enter is yours. This is not a babysitter — anyone who wires their own microphone to their own shell has accepted the consequences of their commands, and the review gate is the contract. - Default UX is review-then-Enter (
print -z), matching the staged→ratify doctrine — the model assembles, the human executes. - The context card (aliases/history/cwd) is real user data — it goes only
to
127.0.0.1:8383and stays on the box. Never send it to a remote API. - Test harness executes only allowlisted read-only commands (ls/find/df/ss
… + grep/head/sort pipes) — see
tests/run_battery.py.
The unit suite runs with no model at all:
pytest tests/ # 208 tests; live battery auto-skips
For the full path you need any OpenAI-compatible local server —
point smn.toml at it and you're running:
ollama serve→http://127.0.0.1:11434/v1(any small instruct model; a ~3B coder model is what this was built around)llama-server(llama.cpp) →http://127.0.0.1:8080/v1- vLLM / LM Studio → their own
:8000/:1234ports
Then smn "list the files here sorted by size" from any repo
directory, and python3 tests/run_corpus.py to run the 539-utterance
sweep against your box.
The engine is stdlib-only and talks to exactly one network peer: the
OpenAI-compatible endpoint in your smn.toml. Point it at localhost,
run the STT and the model on the same box, and the network cable can
stay unplugged — no telemetry, no vendor, nothing to meter. That makes
it a fit for the rooms where a cloud assistant isn't a worse option
but a disqualified one: air-gapped analysis boxes, classified
segments, adversarial labs where the mic policy writes the
requirements. Add the review-then-Enter default and voice doesn't get
to skip audit in a room where a command can reimage a target.
Tested live: pytest suite 150/150 (unit + live battery), runtime-verified (safe
answers executed for real; destructive flagged rc=3; out-of-scope
UNKNOWN rc=2). The seeded 539-utterance fuzz corpus runs through the
real engine path against an invariant oracle — sweep lineage across
repair rounds: 89 → 61 → 34 → 8 → 0 violations, zero gate errors.
Run it yourself: python3 tests/run_corpus.py (uses your smn.toml
endpoint). The corpus is receipt-driven from the development
machine — on yours it measures YOUR box, and entries for tools you
don't have installed will miss; the oracle and the repair layer are
the deliverable, not your local zero.
Warm latency ~0.1–0.6s per request via the gate; cold
load ~3s. Getting there took prompt iterations that are themselves the
key research findings:
- Bare script NAMES in the card were not enough — the model picked the
wrong tool (
a100-sessionfor an llm-gate question). Fix: per-tool descriptionsand usage blocks (subcommands) auto-extracted from script headers →llm-gate statuschosen correctly. - Small-model attention is a seesaw: teaching
journalctl --usermade it answerport questions with journalctl. Fix: explicit contrast rules ("port N is NOT a log question"). - It loopholes: asked for a poem, it emitted
echo "Capybaras are…". Fix: rule against echo/printf prose → correct UNKNOWN. - Host facts matter:
lsofwithout-nPprints the port as its /etc/services name — the taught pattern itself was subtly wrong until-nP. - History is context, and it drifts: after a session of hand-running
kasm version, the card's history section biased the model to answer "which kasm" with barekasm. Fix: a contrast rule ("'which X' wants the location, even when the history shows X being run") plus a battery case for the utterance class. The same drift class flipped the delete-all answer betweenrm -rf *andrm -i *— the safety net now flags anyrmwith a glob andfind -delete.
The typed CLI above is the debug path. The real interface is a push-to-talk key: hold, speak, release — the assembled command appears at your prompt. Nobody types "smn" or the tool's name; the key itself is the entry point. The command is typed for review; Enter stays human; UNKNOWN → the transcript types verbatim (nothing is lost); DANGEROUS is never typed, only notified + logged.
Getting 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):
- STT bias : the STT engine had never seen the custom tool's name and heard it as a common English word. Fix: add your own tool names to the STT engine's initial prompt. Rare-name mishears are the #1 voice failure and this is the cheapest fix in the stack.
- Homophone repair belongs in the harness, not the prompt : a
prompt rule ("resolve near-homophones against the context")
measurably did NOT fix the mishear — the model still refused.
Working fix in smn: when the first pass returns UNKNOWN, ONE
deterministic retry — per-word difflib ≥ 0.8 against the card's
tool names, OR consonant-skeleton equality (drop vowels, fold
ch/k/q/x→k: "beacon" and a tool named
bcnboth reduce tobcn), OR a merged-word split ("whichbeacon" → "which" + "beacon", halves repaired independently). Only-after-refusal firing means passing requests are never touched (battery 16/16 through every change). - Normalize transcripts before the first pass : real STT output is
sentence-cased with trailing punctuation ("Which beacon."), which
skews a 3B; decapitalize + strip
.!?first. - Flag values must not leak into the utterance :
--cwd DIR "request"was building the utterance "DIR request" — the voice sink always passes--cwd, so every call was silently path-prefixed. Value-consuming flags must skip their argument in the positional collector. - The trigger key must match what the keyboard actually sends :
the first binding used a keysym the physical board never emits —
the key never fired, and the failure looked like the lane's. Verify
with
xmodmap -pk, then prove the binding with a syntheticxdotool keydown/keyupand read the log.
Routing 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).
GitHub publication: live (private) under the Capybara Consulting org
as say-my-name; the sanitization pass (strip hostnames, usernames,
house paths/vocabulary; homophone example genericized to grep in the
public prompt) runs at cut time — this dev README still names house
specifics on purpose.
Roadmap after validation: System 1 Jev-style router tier (grammar-locked
small model deciding intent/safety/route-up), probe-head router per
the AnyJev recipe. Voice trigger done — see the voice-path
section above.