# hunch

An on-device shell-command generator for macOS Tahoe that turns a plain-English description into the actual command, using Apple's built-in 3-billion-parameter model with few-shot examples drawn from a bank of 21,000 tldr command entries.

hunch generates shell commands from natural-language descriptions entirely on-device, using Apple's FoundationModels framework and its 3-billion-parameter Neural Engine model, with no cloud calls, API keys, or extra dependencies beyond what ships with macOS Tahoe. Before generating a command, it searches a bank of over 21,000 community-maintained tldr examples and includes the eight most similar in the prompt, which the model then copies patterns from instead of guessing at flags.

On a 100-prompt benchmark this technique raises accuracy from 40% for the bare model to about 83%, and accuracy improves further as the example bank grows.

It installs with Homebrew or by building from source, and hooks into zsh so that typing a description and pressing Ctrl+G replaces it with the generated command in the terminal buffer.

Website: http://es617.dev/hunch/
