Wardterm documentation

Saved commands

Save the commands you use often in Wardterm, paste or run them in a session, use variables, and run a command on several servers with the result of each.

Save a command

  1. Open Commands and choose New command, or + in the Saved commands of the side panel.
  2. Give it a Name and write the Command.
  3. Optional: a Folder to group commands, and Default servers for running it on several servers.

From History, Save as command saves a command you already ran.

Use it in a session

  • In the side panel, under Saved commands, a tap writes the command on the line without running it, and the play button runs it. The commands for this server come first.
  • On iPhone and iPad, ... on the key bar lists your commands: a tap runs one, the paste button only writes it.
  • On a production server, a risky command asks before it runs.
  • The menu of a command has Run, Edit, Duplicate, Share with team (Team) and Delete.

Variables

Write a variable between double braces, such as:

sudo systemctl restart {{service}}

When you run the command on several servers, the app asks for the value of each variable first.

Run on several servers

  1. Choose Run on several servers from Cmd+K, Run in the menu of a command, or Run a command on all under More in the menu of a group. The servers do not need to be connected.
  2. Choose a saved command, or write one.
  3. Under It goes to, include or exclude servers and groups.
  4. Choose whether they run At the same time, and Stop after a time limit if you want one.
  5. Choose Review, then confirm.

The results show each server with its exit code and output. Filter them by Succeeded or Failed. The same, by hand, with OpenSSH:

for h in web1 web2 web3; do ssh "$h" uptime; done

A command at every connection

To run a saved command each time a server connects, choose it in Show more, At startup, Startup command. For example, a command that attaches to tmux.