Macros

A macro is a short script typed into a terminal for you: text, key presses, and waits, with fields you fill in when you run it. Write them in Settings and run them from the Command Bar.

Terminay Settings, Macros category, with the macro library, the script editor, and the live preview

Macro Library

Macros live in Settings under Automation → Macros; Cmd/Ctrl+; opens them directly. The library lists the macros of the server chosen in the Settings server selector, grouped by category, with a filter. Choose New macro to make one, and Save or Discard your changes when you are done.

  • Create, rename, and remove categories. Removing a category keeps its macros.
  • Drag a macro onto a category to file it there, or onto another macro to place it before that one. Drag a category by its handle to reorder categories.
  • The Command Bar lists macros in one group per category, in this order, and the rest under Macros.

The Script

Each macro is one script document. Text is typed into the terminal as written, and every other step is a token placed in the text, in the order it runs:

  • Press key: Enter, Tab, Escape, Backspace, Up Arrow, or Down Arrow. A macro only submits what it typed when it ends with an Enter token.
  • Wait: pause for a number of seconds.
  • Wait until quiet: pause until the terminal has produced no output for a while.
  • Select current line.

Type / at the start of a line to insert a step from a menu, filtered as you type, or use the Insert controls beside the editor. Remove a token from the token itself, or with Backspace just after it.

Fields And Templates

Use {{Environment}} placeholders in the text, and Terminay asks for each value when the macro runs. Fields can be text, textarea, select, number, checkbox, emoji, or file, each with a label and default. Text also supports Eta templates for logic, such as <% if (region === 'eu') { %>…<% } %> and <%= region %>, with field names available directly.

The live preview beside the editor shows the form you will be asked and the exact sequence that will be sent with the values currently in it. It never writes to a terminal.

Macros have no secret steps. Keep passwords and tokens out of macro text, since it is typed into the terminal as written.

Running And Canceling

Run macros from the Command Bar with Cmd/Ctrl+L. Search by title, description, field name, or script text. Macros run in the active terminal, on that terminal's server.

When a macro starts, the terminal tab shows a macro queue indicator. Open it to see recent runs, overall status, and each step's status. Running macros can be canceled from the queue, and finished runs can be cleared individually or all at once.

To run a macro without starting it yourself, for example whenever an agent needs input, make it the action of an automation.