Skip to main content

Snippets and Command History

TermFlow has two ways to stop you retyping things. Snippets are text you save on purpose: a long command, a prompt you give agents every day, a block of config. Command history suggestions come for free: as you type at a shell prompt, TermFlow offers commands you've run before, ranked by the folder you're in.

Neither one presses Enter for you. Both put text at the cursor, and you decide when to run it.

Snippets​

A snippet is a piece of text with an optional label, folder and tags. The text goes in exactly as written, multi-line included. There are no placeholders or variables inside a snippet.

Using a Snippet​

Right-click in a terminal and open Snippets. You can:

  • type to search by label, text, tag or initials ("ch" finds "context handoff"), or start with # to search by tag,
  • browse by folder or as a flat list, and change the sort order from the menu header,
  • click a snippet to insert it at the cursor in that terminal.

Each row also has Copy, Insert, Edit and Delete. Inserting a snippet counts as a use, which is what the Last used and Usage count sort orders go by.

Creating and Editing Snippets​

Choose Add New Snippet from the terminal's Snippets menu, or New Snippet in Settings → Snippets. If you have text selected in the terminal when you open the menu, the new snippet starts with that text.

FieldNotes
TextRequired. Inserted verbatim.
LabelOptional. Left empty, the first line of the text is used.
FolderOptional, one level only. A / in the name becomes a space.
TagsOptional, comma-separated.

Settings → Snippets is the full manager. It has a search box (Search name, text, tag, or initials…), a sort menu (Last used, Usage count, Created date, Updated date, Name (A–Z)), and edit, copy and delete on every row. Deleting asks first and can't be undone. There's no duplicate button; to copy a snippet, create a new one and paste the text in.

Import and Export​

Export… in Settings → Snippets saves all your snippets to one JSON file (termflow-snippets.json by default). There's no way to export only some.

Import… reads three formats and works out which one it has:

  • a TermFlow snippets export,
  • an InkSpoke Command Mappings export,
  • a Rephlo commands export.

A snippet whose text exactly matches one you already have is skipped. Broken records are skipped and counted rather than failing the whole file. Snippets imported from InkSpoke or Rephlo are tagged with the product they came from. When the import finishes, TermFlow tells you how many it imported, skipped as duplicates and rejected. Files must be .json and at most 5 MB.

Snippets in Automations​

The message fields in the automation editor have an Insert snippet… button that drops a snippet's text into the message. The automation keeps its own copy of the text; editing the snippet later doesn't change the automation.

Command History Suggestions​

When you type a command at a shell prompt, TermFlow shows a small popup of matching commands you've run before. Commands you ran in the current folder, or in folders above and below it, come first.

The popup stays out of your way until you reach for it:

KeyWhat it does
Shift+EnterInsert the highlighted suggestion.
↓Move into the list. Then ↑/↓ to choose and Enter to insert.
Shift+DeleteRemove the selected command from history for good.
EscClose the popup (or step back out of the list).

The popup's footer shows these keys too. Inserting fills in the command line; it doesn't run it.

To browse instead of type, right-click the terminal and open Command History. It shows recent commands for that folder, with a search box.

Turning It Off​

The Command history suggestions toggle in Settings → Terminal Behavior is on by default. Turning it off stops both the popup and the recording of new commands.

Commands are stored locally in TermFlow's history database, with obvious secrets removed before they're saved. Commands longer than 500 characters aren't recorded.

An honest note: There's no "clear all history" button. You can remove individual commands with Shift+Delete in the popup. The secret filter catches common patterns, not everything, so don't rely on it for sensitive values you type on the command line. Snippets and command history have no REST or MCP API; they're only available in the app.

Next Steps​