User guide Command suggestions and AI

Command suggestions and AI

Inline suggestions

While you type a command in any terminal pane (local, SSH, Telnet, Mosh or serial), PlexusTerm draws the rest of a command you ran before in grey after the cursor. Suggestions come from your own command history, so they work with no AI configured: commands of the same host first, then those of every host, the most recent and most often used first.

  • Right Arrow or End, with the cursor at the end of the line, accepts the whole suggestion; Ctrl+Right accepts its next word. The accepted text is sent as if typed, so multi-execution and macro recording see it too.
  • Every other key reaches the shell as usual: Tab stays the shell's own completion.
  • Suggestions pause until the next Enter once PlexusTerm can no longer be sure what the line holds: after Up/Down (shell history), Ctrl+R, Tab completion, the left arrow or other cursor keys, Alt shortcuts, or a paste with several lines. They are also hidden in full-screen programs (vim, less, top), at password and passphrase prompts, while the pane is scrolled back or not focused, and when the shell draws something after the cursor (a right-hand prompt, or another autosuggestion plugin).

Every command sent with Enter is recorded on this computer in history.json in the app config directory (readable only by you), per host (user@host:port for SSH and Mosh, telnet:host:port, serial:device, local), without duplicates and capped at 2000 commands per host and 200 hosts. Never recorded: lines starting with a space, anything typed at a password, passphrase, PIN or one-time-code prompt (recognised in the ten interface languages and Russian, as sudo, ssh, PAM, cryptsetup and gpg print them), anything typed in a full-screen program, and commands that reach a pane only through multi-execution.

