Tutorial
Assist: type less, understand more
Sinclair ships a set of assists that live where you type: ghost-text completions drawn from your own history, a ranked popup, a one-keystroke explanation of whatever a command just printed, and a composer that turns a plain-English request into a drafted command. The point that matters: these are local heuristics, not a cloud call — instant, offline, and private by default, with one clearly marked optional AI fallback.
On macOS, ⌘ is the modifier; on Linux, read it as ⌃ (Ctrl). Everything here is remappable and reachable from the command palette (⌘⇧P).
1. Ghost text — on by default
Start typing a command you've run before. The rest of it appears as dim ghost text past your cursor — fish-style. With the cursor at the end of the line, press → or End to accept it; keep typing to ignore it. Candidates come from three local sources, all on by default: your captured command history, a built-in list of common commands, and filesystem paths under your working directory.
Two more surfaces are one setting away in
~/.config/sinclair/settings.json:
{
"autosuggest-popup": true, // ranked dropdown under the cursor
"autosuggest-tab": true // Tab cycles through completions inline
}
The ranking is tuned by the autosuggest-assist source (on by
default): the tightest completion wins, so short, recent matches beat long, stale
history lines. Every source is an independent toggle — autosuggest-history,
autosuggest-commands, autosuggest-paths — if you want, say,
history-only suggestions.
2. Explain what just happened
A command fails with a wall of text. Press ⌘⇧E
(explain_output): Sinclair grabs your selection — or, with
nothing selected, the last command's output block (via shell integration's
prompt marks) — and opens an in-pane panel with a plain-language reading of it and
the key line pulled out. esc or enter dismisses it.
This is a fast, deterministic analyzer that recognizes the shapes of common failures — permission and credential errors, not founds, timeouts, and generic error reports. It's not a chat model; it answers instantly and never sends your output anywhere.
3. Compose a command from a description
Press ⌘⇧G (compose_command) and describe what you want —
find large files, what's listening on a port, disk usage,
files modified this week. enter types the matching
command at your prompt — it never runs it — so you review, edit, and press
enter yourself.
The composer matches a small set of common requests. When it has no answer it says no match and sends nothing to your shell — a miss is explicit, never your own words echoed back as a "command." esc closes the panel.
4. The optional AI fallback
One assist can go beyond local: with "autosuggest-ai": true, when
nothing local completes your line, Sinclair asks the Claude CLI in the
background — passing your last few commands as context — and shows the reply as the
same accept-with-→ ghost text. It's off by default and needs the
claude CLI (configure its path under Settings → AI). Local
candidates always win when they exist.
5. The safety net for pastes
The same assist engine can inspect what you paste: multi-line blobs and
dangerous patterns (rm -rf, curl … | sh, sudo,
writes to /dev) get a confirmation with the reasons listed before
anything reaches your shell. It's covered in
Clipboard, snippets & pickers — enable it with
"clipboard-paste-protection": true.