NAME
marsh, msh - shell for composing agents
SYNOPSIS
marsh [--shell bash|zsh|marsh] [--load KIT[,KIT...]|all] [--ephemeral-home] [SHELL_ARGS...]
marsh COMMAND [ARGS...]
msh ...
DESCRIPTION
marsh opens a Linux shell for the current directory on an Apple Silicon Mac. The shell is a patched Brush, a Bash-compatible shell, running in a Docker Sandbox VM created with the stock sbx command. The project directory is mounted read/write at its exact Mac path, so pwd prints the same path inside and outside.
Some command names are registered. By default these are claude, codex, pi and shell. Each registered command runs as a fresh, nonroot container from its Kit image, in a warm VM kept for that Kit. The container is deleted when the command ends.
Registered commands work in pipelines, scripts, make, and background jobs like any other command. A registered command started from inside another one becomes its child job.
split runs commands in parallel on private copies of the project. join prints each branch's output and patch. Registered commands in a split mount only their fork; use join --keep to retain patches for inspection and application. A shell branch's own code (-b) is not confined to its fork. fanout runs branches on shared files, and collect prints their output in declaration order.
Direct jobs can change or delete project files. Jobs using the same guest home can read one another's settings, history, and saved logins. Keep the project in Git, and use split for agent changes you want to review first. See https://runmar.sh/docs/security.html.
Docker is on by default for every project (turn it off with marsh config docker off): jobs and the shell get a filtered Docker endpoint to that project's own private Docker, where docker run, docker compose and Testcontainers work. Its VM is created only when it is first used. It has no Internet unless you grant it, and its data is kept by stop, reset and idle stop. marsh services and marsh config services are aliases of marsh docker and marsh config docker. See https://runmar.sh/docs/docker.html.
msh is a symbolic link to marsh and behaves identically.
With no COMMAND, marsh starts the shell. Arguments it does not recognize go to the shell, so marsh -c 'command' and marsh script work as they do with Bash. After -c or --, marsh interprets nothing.
OPTIONS
- --shell bash|zsh|marsh
- Run the shell VM's GNU Bash or zsh, with your own startup files, instead of Brush (marsh, the default). Registered commands and the marsh CLI work in all three.
- --load KIT[,KIT...]|all
- Prepare the named Kit VMs before the prompt appears: create them, or start them again if workers stop stopped them. Otherwise the first call to a Kit boots its VM and prints [starting NAME worker VM…].
- --ephemeral-home
- Use a blank, private guest home that is not kept after the shell exits. If it cannot be released, the slot is retained; see recover-home.
- -h, --help
- Print a summary of commands and exit.
- -V, --version, version
- Print the version and exit.
COMMANDS
- status [--json]
- Show the daemon and its version, its host control directory, per-job limits, shells, and Kit workers. After an upgrade replaced marsh while work runs, update pending: restarts on VERSION when idle: the daemon switches to the new marsh by itself once no job, shell or Kit start runs.
- jobs [--all] [--tree] [--json]
- List Kit jobs, running first, then newest. --tree draws children under their parent. In a shell, only that session's jobs; from a host terminal, running trees, trees from the last hour, and the five newest. --all lists every recorded job. --json omits the session/recent-jobs filter. Inside a job, all forms remain limited to that job's subtree.
- jobs show JOB [--json]
- Show one job. JOB may be an id prefix.
- run [--spawn NAME,...|--no-spawn] NAME [ARG...]
- Run registered command NAME as a new job. Inside a job it is a child job. --spawn and --no-spawn narrow what NAME may start in turn.
- context
- Print the text every job is given about marsh (its name, limits, and how to start other jobs).
- task-mcp
- Inside a job only: serve the task, task_output, and task_apply tools over MCP on stdin and stdout, so the job's agent hands work to other registered agents as child jobs.
- results [--json]
- List finished jobs, newest first: command, exit status, cleanup, timing. WALL is the whole request, from the call to verified cleanup. It includes any Kit VM boot. jobs shows RUN, the job's own run in the ready VM.
- results show CURSOR|JOB [--json]
- Show one finished job.
- split [-n] [-d] [-b LABEL=STRING]... [::: LABEL CMD [ARG...]]...
- Run each branch at once in its own private copy of the current directory and wait for all of them. -b runs STRING with the shell in the shell VM; ::: runs one registered command in a container that sees only its copy. -n gives branches empty stdin. Prints one handle line, which join reads on stdin. Interrupting or killing split cancels every branch. -d prints the handle line at once and exits; the branches run on, and join waits for them.
- join [--json] [--keep] [--timing] [-- CMD [ARG...]]
- Read a split handle on stdin and print each branch's status, output, and patch. Only the split's creator can join it. --keep retains the split and its patches, even on success; without it, success removes them. --json prints the manifest instead of the text rendering. --timing prints phase timings to stderr. With -- CMD, run CMD on that output with SPLIT_ID, SPLIT_DIR, SPLIT_MANIFEST and SPLIT_OBJECTS set; the split is removed if CMD exits 0, unless --keep is set, and kept otherwise. CMD runs even if a branch failed, and join returns its status. Without CMD, join returns the first nonzero branch status. CMD runs in the caller's environment: on the Mac, in the shell VM, or in the job container where marsh join was invoked.
- splits [--json] [ID]
- List splits. With ID, show its state and phase timings, even after joining.
- splits cancel ID
- Cancel a running split.
- splits rm ID
- Remove a kept split and its patches.
- fanout [-n] [-b LABEL=STRING]... [::: LABEL CMD [ARG...]]... | collect [--json] [--timing] [--stderr]
- Run branches at once on the same files (no copies). Print each branch's output in declaration order: its header, its stdout, then a failed branch's stderr. --stderr prints every branch's stderr. collect exits with the first nonzero branch status. Limits: 16 branches, 64 MiB of input, 16 MiB of combined branch output.
- cloud [--cpus N] [--ttl DURATION] [--image REF] [-d] [-c SCRIPT [NAME [ARG...]] | -- PROGRAM [ARG...]]
- Preview. Run a script or program in a new Docker Cloud sandbox; in the marsh shell, cloud [OPTION...] { LIST; } does the same. With no command, from a terminal, open an interactive cloud shell. A private, hook-free copy of the project's Git metadata goes with it and is never written back. The project (or split fork) is uploaded without Git-ignored files, .git, or .marsh; stdin, stdout, stderr, and the exit status pass through; file changes are written back to it before the command returns, overwriting local edits to the same paths. New files that match the ignore rules stay in the cloud (counted in the summary). Needs a Docker sign-in with Docker Cloud sandbox access. Ctrl-C exits 130 after the remote command stops and its changes return. See Docker Cloud.
With -d (--detach) the run is detached: marsh prints its job number and returns at once, and the run continues with the laptop closed (no terminal, no input; --ttl defaults to 2h and pauses the run rather than ending it). marsh collects it by itself and writes its changes back only if none of the files it changed were edited here meanwhile; otherwise they are kept as a patch. A detached block that calls a registered Kit is refused unless config cloud-delegate is on.
- cloud attach|collect|diff|apply|discard|stop JOB
- Control a detached cloud run: attach shows its output from the start and follows it (Ctrl-C stops following, not the run); collect checks on it now; diff shows a kept patch; apply applies a kept patch anyway; discard deletes its sandbox and drops any kept patch; stop sends INT, then KILL after 10 seconds.
- cloud sync [--json] JOB|--all
- Write a running attached cloud block's file changes so far back now; the block keeps running in the same sandbox. A path also changed here since it was uploaded or last synced is skipped and reported as a conflict, the local file kept. Synced changes become the new base, so later syncs and the final write-back carry only newer changes. The block names JOB on stderr when it starts (marsh: cloud: job N running ...). Prints marsh: cloud: job N: synced ... on stderr, or with --json a {"synced": [...]} document on stdout; exits 1 when a sync failed.
- config shell [bash|zsh|marsh]
- Set, or with no name print, the default shell for this MARSH_HOME.
- config auto-update [on|off]
- Set, or with no value print, whether Kits that follow a tag update themselves in this MARSH_HOME (when the daemon starts, then hourly), and whether a release build adds hermes by itself. The default is on. To update now, run marsh stop when idle, then marsh again.
- config open-urls [on|off]
- Set, or with no value print, whether xdg-open URL (also open, marsh open) in the shell VM or a job started from your terminal opens an http/https link in your Mac's browser. Off, links are only printed. The default is on. See https://runmar.sh/docs/agents.html#opening-links.
- config cloud-delegate [on|off]
- Set, or with no value print, whether a detached cloud run may start agent sandboxes itself, so a detached block can call registered Kits. The default is off. On, marsh reads a Docker access token with Allow Cloud Sandboxes access from the login Keychain (security add-generic-password -s marsh-cloud-delegate -a DOCKER_ID -w) at each such run's start and uploads it into a root-only file in its sandbox; the token can use every cloud sandbox on the account. See https://runmar.sh/docs/cloud.html.
- config docker [on|off|ls]
- Set, or with no value print, whether Docker is on for the current project (this folder, canonical path). The default is on. The setting is per project, and a project's own setting beats the default. ls shows the default and each project with a setting of its own. A project with Docker on gets its own Docker VM and, for its jobs and shell, a filtered Docker endpoint (see docker). Turning it off stops the project's containers and Docker VM at once and keeps the data; docker stop, docker rm and docker status still work. config services is the same setting. Stored in config.json. See https://runmar.sh/docs/docker.html.
- config docker default [on|off]
- Set, or with no value print, whether Docker is on for projects with no setting of their own (default on). off makes Docker opt-in per project (config docker on). Stored as docker_default_on; the per-project settings are services_projects (on) and docker_projects_off (off).
- config services-disk-size [SIZE]
- Set, or with no value print, the Docker disk of a newly created Docker VM (1g to 4096g, default 40g). Existing Docker VMs keep theirs. Docker needs 24 GiB plus a 512 MiB reserve, and the VM's filesystem keeps about a tenth of the disk, so marsh docker start refuses a size below 28g before it creates the VM.
- config services-idle-seconds [SECONDS]
- Set, or with no value print, how long a Docker VM with no job or shell using it keeps running before it is stopped (1 to 604800, default 900). Idle stop keeps the VM's disk and data. MARSH_SERVICES_IDLE_SECONDS at daemon start overrides it.
- config peer-review [on|off|ls [--json]]
- Set, or with no value print, peer review by another vendor's model. ls is peer-review ls. on writes MARSH_HOME/peer-review.d/marsh.yaml with enabled: true and the reviewers marsh detects (agents whose Kit declares a model option, for vendors whose key sbx secret ls shows); off sets enabled: false there. Then prints the table, as peer-review ls does. See https://runmar.sh/docs/peer-review.html.
- config limits [--json]
- List every job limit: its value, default, source (default, config, or env), range, and whether a change applies now or to new jobs. See https://runmar.sh/docs/configuration.html#job-limits.
- config limit NAME VALUE|default
- Set a job limit in MARSH_HOME/config.json, or put it back to its default. Admission limits apply to the next launch; per-job resources to jobs started after the change. A MARSH_* variable set when the daemon started wins until it restarts without it.
- peer-review ls [--json]
- Print whether peer review is on, the ready reviewers (class, vendor, agent, model, the drop-in that named each, how its class was found), those not ready and why, and drop-in errors. --json prints marsh status --json's peer_review document.
- peer-review classify MODEL... [--json]
- Print each model's class (small, mid, large), vendor, and how it was classed, from the table the daemon uses (MARSH_HOME/model-classes.yaml over marsh's own). Needs no daemon. --json prints [{"model","class","vendor","how","eligible"}]. Only a model the table names is eligible; a retired one (how is retired) or one classed by price alone is shown but never picked. class, vendor and how are null for a model the table cannot class.
- kit install NAME [REPOSITORY:TAG|REPOSITORY@sha256:DIGEST]
- Register a published Kit under NAME in this scope. A tag is resolved to its digest now; only that digest runs. Without a reference, NAME must be a Kit marsh knows by name: hermes.
- kit uninstall NAME
- Remove a Kit added with kit install (a removed hermes is not added again until installed), or return an updated packaged command to the version this marsh shipped.
- workers stop KIT[,KIT...]|all [--json]
- Stop idle Kit VMs and keep them, with their disk and the Kit image cached in them. The Kit's next job, or --load KIT, starts the same VM again. A VM with running jobs, or held by an attached shell that ran the Kit, is not stopped: marsh prints how many jobs run, cancels nothing, and exits 1. A stopped VM is still removed after vm-idle-days unused.
- workers reset KIT[,KIT...]|all
- Remove idle Kit VMs, including quarantined ones. The next use creates a new VM. KIT may also be the name of a kit install that failed: that removes the VM its create left, also after a restart or when the create landed late; while the install still runs it refuses (still running), and all skips it. workers reset cloud deletes every Docker Cloud sandbox this daemon owns and verifies they are gone, except detached runs' sandboxes; with --detached those runs are discarded too.
- docker status [--json]
- Print which projects have Docker on, and for each project that has a Docker VM, and for the current project, its folder, state (off, stopped, starting, ready, or unavailable with a reason) and VM name. --json prints the marsh.services/v1 document, which adds per project the containers, the published ports, and internet (on, governed, effective). Host only: a job or the shell cannot run any docker command (or its alias services).
- docker start [--json]
- Create the current project's Docker VM if needed and wait until it is ready. Needs Docker on for the project. The VM is otherwise created the first time a job or shell of the project uses Docker.
- docker stop [--json]
- Stop the current project's Docker VM. Its disk and data are kept.
- docker rm [--yes] [--json] [--project FOLDER]
- Remove the current project's Docker VM and its Docker disk: every container, volume and image in it, every lane's containers, and the saved Docker data of the project's checkpoints. Asks first on a terminal; with no terminal it needs --yes. This is the only way, besides reset --include-services, that Docker data is deleted. --project FOLDER names the old folder of a project that was moved or deleted (docker status marks those); for a folder that is gone it only accepts the exact folder of a Docker VM marsh made (a folder on a drive that is not mounted looks gone too); for one that exists it acts like docker rm run there.
- docker internet on|off [--json]
- Grant or revoke Internet for the current project's Docker containers. The default is off: containers cannot open connections out and name lookups fail; image pulls from Docker Hub and ghcr.io still work (Docker makes them itself). Turning it on opens every registry for pulls. A network policy that marsh did not create (organization, global, or for that VM) governs: the command is refused, names the rule, and docker status --json shows internet.governed. Builds through BuildKit are not covered by the off gate. See https://runmar.sh/docs/docker.html#internet.
- docker hold SECONDS [--json], docker release HOLDER [--json]
- Keep the current project's Docker VM awake for SECONDS, and release that hold. They exercise the idle timer and are not needed in normal use.
- reset [--include-services [--yes]] [--json] [--detached]
- Remove the Kit and shell VMs this scope owns (detached cloud runs are kept unless --detached is given). The daemon keeps running. Docker VMs, and their data, are skipped. With --include-services, first list the projects whose Docker VM, Docker disk and data would be deleted and ask for confirmation; with no terminal, --yes is required, otherwise it prints the list, deletes nothing, and exits 1. Refuses while shells or jobs are active. The guest home and results are kept. Exits nonzero if any cleanup could not be verified.
- stop [--force] [--json] [--detached]
- Remove the Kit and shell VMs this scope owns (detached cloud runs are kept, and collected when the daemon starts again, unless --detached is given) and stop its daemon. Docker VMs are stopped, not removed: their disks and data stay. Refuses while shells or jobs are active, and while another request runs (for example a kit install whose VM create hangs). With --force, it first cancels every VM create in flight and waits up to 30 seconds for the requests to end; a cancelled VM that still appears later is removed by workers reset NAME or the next stop. The guest home and results are kept. Exits nonzero if any cleanup could not be verified. With no daemon running, reset and stop start it when this scope has VMs recorded, then remove them; with none they print nothing to stop (nothing to reset) and exit 0.
- restart
- Restart this scope's daemon on the installed marsh, keeping the VMs it owns. Refuses while shells or jobs are active. A daemon switches to a newer installed marsh by itself once idle; use restart for an older one (a downgrade), which it never switches to by itself.
- init
- Create the guest home (~/.marsh/home by default) if it is missing. When it has no .gitconfig, copy your git name and email from this Mac into one, so commits made in the shell and by agents have an author. Only those two values are copied, and an existing .gitconfig is never changed. marsh does this the first time it starts a session; init reports what it did.
- recover-home SLOT --discard
- Discard a retained --ephemeral-home slot (0 to 15).
- mcp install codex|claude|sbx
- Register marsh as an MCP server for this project. codex and claude launch it on demand; sbx gives selected sandboxes a shared per-project host broker. Run this on the Mac. The server uses a separate managed scope root rather than the CLI's default home.
- mcp install-published codex NAME, mcp remove-published codex NAME
- Register or remove a published pipeline as a tool for host Codex. Only codex is supported. Run on the Mac from the publishing project with the same MARSH_HOME. Removing the registration does not revoke the publication.
- mcp serve [MCP_OPTIONS...]
- Serve MCP over stdio from a host process. Without --scope-root or --home, use the CLI's selected home and disable creation of managed scopes.
- mcp export-serve [MCP_OPTIONS...] --declaration PATH
- Serve only the tools in a publication declaration. --tool NAME selects one operation from a bundle. Requires --home.
- mcp start, mcp stop
- Start or stop the project's host MCP broker. stop refuses while a sandbox is attached.
- mcp load NAME --sandbox SANDBOX
- Load an existing publication into a running same-user sandbox. Does not replace the publication or invalidate other clients.
- mcp unpublish NAME
- Revoke a publication, including calls from clients that already loaded it.
- acp install-published codex NAME, acp remove-published codex NAME
- Register or remove a published ACP control tool with host Codex. Only codex is supported. Run on the Mac from the publishing project with the same MARSH_HOME.
- help [COMMAND]
- Show general help or help for a host command that has a help section.
MCP SERVER OPTIONS
- --workspace PATH
- Manage this project directory. Defaults to the current directory.
- --scope-root PATH
- Use a private root for separate managed scopes.
- --home PATH
- Use one MARSH_HOME, with managed-scope creation disabled. Cannot be combined with --scope-root.
- --marsh PATH, --sbx PATH
- Select the installed marsh and stock Docker Sandboxes executables.
- --allow-full-sbx-control
- Enable fixed repository qualification gates on the Mac. These execute the project's Makefile; use only with a trusted checkout. Does not enable a generic host-command tool.
SHELL COMMANDS
Inside the shell, these commands are also available:
- ps --marsh [--verbose|--json], top --marsh [--verbose] [--once]
- Show this project's shell, Kit jobs, and ACP sessions. top --marsh cannot show CPU or memory.
- acp reserve AGENT
- Reserve a session ID for this shell and print it. Start the session within 15 seconds or reserve again.
- acp run [--reservation ID] AGENT &
- Start an agent session as a background Kit job. Print its session and job IDs to stderr when ready.
- acp list [--mine] [--wait [ID]] [--json]
- List this project's sessions. --mine selects those this shell started. --wait waits at most four minutes for readiness; without an ID it requires exactly one live session. Use a reserved ID to wait for a new one.
- acp ask ID TEXT
- Send a prompt and print the answer. A sole - reads UTF-8 stdin. Text and its encoded control messages must each fit 1 MiB. After an uncertain failure, inspect acp status before retrying through acp prompt --key with the reported key and identical text.
- acp prompt [--key UUID] ID TEXT
- Submit a prompt without waiting for the answer; - reads stdin as for ask. Use status to read updates. Reuse a key only with identical text.
- acp status ID [CURSOR] [--json]
- Show state, agent updates, and pending permissions. Pass the JSON reply's next_cursor back unchanged to read only newer updates.
- acp permissions ID [--json]
- List requests awaiting one-time approval and the options for answering them.
- acp respond ID REQUEST OPTION
- Answer a pending permission request with one of its offered options.
- acp cancel ID
- Cancel the current turn without stopping the session.
- acp attach ID, acp release ID
- Take control of an unowned session or release this shell's control.
- acp stop ID
- Stop the session and its Kit job.
- acp publish ID --name NAME [--kit KIT|--sandbox SANDBOX]
- Publish an idle session as an MCP control tool. Callers can prompt, cancel, and answer one-time permissions. With a target, load it there immediately; start a new client agent session to discover it.
- acp unpublish NAME
- Revoke the control tool. Unpublish before steering the agent from its shell.
ACP usage errors exit 2. Other failures print acp: MESSAGE and exit 125. See https://runmar.sh/docs/acp.html.
- mcp publish NAME [--description TEXT] [--kit KIT|--sandbox SANDBOX] -- 'PIPELINE'
- Publish a fixed pipeline as an MCP tool. With --kit or --sandbox it is loaded there now. With neither, every agent Kit VM created from now on loads it before its first job. Kit VMs already running are not changed; use mcp load NAME --kit KIT to load into one now.
- mcp load NAME --kit KIT|--sandbox SANDBOX
- Load an existing publication into the named Kit VM or running sandbox.
- mcp unpublish NAME
- Revoke the tool everywhere it was loaded.
- split { label: commands ... } | join [--keep] [| CMD], fanout { ... } | collect
- Brush forms of split and fanout.
ENVIRONMENT
- MARSH_HOME
- Absolute path of the scope root. The guest home is $MARSH_HOME/home. Default ~/.marsh.
- MARSH_SHELL
- The shell to run (bash, zsh, or marsh). --shell overrides it.
- MARSH_SBX
- Path to the stock sbx executable. Default: sbx on PATH. A bare name (no /), like the default, is looked up only on the absolute entries of PATH; empty and relative entries such as . are skipped, so a file in the current directory is never used. A relative path is taken against the directory marsh starts in. If there is no sbx, install Docker Sandboxes with brew install docker/tap/sbx, then run sbx login.
- MARSH_DOCKER
- The Docker CLI the daemon reads Kit images and builds local Kits with. Default: docker. Docker runs with the PATH /usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin, so a bare name is looked up only there, not on your shell's PATH, and the daemon does not start if it is not found; give the absolute path of a Docker CLI installed elsewhere.
- MARSH_SPAWN
- Comma-separated registered names that jobs started from this shell may start, or none. A job cannot widen the list.
- MARSH_CONTROL_HOME
- Host-only state root: scope control directories and MCP/ACP publications live under it. Default: control directories in ~/Library/Application Support/marsh/control, publications in ~/Library/Application Support/marsh.
- MARSH_DAEMON_JOBS, MARSH_JOB_CHILDREN, MARSH_TREE_DEPTH, MARSH_TREE_KIT_VMS, MARSH_TASKS_LIVE, MARSH_TREE_LAUNCH_RATE, MARSH_JOB_CPU_MILLIS, MARSH_JOB_MEMORY_BYTES, MARSH_JOB_PIDS, MARSH_JOB_WRITABLE_BYTES, MARSH_JOB_OUTPUT_BYTES, MARSH_JOB_WALL_SECONDS
- Job limits, read when the daemon starts; they win over marsh config limit until it restarts without them.
- MARSH_PLACE
- Placement for registered commands. Only local is accepted.
- MARSH_AUTO_UPDATE
- 0 (or off) when the daemon starts turns off automatic Kit updates and the adding of hermes, as marsh config auto-update off does.
- MARSH_OPEN_URLS
- 0 (or off) when the daemon starts stops xdg-open in a shell or job from opening links on the Mac, as marsh config open-urls off does.
- MARSH_CLOUD_CHILDREN
- The most agent sandboxes one detached cloud run may start with config cloud-delegate on (1 to 64, default 8), read when the daemon starts.
- MARSH_SERVICES_IDLE_SECONDS
- Seconds a Docker VM with no job or shell using it keeps running before it is stopped, read when the daemon starts. It overrides marsh config services-idle-seconds (default 900).
- MARSH_OPEN_COMMAND
- The program the daemon runs as PROGRAM URL to open a link, read when the daemon starts. Default /usr/bin/open. A bare name is looked up on the absolute entries of your PATH (never . or other relative entries); if it is not found there, links are not opened.
FILES
- $MARSH_HOME/home (default ~/.marsh/home)
- Backing store for the guest home.
- $MARSH_HOME/config.json (default ~/.marsh/config.json)
- The default shell set by marsh config shell, and the marsh config auto-update, marsh config open-urls and marsh config cloud-delegate settings, the job limits set by marsh config limit, and the services settings: services_projects (the projects services are on for), services_disk_size and services_idle_seconds.
- $MARSH_HOME/sbxenv.yaml, $MARSH_HOME/sbxenv.d/\.yaml, *$MARSH_HOME/sbxenvs/NAME.yaml
- Optional shared and per-command MCP servers and extra directories. Reloaded while the daemon runs; an invalid change keeps the last good configuration and shows in marsh status. See https://runmar.sh/docs/configuration.html#servers-and-extra-directories.
- ~/Library/Application Support/marsh/control/HASH/
- Host-only control directory for a scope: commands.json, the results journal. marsh status prints its path.
- PREFIX/libexec/marsh/
- Linux guest binaries, the packaged command registry, and the shell image reference.
- .marsh/split/ID/out/
- Results of a split, inside the project.
EXIT STATUS
As for Bash, with these additions:
- 0-255
- Registered commands return the container's exit status.
- 125
- A job start was refused. The reason is on stderr. acp failures also exit 125.
- 126
- A registered-name link was refused because MARSH_SPAWN excludes the name. marsh run returns 125 for the same refusal.
- 130
- The job was interrupted.
EXAMPLES
Start a shell in a project:
cd ~/src/project && marsh
Ask two agents for independent fixes in private copies and look at both:
marsh split -n ::: a claude -p 'fix the flaky test' \
::: b pi -p 'fix the flaky test' | marsh join --keep
join prints, for each branch, a header, its output, and a line giving the files changed and the path of its diff.patch. --keep retains the patches for inspection and git apply; a successful bare join removes them. After applying a patch, remove the retained split with marsh splits rm ID. Sample output: https://runmar.sh/docs/split.html.
Talk to one agent across turns, inside the shell:
id=$(acp reserve pi)
acp run --reservation "$id" pi &
acp list --mine --wait "$id"
acp ask "$id" 'What project files can you see? Do not change files.'
acp ask "$id" 'Which of those describe how to run the tests? Do not change files.'
acp stop "$id"
Run tests and lint at once:
marsh fanout -n -b test='make test' -b lint='make lint' | marsh collect
Publish a pipeline in the shell, then give it to Codex on the Mac:
mcp publish lint -- 'make lint 2>&1'
From a Mac terminal in the same project and MARSH_HOME:
marsh mcp install-published codex lint
SEE ALSO
sbx(1), bash(1)
Documentation: https://runmar.sh/docs/ (start with https://runmar.sh/docs/quickstart.html; limits and trust in https://runmar.sh/docs/security.html)
HISTORY
marsh began life as the mark shell.
BUGS
Report bugs at https://github.com/mcavage/marsh/issues.