The AI section of Settings holds:

  • Inline suggestions (on by default): the grey suggestions above.
  • Command history (on by default): records commands and suggests from them. Clear history empties history.json at once.
  • AI suggestions (off by default): when the history has nothing for the typed line, ask the AI provider (see AI suggestions).
  • Provider: Anthropic, Gemini, OpenAI, OpenAI-compatible or OpenCode Go; Base URL for an OpenAI-compatible endpoint (for example http://localhost:11434/v1 for Ollama).
  • Model (Anthropic: claude-opus-5-5, Gemini: gemini-3.5-flash-lite, OpenAI and compatible: fill in your model; OpenCode Go: pick one from the list, see OpenCode Go). Changing the provider while the model is still a provider default switches it to the new provider's default.
  • API key: stored in the system keyring, one per provider. The field only shows whether a key is saved; Save key and Remove key apply at once.
  • History commands sent as context (0-20, default 5).
  • Assistant shortcut (default Ctrl+Shift+Space): click the field and press the new combination; Escape keeps the current one. It needs Ctrl, Alt or Meta, and combinations PlexusTerm already uses are refused.

AI suggestions

With AI suggestions on, when the history has no suggestion for the typed line PlexusTerm waits for a short pause in typing (about 400 ms; typing again cancels it) and asks the AI provider how the command goes on. The answer is drawn in grey like a history suggestion and accepted with the same keys.

  • Sent: the typed line, the operating system, the current folder (only when the shell reports it through OSC 7) and the host's last history commands (History commands sent as context, 0 sends none; none either while Command history is off).
  • Never sent: the terminal output, anything typed at a password or passphrase prompt, anything typed in a full-screen program.
  • Each pane sends at most one request at a time and at most one per second; only the newest line waits, older ones are dropped.
  • Failures never interrupt typing: the pane shows a small grey hint in its bottom right corner, such as AI: no API key, AI: key rejected, AI: rate limited or AI: unavailable (hover it for the provider's message). It goes away with the next answer.

Providers and API keys

Provider Default model Notes
Anthropic (default) claude-opus-5-5 Messages API. With the Claude Opus 5.5 models, PlexusTerm lets Anthropic retry on a recommended model when the chosen one cannot answer (server-side fallback). A faster, cheaper model can be typed in Model.
Gemini gemini-3.5-flash-lite Google Gemini API.
OpenAI none: type your model OpenAI API.
OpenAI-compatible none: type your model Any endpoint with the OpenAI API at Base URL: Ollama (http://localhost:11434/v1), LM Studio (http://localhost:1234/v1), OpenRouter (https://openrouter.ai/api/v1). A key is optional; local servers usually need none. When the base URL is on opencode.ai, the OpenCode session header is sent too.
OpenCode Go none: pick a model from the list Only the API key is needed: the model list and each model's API come from OpenCode (see below).

API keys are stored only in the system keyring (one per provider), never in settings.json; Settings shows only whether a key is saved. Requests go from the PlexusTerm backend straight to the provider over HTTPS (or to the base URL you set), identified as PlexusTerm/<version>. Redirects are not followed, so a key is never sent on to another host; a redirect shows up as an error asking you to check the base URL.

OpenCode Go

Choose OpenCode Go as the provider and save your OpenCode API key; nothing else is needed.

  • Model becomes a list of the OpenCode Go models with their names. PlexusTerm reads it from OpenCode's public list (https://opencode.ai/inference/go/v1/models) and learns which API each model uses from models.dev. The list is kept for 24 hours in opencode-go-models.json in the app config directory; Refresh models fetches it again.
  • Models served with the chat completions, Anthropic messages or OpenAI responses APIs work. Models on Google's API are shown as not supported yet and cannot be picked.
  • If models.dev cannot be reached, every model is treated as chat completions and a note says so; if nothing can be fetched, the list saved earlier is shown, or you can type a model id.
  • Every request carries a session ID (x-opencode-session), as OpenCode asks: one per terminal pane for inline suggestions and one per AI chat pane.
  • OpenCode Go is meant for coding agents and monitors traffic; inline AI suggestions send many short requests. Settings shows this note when OpenCode Go is selected.

AI chat

The AI chat answers any question or request in plain words (explanations, steps, what an error means, general help, any topic), in the language you write in, and offers a command for its terminal only when one fits. Press Ctrl+Shift+Space (changeable in Settings → AI → Assistant shortcut; the key never reaches the shell) or click the PlexusTerm X at the left of the toolbar: the focused terminal is split and the chat opens in a pane below it, linked to that terminal. The X turns once each time the chat opens or takes the focus (not when the system asks for reduced motion).

  • Each terminal has at most one chat: pressing the shortcut in a terminal that already has one moves the focus to it; pressing it in a chat goes back to its terminal. Clicking the X while a chat is open (it or its terminal has the focus) closes that chat, with the same turn of the X.
  • The chat counts as one of the tab's 4 panes. When the tab is full, a notice says so and no chat opens; close a pane first.
  • Type your question and press Enter or Send (Shift+Enter starts a new line). The conversation scrolls above the input. Stop cancels the answer being waited for and puts the question back in the input. An error is shown under the question it belongs to.
  • Follow-up questions send the earlier questions and answers of the same chat as context: the last 10 at most, and at most 16,000 characters in all (the oldest are left out first). Each chat is one conversation (one session ID for OpenCode).
  • The answer is shown as plain text: line breaks are kept and code between ``` fences is shown in monospace blocks; nothing in it is ever treated as HTML or run. Control and invisible formatting characters are removed (line breaks and tabs stay), and an answer longer than 8000 characters is shortened, ending with "… (answer shortened)".
  • When a single shell command does what you asked, it is shown below the answer with Copy, Insert and Run; otherwise there is no command box. Insert types the command into the chat's terminal without Enter and moves the focus there, so nothing runs until you press Enter yourself. Run clears whatever was half typed in that terminal, types the command and presses Enter; it refuses (and says so) while the terminal is at a password prompt or in a full-screen program such as vim. Copy puts it on the clipboard. Nothing runs unless you click Run or press Enter. An inserted command is recorded in the command history once you send it with Enter, like one you typed. Commands always come back on one line, without control characters or invisible formatting characters (such as zero-width spaces or right-to-left overrides); a command longer than 2000 characters is left out and only the answer is shown.
  • When text is selected in the terminal as you open the chat, it is attached to your first question and shown above the input before you send it; at most 2000 characters are sent. Click its × to leave it out. With text or files attached, Send works with an empty input: the question sent is "Explain this." (in the interface language).
  • Files dropped on the chat are attached to the next question: see Dropping files on the AI chat.
  • Besides your question, the chat sends the operating system, the terminal's current folder (when known) and the host's recent commands under the same rules as AI suggestions; never the terminal output.
  • The chat's header shows the provider and model; click it to choose another model from a scrollable list. The list holds the models of every provider with an API key saved (and of the OpenAI-compatible server when its base URL is set; on opencode.ai only once that provider has its own key, since OpenCode answers only with one), each with its provider's name, and can be filtered by typing. Choosing one makes it the AI provider and model, as in Settings → AI, for every chat and for AI suggestions. A provider whose list cannot be read shows why, and the others are still listed.
  • When no key is saved for the provider, the chat says so and Open AI settings opens Settings on the AI section, where the key is saved.
  • AI conversations (the clock button in the chat's header) lists the conversations, newest first, with their first question and date; the current one is highlighted. Click one to continue it in this chat (its questions, answers and AI session come back), or its bin to delete it. With Settings → AI → Keep AI conversations after closing PlexusTerm (on by default) they are saved on this computer in ai-chats.json in the app config directory (only your user can read it; at most 100, the oldest go first) and listed again after a restart. Turned off, nothing is read or written and the list holds this run's conversations only. A question still waiting for its answer is never saved, and attached files keep only their paths.
  • The chat closes with the × at the right of its header, or Ctrl+Shift+W while it has the focus. Closing the chat keeps its conversation: opening it again for the same terminal shows the earlier questions and answers and continues the same conversation. New conversation (the speech-bubble button next to the ×) starts over. A conversation stays in AI conversations when its terminal closes or PlexusTerm quits, unless keeping them is turned off. Closing its terminal (or the shell exiting) closes the chat too.
  • The chat is never part of multi-execution, macros never play into it or record from it, typing in it is not recorded in the command history, and while it has the focus the SFTP browser keeps following its terminal.