> ## 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 set

> Create or fully replace a catalog resource from stdin — accepts YAML or JSON; the server validates the document before committing the write.

Creates or fully replaces a [catalog](/catalog/overview) resource. The complete resource definition is read from stdin. For markdown kinds ([agent personas](/concepts/agent-personas), [flights](/concepts/flights)), pipe markdown. For all other kinds, pipe YAML.

## Synopsis

```bash theme={null}
<stdin> | murmur set <kind> <name> [--file-field field.path=filename ...]
```

## Arguments

| Name           | Type   | Required | Description                                                                                                                             |
| -------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `kind`         | string | yes      | The [catalog](/catalog/overview) resource kind. Run [`murmur describe`](/cli/describe) to list available kinds and their input formats. |
| `name`         | string | yes      | The resource name to create or replace.                                                                                                 |
| `--file-field` | string | no       | Inject file content at a dotted field path. Format: `field.path=filename`. Repeatable.                                                  |

## Input format

The command queries the server to determine whether the kind expects YAML or markdown input.

* **YAML kinds** (e.g. `workspace`, `environment`, `pool-config`) -- pipe a YAML document to stdin.
* **Markdown kinds** (e.g. `agent-persona`, `flight`) -- pipe a markdown document with YAML frontmatter to stdin. The entire input becomes the resource content.

When `--file-field` is provided, the file content is injected at the specified field path. This is useful for fields that contain large text content -- like provisioning scripts -- that are easier to maintain as separate files.

<Note>
  This is a full replace. Every field in the existing resource is overwritten by the payload. To update individual fields without replacing the resource, use [`murmur patch`](/cli/patch).
</Note>

## Examples

### Set a pool config

```bash theme={null}
echo 'max_vms: 50' | murmur set pool-config default
```

```
Set pool-config "default"
```

### Set an agent persona from a markdown file

```bash theme={null}
cat architect.md | murmur set agent-persona architect
```

```
Set agent-persona "architect"
```

### Read, modify, and write back

```bash theme={null}
murmur get environment staging | yq '.machine_type_ref = "murmur-n2-standard-16"' | murmur set environment staging
```

```
Set environment "staging"
```

### Inject a provisioning script from a file

```bash theme={null}
echo 'name: python-toolchain' | murmur set recipe python-toolchain --file-field provisioning_script=provision.sh
```

```
Set recipe "python-toolchain"
```

### Inject a nested field from a file

```bash theme={null}
echo 'name: my-recipe' | murmur set recipe my-recipe --file-field script.content=build.sh
```

The `--file-field` flag supports dotted paths for nested fields. Intermediate maps are created as needed.

## Errors

| Code                  | Meaning                                                                                                                                         | What to do                                                                                |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `UNAUTHENTICATED`     | Identity token is missing or expired.                                                                                                           | Run `murmur auth` or check your `murmur.local.yaml` configuration.                        |
| `INVALID_ARGUMENT`    | The kind is not recognized or the payload is invalid.                                                                                           | Run [`murmur describe`](/cli/describe) to check the kind's schema and input format.       |
| `FAILED_PRECONDITION` | A referenced resource does not exist (e.g. a [workspace](/concepts/workspaces) references a nonexistent [environment](/concepts/environments)). | Verify that all referenced resources exist with [`murmur get`](/cli/get).                 |
| `PERMISSION_DENIED`   | The resource is a platform builtin and cannot be overwritten.                                                                                   | Platform-managed resources are immutable. Create your own resource with a different name. |

## Related

* [Catalog](/catalog/overview) -- concept overview
* [`murmur get`](/cli/get) -- read a resource or list resources of a kind
* [`murmur patch`](/cli/patch) -- update individual fields without replacing the resource
* [`murmur rm`](/cli/rm) -- delete a resource
* [`murmur describe`](/cli/describe) -- show schema information for a kind
