Command snippets

Save commands with fill-in slots and insert them into any terminal from a palette.

snippetssaved commandsmacrostemplatesplaceholderspalettealiases

Command snippets

Save the commands you run often under a name, with blanks to fill in, and insert them into any terminal, local or over SSH, from a quick palette.

Create a snippet

  1. Click Command Snippets (the {} button) in the top bar, or open Snippets in any vault's sidebar.
  2. Click New.
  3. Give it a Name (for example "Tail app logs") and an optional Description.
  4. Write the Command. It can span several lines.
  5. Save.

Fill-in slots

Wrap a value in double braces to be asked for it each time the snippet runs:

  • {{pod}} — asks for pod, with no default.
  • {{ns=default}} — asks for ns, pre-filled with default.

Example: kubectl logs -f -n {{ns=default}} {{pod}}

The form lists the slots it found and their defaults.

Use a snippet in a terminal

  1. In a terminal, press ⌘⇧S (macOS) or Ctrl+Shift+S (Windows, Linux), or click Snippets in the terminal header.
  2. Type to filter, and move with ↑ / ↓.
  3. Press Tab to insert the snippet at the prompt, or Enter to insert and run it. Esc closes the palette.

If the snippet has slots, a small form asks for each value and previews the result. Enter inserts it; ⌘Enter / Ctrl+Enter inserts and runs it.

Outside a terminal, the same shortcut opens the snippet library.

Snippets are global

Snippets aren't tied to a vault: the same library appears under every vault, and it stays reachable while a vault is locked.

Encrypt your snippets

By default snippets are stored unencrypted. To protect them, open Settings → Terminal → CommandSnippet encryption and choose a Vault. Snippets are then encrypted with that vault's key before they're stored or synced, and nobody, not even a Kubexer admin, can read them.

  • That vault must be unlocked to view or edit snippets. Otherwise the library shows Snippets are locked with an Unlock button.
  • If that vault is deleted, encrypted snippets can't be recovered.

Tips