mrt command reference
mrt controls the running MrTerminal app. It ships inside the app, so it runs on the app's own
runtime and updates with it. To put it on your PATH, choose Shell → Install 'mrt'
Command… in the app. That links /usr/local/bin/mrt and asks for your password if
needed.
If MrTerminal isn't running, mrt starts it first. Everything it does happens in the app's own
terminals, in plain view: every terminal it opens or types into is brought on screen, and your keyboard focus
stays where it was.
Quick tour
mrt status # what is open and what is running
mrt scripts # what this project can run
mrt run dev # start the dev script (reuses its terminal)
mrt wait dev --match 'ready' # until its output says so
mrt run test --wait # output and exit code of the test run
mrt read dev --lines 40 # the last 40 lines of a terminal
mrt send notes 'git status' # type a line into a terminal
mrt keys dev ctrl-c # press keys
mrt open --split right -- tail -f log/development.log
mrt preset save "Full stack" # remember the open terminals and layout
Commands
| Usage | What it does |
|---|---|
mrt status |
Is the app running? Projects and their terminals |
mrt ls [--project P] |
Open terminals: id, state, title, command |
mrt projects |
Projects in the sidebar |
mrt project add <folder> [--name N] | remove <project> | show <project> |
Add, remove or switch to a project |
mrt scripts [--project P] |
What a project can run: detected scripts and custom commands |
mrt open [--cwd D] [--title T] [--split right|below|tab] [--new] [-- <command>] |
Open a terminal, optionally running a command; reuses a matching one if open |
mrt run <script|command> [--cwd D] [--title T] [--new] [--wait] [--timeout S] |
Run a script or command; reuses its terminal if open |
mrt send <terminal> <text> [--no-enter] [--wait] [--timeout S] |
Type a line into a terminal (and press Enter) |
mrt keys <terminal> <key>... |
Press keys: ctrl-c, enter, up, tab, esc... |
mrt stop <terminal> |
Interrupt what is running (Ctrl-C) |
mrt restart <terminal> |
Start the terminal again and re-run its command |
mrt close <terminal> |
Close a terminal (stops what runs in it) |
mrt show <terminal> |
Bring a terminal on screen |
mrt rename <terminal> <title> |
Rename a terminal tab |
mrt read <terminal> [--lines N | --all | --command] |
Print what a terminal shows; --command: the last command's output and exit code |
mrt wait <terminal> [--match RE] [--timeout S] |
Wait for the running command to finish, or for output matching RE |
mrt preset list | launch <name> | save <name> | delete <name> |
Saved sets of terminals and their layout |
mrt command add <name> <command> [--cwd D] | remove <name> |
A project's own commands, shown in the sidebar |
mrt config [path | show | schema] |
Where the configuration lives, its contents, its JSON Schema |
mrt skill [show | install [--dir D]] |
The agent skill: installs to ~/.agents/skills/mrt, linked for Claude Code |
Options, names and exit codes
Options for every command:
-p, --project P project by name, id or folder (default: the one you are in)
--json machine-readable output
--no-launch fail instead of starting MrTerminal when it is not running
-h, --help this help; -v, --version
<terminal> is an id, a tab title or a command line ("npm run dev"); "self" is
the terminal mrt runs in. Exit codes: 0 ok, 1 error, 2 usage, 3 app not
running, 124 timed out; with --wait, the exit code of the command.
Which project?
Without --project, mrt uses the project whose folder contains your current directory,
or else the project of the MrTerminal terminal it runs in, or else the project on screen.
Output and exit codes of a command
MrTerminal starts zsh and bash with a small shell integration that reports where each command starts and ends
and its exit code, using the standard OSC 133 marks. fish reports them by itself. That is how
mrt run --wait, mrt send --wait, mrt wait and
mrt read --command return only one command's output and its real exit code. In other shells they
still wait, but have no exit code.
Waits are bounded
--timeout defaults to 60 seconds. When it runs out, mrt exits with code 124 and the
command keeps running. Check it with mrt read, or wait again.
Scripting
Add --json to any command for machine-readable output. To use mrt from a coding
agent, see coding agents.