> ## Documentation Index
> Fetch the complete documentation index at: https://docs.murmur.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# murmur each

> Spawn one agent per line of stdin using slug and description templates — a fan-out primitive for batch tasks like per-repo or per-file work.

Reads lines from stdin and [spawns](/cli/spawn) one [agent](/concepts/agents) per line. Each line is substituted into a slug template and a description template, producing a batch of agents with a single command.

## Synopsis

```bash theme={null}
murmur each [flags] <slug-template> <description-template>
```

Both `<slug-template>` and `<description-template>` use `{}` as the substitution marker. Every occurrence of `{}` in the slug template is replaced with a sanitized version of the input line (lowercased, non-alphanumeric characters replaced with dashes, truncated to 60 characters). Every occurrence of `{}` in the description template is replaced with the raw input line.

Empty lines are skipped.

## Arguments

| Name                   | Type   | Required | Description                                                                               |
| ---------------------- | ------ | -------- | ----------------------------------------------------------------------------------------- |
| `slug-template`        | string | yes      | Template for the agent slug. `{}` is replaced with the sanitized input line.              |
| `description-template` | string | yes      | Template for the agent description. `{}` is replaced with the raw input line.             |
| `--workspace`          | string | yes      | [Workspace](/concepts/workspaces) name. Can also be set in `murmur.yaml`.                 |
| `--dry-run`            | bool   | no       | Print slug/description pairs without spawning. Default: `false`.                          |
| `--agent`              | string | no       | [Agent persona](/concepts/agent-personas) for all spawned agents.                         |
| `--model`              | string | no       | Model name (e.g. `claude-opus-4-8`, `gpt-5-4`). Overrides `murmur.yaml`, implies backend. |
| `--backend`            | string | no       | Override the inferred backend. Usually unnecessary.                                       |
| `-d`                   | string | no       | Input delimiter. Default: newline (`\n`). Use `\0` for null-delimited input.              |
| `--repo`               | string | no       | Repo to clone: `URL`, `URL=base`, or `URL=base:working`. Repeatable.                      |

## Examples

### Spawn an agent for each changed file

```bash theme={null}
git diff --name-only main | murmur each --workspace backend "fix-{}" "Fix the lint errors in {}"
```

```
Spawned: fix-src-auth-middleware-ts

  To get the status of the task:                murmur status fix-src-auth-middleware-ts
  To kill the task:                             murmur kill fix-src-auth-middleware-ts
  To send a follow-up:                          murmur queue add fix-src-auth-middleware-ts "additional context"

Spawned: fix-src-api-handler-go

  To get the status of the task:                murmur status fix-src-api-handler-go
  To kill the task:                             murmur kill fix-src-api-handler-go
  To send a follow-up:                          murmur queue add fix-src-api-handler-go "additional context"

Spawned 2 agents
```

### Preview without spawning

```bash theme={null}
echo -e "auth\npayments\nbilling" | murmur each --dry-run --workspace backend "review-{}" "Review the {} module for error handling"
```

```
review-auth	Review the auth module for error handling
review-payments	Review the payments module for error handling
review-billing	Review the billing module for error handling
(3 agents)
```

### Null-delimited input

```bash theme={null}
find . -name '*.go' -print0 | murmur each -d '\0' --workspace backend "lint-{}" "Run lint on {}"
```

### Specify a model and persona

```bash theme={null}
cat issues.txt | murmur each --workspace backend --model claude-opus-4-8 --agent architect "fix-{}" "Investigate and fix: {}"
```

## Errors

| Code                      | Meaning                                                                                                               | What to do                                                                                                    |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| no items on stdin         | stdin was empty or contained only blank lines.                                                                        | Pipe at least one non-empty line into the command.                                                            |
| `--workspace is required` | No [workspace](/concepts/workspaces) was provided and none is set in `murmur.yaml`.                                   | Pass `--workspace` or set `workspace` in your `murmur.yaml`.                                                  |
| `UNAUTHENTICATED`         | Identity token is missing or expired.                                                                                 | Run [`murmur auth`](/cli/auth) or check your `murmur.local.yaml` configuration.                               |
| spawn failure             | One or more agents failed to spawn. The command prints each failure to stderr and continues with the remaining items. | Check the error message for the specific slug. The exit message shows how many succeeded and how many failed. |

## Related

* [Agents](/concepts/agents) — what agents are and how they work
* [Workspaces](/concepts/workspaces) — the workspace that resolves repos and environment
* [Agent personas](/concepts/agent-personas) — persona configuration
* [`murmur spawn`](/cli/spawn) — spawn a single agent
* [`murmur status`](/cli/status) — check agent status
* [`murmur ls`](/cli/ls) — list running agents
* [`murmur kill`](/cli/kill) — cancel an agent
