Reference
History and Search
In this handbookContents
AITerm has four separate tools for finding things: the command palette, the history browser, terminal scrollback search, and command-mark navigation.
Command palette (⌘K)
⌘K opens the command palette ("Search commands and actions…"). It offers:
- Quick actions — jump to Manage models, Command history, Runbooks, Fix the last command, Clear AI context, and Using the Agent.
- Recent commands — your history, ranked by a tiered lexical match (exact > prefix > substring > subsequence) over both the command and the original plain-English request, with a boost for the current directory and for recency. A command that came from AI translation shows the original request beneath it.
Selecting a command loads it into the input bar — it doesn't run until you press Return.
Command history (⌘Y)
⌘Y opens the History browser ("Search history…"). It searches your executed commands and their original plain-English requests. Each row offers Send to input, Save as runbook, and Copy. Clear empties the history.
Terminal scrollback search (⌘F)
⌘F opens Find in terminal, searching the whole scrollback. A counter shows your position (for example 1/5); move between matches with ⌘G (next) and ⌘⇧G (previous), or press Return in the search field for the next match. Esc closes it.
Command marks (⌘⇧↑ / ⌘⇧↓)
⌘⇧↑ and ⌘⇧↓ jump between command starts in the scrollback, scrolling to each command's first line. This navigates command boundaries — it isn't a text search.
Semantic history search (Pro)
Semantic history is Pro. It adds an on-device "Related by meaning" group to the ⌘K palette for cases where your search words don't literally appear in the command. It's conservative by design:
- Ordinary lexical matches always come first and are ranked on their own.
- "Related by meaning" is a separate, labeled group (capped to a few entries) for commands with no word overlap but a close meaning — a weak semantic match never outranks a precise lexical hit.
- It runs entirely on your machine. The embeddings come from a small local model (
all-minilm, about 46 MB) served by Ollama on127.0.0.1; the index is keyed by a hash and stores no command text, and nothing is ever sent to a provider. (Apple's in-processNLEmbeddingwas measured and replaced — it is not used.) - Turning it on takes one click. The first time you search, ⌘K offers "Enable search by meaning (46 MB)" and downloads the model for you; the row clears itself and your results appear when it finishes. If you'd rather do it from a shell,
ollama pull all-minilmis the same thing. - If Ollama isn't running at all, ⌘K says so and points you at local-AI setup instead of offering a download that couldn't install. Either way the "Related by meaning" group simply doesn't appear and ⌘K stays lexical-only — ordinary text search is unaffected and always available.
What to expect from it
It's a recall aid, not an oracle. It's there for "that thing that compressed the logs" when you can't remember whether you used tar, zip or gzip. Commands made entirely of flags and paths carry less meaning for it than ones containing real words, so a plain-English match will usually be the strongest. Results are judged against the best match for that search, so you'll always be offered the closest thing it found — which means on a search nothing really answers, the top suggestion may not be useful. That's why the group is labelled and kept separate from your exact matches.
Related pages: Privacy and Data Handling, Free vs. Pro, Runbooks.