Origami

Docs › Loops

Shell commands

Run a command in the loop's folder from its message box, and hand the agent what it printed.

Where Loop › Message box 1 min read

How it works

  1. Type ! first in an empty message box. It turns to Shell, and Enter runs what you type with your login shell, in the loop's folder or its worktree.
  2. It runs at once, even while the agent works. A sheet on the page shows the command, the last lines it printed and how it ended, with the rest a press away.
  3. Once it ends, the agent is told what ran and what it printed, and answers. While the agent works, it is told when the turn ends.
  4. The stop tile on the sheet stops the command. One you stop goes to the agent with your next message.

Good to know

  • Backspace on an empty line, or Esc, goes back to a message. ↑ and ↓ bring back the loop's earlier commands, and Shift+Enter starts a new line.
  • A command has no terminal, so it cannot ask you anything. Use a terminal for one that does.
  • The agent is given at most the last 12,000 characters of what was printed.

Related