How the terminal is laid out
Kyon's terminal keeps each command with its output and gives you a proper editor for the next one. At the prompt, you type into an input at the bottom of the pane, and ↩ hands the finished command to your shell. Each command you ran sits above it in its own block, headed by where it ran and how long it took. A full-screen program such as an editor gets the whole pane, as in any terminal.
Blocks: commands and their output
Blocks let you pick out, copy and hand on whole commands instead of dragging across lines.
The newest command's block is on the pane's own background, and earlier ones are on a slightly different shade, so you can see where the latest output begins. When a command's output has scrolled up under its pinned header, a thin line marks where the header ends and the output goes under it. To turn either off, use Shade earlier blocks and Separate command from output in Settings › Appearance › Layout, beside Show block dividers.
- Choose a block with a click. ⌘-click adds or removes one, and ⇧-click chooses everything between. Select the previous command (⌘↑) and Select the next command (⌘↓) do it from the keyboard.
- While a block is chosen, ↑/↓ move between blocks and ⇧↑/⇧↓ extend the choice. Esc lets go, and typing a character lets go and writes it in the input. Preserve input focus on block selection keeps the keyboard in the input instead.
- Copy with ⌘C: each chosen command is copied followed by its output. Right-click a block for Copy, Copy output, Copy command, Send to agent, Copy working directory and Clear Blocks. Right-click selected text for Copy, Insert into input and Send to agent.
- Share with an agent: Send to agent: the selection, the file or the commands chosen (⌘⌥↩) puts the chosen commands and their output, or the selected text, into the prompt of the coding agent working in that folder. You add your question and send it yourself. See Coding agents.
- Run a command again by pressing ↑ in the input (see History) and then ↩.
When a block's output runs past the top of the pane, its header (the line it ran at and the command) stays pinned at the top, laid out as it is in the block, and the output scrolls under it, below a thin line (Separate command from output). This holds however short the pane is. The block's end pushes the pinned command up, so the block above takes its place, and in a pane shorter than the command lines their top is cut off. On the right of the command, the pinned line says how many lines of output are out of sight above, or more above where the block began further back. Pressing Enter on an empty line adds no block. Click the pinned header to go back to where the command was typed. A button at the bottom right jumps to the end of that block's output. Clear the scrollback (⌘K) removes every block.
A trackpad scrolls the terminal smoothly, following your fingers, while a mouse wheel moves it a few lines a step. Lines scrolled by mouse wheel interval (Settings › Terminal) sets how far either goes. A full-screen program such as a pager or an editor is scrolled in whole lines, since it draws its own screen.
The input editor
The input works like a text editor, so you can select, edit the middle of a long command, or write one over several lines. A line longer than the pane is wide wraps onto the next row, and the input grows to show all of it.
- ↩ runs the command. ⇧↩ starts a new line.
- ⌥←/⌥→ move by word and ⌘←/⌘→ to the ends of the line. ⌃A, ⌃E, ⌃U and ⌃K work as in a shell, and ⌃C clears the input.
- Select text with ⇧ and the arrow keys: ⇧←/⇧→ by character, ⇧⌥←/⇧⌥→ by word, ⇧⌘←/⇧⌘→ or ⇧Home/⇧End to the ends of the line, and ⇧↑/⇧↓ by line. ⌘A selects everything you have written. With the mouse, drag across text, double-click a word, triple-click a line, or ⇧-click to extend. Typing or pasting replaces the selection, ⌫ deletes it, and ⌘C and ⌘X copy and cut it.
- ⌃R, ⌃S and ⌃T hand what you wrote to your shell's own searches, including a fuzzy finder bound to those keys.
- Commands are coloured as you type, and a command name that will not run is underlined.
- With Expand aliases as you type on, an alias becomes what it stands for when you type a space after it.
- Dropping a file on the pane types its path, quoted for your shell.
Input position puts the input where you want it: Pin to the bottom (the default), Start at the top, or Pin to the top, which lists the newest blocks first under it.
Completions
Press ⇥ to finish the word at the caret. The first word of a command completes from the commands on your path, a word with a slash as a path, a word starting with $ from the environment, and anything after cd as a directory. With several matches, Kyon puts in what they share and opens a menu. ⇥ or ↑/↓ move through it, writing each choice in place, and typing narrows it. Open completions menu as you type shows the menu without ⇥. In a terminal on another machine, paths complete from that machine's files.
History
- As you type, the rest of a matching earlier command appears greyed after the caret. Take it with → or End. Lines that look like they carry a password or token are never suggested.
- Press ↑ on the input's first line to list earlier commands, newest at the bottom and already written in. If you had typed something, only commands containing it are listed. Typing while the list is open narrows it the same way, and ⌫ widens it again; what you typed shows above the list. ↑/↓ move through the list, ↩ runs the chosen command, and Esc puts back what you had written. To change the chosen command before running it, press ← or ⇥ first: the list closes and the command stays in the input.
- Set Tab key behavior to Accept suggestion if you want ⇥ to take suggestions. Completions then open with ⌃Space.
The @ and / menus
- Type
@at the start of a word to pick a file or folder, whose path replaces the@. In a repository you can also pick Code, which lists what the code defines. The menu stays out of the way in package installs such asnpm i @scope/pkgand in words likeuser@host. - Type
/at the start of the input for Kyon's own commands:/rename-tab,/set-tab-color,/open-file,/open-settings-file,/open-code-review,/agent,/indexand/conversations.
Both menus work while AI features is on, and each has its own switch on Settings › Terminal › Input.
Vim keys
Turn on Edit code and commands with Vim keybindings for modal editing in the input. The mode shows in the input's corner, and Set unnamed register as system clipboard makes yanks and puts use the clipboard. In Normal mode, l at the end of the line takes a history suggestion.
Shell integration
Blocks, the input, the directory chip, corrections and suggestions depend on your shell reporting where each prompt and command begins and ends. Kyon sets this up for zsh, bash and fish, reading your own startup files first, so you get your usual shell with hooks added. Other shells start as configured and show their output as a plain terminal. The Shell setting picks the program; leave it empty for your login shell.
Subshells
A shell started inside another, such as bash at the prompt, a shell started with docker run or docker exec, or poetry shell, has no integration of its own. If it is still running a second later, a strip offers Kyonify subshell, which types the hooks into it so it gets blocks too. Do not show again adds the command to Denylisted commands. To treat more commands as subshells, add regular expressions under Added commands. Both lists are on Settings › System › Kyonify.
Connecting to another machine with ssh
An ssh you type in a terminal runs as one command: the other machine's prompt, its own completion and what it prints are all inside it, and what you type, Tab included, goes to that machine. The command's heading names where you typed it, here. To have blocks, Kyon's input and its completion on the server itself, add it as a target and open terminals there: see Working on a server.
Turning plain words into a command
When you know what you want but not the command, write it in plain words.
- Type what you want, for example
how big is this folder. - Press ⌘↩ (Ask an agent about what is written). Kyon shows “Finding the command…”.
- The command replaces your words in the input. Read it, edit it if needed, and press ↩ to run it.
A chip beside the input offers Ask the agent instead. Press ⌃↩ or click it to send your original words to the agent. If no command answers your request, Kyon hands it to the agent directly, and the conversation opens in the pane. Esc returns to the shell.
When the line is already a command, ⌘↩ asks the agent about it. With the input empty, it opens a conversation. Ask with, on Settings › Agent › Agent, chooses which model or coding agent answers. See Kyon's agent.
To have plain ↩ send requests to the agent, turn on Autodetect agent prompts in terminal input. ⌘I then switches a line between request and command, and Natural language denylist names commands that never count as requests.
Next-command and prompt suggestions
Active AI suggests what to do after each command finishes, so a routine sequence takes a keypress per step.
- Next Command shows a likely next command, greyed, in the empty input. It comes from what usually followed in your history, and from the model only when history cannot say. Take it with → or End.
- Prompt Suggestions shows a question about the finished command as a chip beside the input. ⌃↩ or a click asks the agent, and ↩ sets it aside.
Both are on Settings › Agent › Suggestions, under the Active AI switch, and need AI features on.
Fixing the last command
When a command fails on a typo or a wrong flag, Kyon suggests what you meant.
- With Suggest corrected commands on, the best correction appears in the empty input after the failure. Take it with → or End.
- Run Fix the last command from the command palette (⌘P) or the Session menu to see every correction. The one you choose is typed in but not run.
Corrections use the commands on your path and your history. A failed ssh is left alone, since that is usually the network, not a typo.
Saved commands
Save a command you got right once, with blanks for the parts that change.
Run Saved commands from the File menu or the palette, and search by name, description or tag. The command you choose is typed into the terminal with its defaults filled in. Blanks without a default stay visible as {{name}}, and Kyon says how many are left. Nothing runs until you press ↩.
Saved commands come from your own workflows folder in Kyon's settings folder (Show the settings folder finds it), then from .kyon/workflows in the project, then from a library of several hundred that ships with Kyon. When names clash, yours win. Each is a .toml file:
command, the only required key, with{{name}}for each blank, such as"./deploy.sh {{service}} --env {{env}}";name(the file name if left out),descriptionandtags;- a
[[arguments]]table per blank, withname, and optionallydescriptionanddefault.
A file that cannot be read appears in the list with the reason.
Links and file paths in output
Addresses and paths in output open with a click, so an error message takes you straight to the line it names.
- Kyon recognizes links that programs mark, web addresses, and paths to files that exist, including a trailing
:line:column. A link wrapped onto the next row still works, and so does a web address that a program broke at the right edge itself and carried on to an indented row below. - ⌘-click or middle-click opens a link. A plain click shows Open link, or for a file Open file, Open in Kyon and Show in Finder. Show tooltip on click on links turns that menu off.
- Choose an editor to open file links (Settings › Code › Editor and Code Review) sets where files open. Kyon opens them at the line named.
Pictures
Programs that draw plots and image previews in the terminal work in Kyon. It supports the kitty graphics protocol, including animation and pictures side by side, plus Sixel and OSC 1337 inline images, for PNG and JPEG. Pictures move with the text as it scrolls.
Hiding secrets
Secret redaction keeps tokens and keys out of sight when you share your screen or hand output to an agent.
- On Settings › General › Privacy, turn on Secret redaction.
- Under Custom secret redaction, click Add recommended for common API keys, GitHub tokens, AWS IDs, JWTs and addresses. Add your own regular expressions in the settings file.
- Pick a Secret visual redaction mode: Strikethrough (the default), Asterisks (hidden until revealed) or Show.
Click a secret for Copy secret and, with asterisks, Reveal secret. In asterisks mode, copying keeps hidden secrets hidden. Secrets passed with Send to agent always go as asterisks.
Clipboard and pasting safeguards
Kyon asks before a paste or a program does something you did not expect.
- Ask before pasting commands: when a multi-line paste would run straight away in a program that cannot tell pasting from typing, a strip says “Pasting this would run N lines as commands”, with Paste and Cancel. A paste into the input waits for your ↩. One paste can be up to 1 MiB.
- Clipboard access (Ask, Deny, Write or Read write) governs programs using the clipboard. With Ask, a read shows what the program would see, with Allow, Always allow and Don't allow. A program's first write asks too.
- Copy on select is on by default. It leaves an image on the clipboard, such as a screenshot you just took, where it is: the pane says the selection was not copied, and ⌘C copies it. The click that brings the window forward, or makes another pane the active one, has to move a little further than other clicks before it starts a selection, so a slip of the hand as you click back in selects nothing. Double-click smart selection takes a whole path or address.
The directory chip
Chips above the input show where your shell is: the active conda or venv, the directory (home as ~, the host's home on another machine), the Git branch, the branch's open pull request by number, and the changed files with lines added and removed. Click the pull request chip to open it in your browser, and rest the pointer on it to read its title. See Code review for how Kyon finds it. Keep the shell's own prompt shows your shell's prompt instead. Right-click a block and choose Copy working directory to copy the directory.
A long directory keeps its end, and a chip that does not fit beside the others is shortened to what room there is, with … where it was cut. Rest the pointer on a shortened chip to read all of it.
Find in the terminal
Find in this file (⌘F) searches everything the terminal keeps, starting from the most recent match. It starts with your selection if you have one. Find next (⌘G) and Find previous (⌘⇧G) step between matches. Case is ignored unless you type a capital.
Terminal settings
Open Settings with ⌘,. All settings are listed in the settings reference.
| Page | What it covers |
|---|---|
| Settings › Terminal › Input | Input position and prompt, editing and Vim, suggestions, completions, corrections, the @ and / menus, Tab key behavior, Option as Meta, and agent input detection. |
| Settings › Terminal › General | Session restore, kept shells, Scrollback, Shell, New terminals start in, the sticky header and link menus. |
| Settings › Terminal › Behavior | Mouse and focus reporting, bell, selection, Copy on select, Ask before pasting commands, Clipboard access and Ask before closing a running command. |
Related: Settings › Appearance › Layout (blocks), Settings › Agent › Suggestions, Settings › General › Privacy and Settings › System › Kyonify.