exec

A command that runs shell commands inside one or more Git worktrees. A Git worktree is a separate working directory for a branch in the same repository.

In plain words
What is it for?
Use it to run commands in a selected branch, every worktree, or a tmux window or split pane.
Why use it?
It saves you from entering each worktree manually when running tests, builds, dependency installs, or status checks. The same command can be run across all worktrees.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/mirinodev/maestro/exec
Clone the repo
git clone --depth 1 https://github.com/mirinodev/maestro
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,106 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01106
Opus 5 $0.00000 $0.00553
Sonnet 5 $0.00000 $0.00221
Haiku 4.5 $0.00000 $0.00111

Measured yesterday against content hash be80af76444e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

exec scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

The `exec` command allows you to run any command within the context of one or multiple worktrees without entering their shell environment. This is particularly useful for running build commands, tests, or any other opera
docs/commands/exec.md · 173 lines

How it starts

The opening of the file, as written. The whole thing — 173 lines — stays where its author put it; the contents beside it link to each section on GitHub.

🔸 exec

Execute commands in specific or all orchestra members.

Overview

The exec command allows you to run any command within the context of one or multiple worktrees without entering their shell environment. This is particularly useful for running build commands, tests, or any other operations across your orchestra members.

Usage

mst exec [branch-name] <command> [options]
mst e [branch-name] <command> [options]  # alias

Options

  • -s, --silent - Suppress command output
  • -a, --all - Execute on all orchestra members
  • --fzf - Interactively select orchestra member with fzf
  • -t, --tmux - Execute in new tmux window
  • --tmux-vertical, --tmux-v - Execute in vertical split pane
  • --tmux-horizontal, --tmux-h - Execute in horizontal split pane

Examples

Basic Usage

Execute a command in a specific orchestra member:

# Run tests in feature branch
mst exec feature/awesome npm test

# Build project
mst exec feature/ui npm run build

# Check git status
mst exec hotfix/urgent git status

Execute in All Orchestra Members

Run the same command across all worktrees:

# Install dependencies in all (various formats)
mst exec --all npm install
mst exec -a npm install

# Run linting in all
mst exec --all npm run lint
mst exec -a npm run lint

# Check git status of all
mst exec --all git status --short
mst exec -a git status --short

# Note: When using -a/--all flag, the branch name argument is optional.
# Both of these work:
mst exec dummy npm test --all  # 'dummy' is ignored
mst exec -a npm test           # More concise

Interactive Selection with fzf

Select which orchestra member to execute in:

# Select and run dev server
mst exec --fzf npm run dev

# Select and run tests
mst exec --fzf npm test

tmux Integration

Execute commands in tmux panes for better workflow:

# Open in new tmux window
mst exec feature/api --tmux npm run watch

# Open in vertical split (side by side)
mst exec feature/ui --tmux-v npm run dev

# Open in horizontal split (top and bottom)
mst exec backend --tmux-h npm run test:watch

# Combine with fzf selection
mst exec --fzf --tmux npm start

Read the full file on GitHub · 173 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 173 lines · 0 tokens per session scan B be80af76444e

Subscribe to this mod's changes

exec is a command published in the GitHub repository mirinodev/maestro (9 stars, last pushed 11mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,106 tokens. A static security scan graded it B with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.