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

> Set a tenant secret by piping its value through stdin — value is encrypted server-side and never written to disk or shown in logs.

Sets a [secret](/catalog/secret) for your tenant. The [secret](/catalog/secret) value is read from stdin — it cannot be passed as a command-line argument. Once set, the [secret](/catalog/secret) is encrypted at rest and delivered to every agent VM as an environment variable.

A [secret](/catalog/secret) named `ANTHROPIC_API_KEY` is available to agents as `$ANTHROPIC_API_KEY`. See [profiles and secrets](/concepts/secrets) for how [secrets](/catalog/secret) are delivered to agents.

## Synopsis

```bash theme={null}
<value> | murmur secret set <NAME>
```

The value must be piped through stdin. Running `murmur secret set` in an interactive terminal without piped input returns an error.

## Arguments

| Name   | Type   | Required | Description                                                                                                                                                                                          |
| ------ | ------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `NAME` | string | yes      | The [secret](/catalog/secret) name. Must match `[A-Z][A-Z0-9_]*` — uppercase letters, digits, and underscores, starting with a letter. This name becomes the environment variable name on agent VMs. |

## Examples

### Set an API key

```bash theme={null}
echo "sk-ant-abc123" | murmur secret set ANTHROPIC_API_KEY
```

```
Set secret "ANTHROPIC_API_KEY"
```

### Set a secret from a file

```bash theme={null}
cat ~/credentials/npm-token.txt | murmur secret set NPM_TOKEN
```

```
Set secret "NPM_TOKEN"
```

### Overwrite an existing secret

Setting a [secret](/catalog/secret) that already exists replaces the value. There is no confirmation prompt.

```bash theme={null}
echo "sk-ant-new-key" | murmur secret set ANTHROPIC_API_KEY
```

```
Set secret "ANTHROPIC_API_KEY"
```

## Errors

| Code               | Meaning                                                                                         | What to do                                                                                         |
| ------------------ | ----------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `INVALID_ARGUMENT` | `secret name "foo" must match [A-Z][A-Z0-9_]*`                                                  | Use uppercase letters, digits, and underscores only. The name must start with a letter.            |
| `INVALID_ARGUMENT` | `secret name "MURMUR_X" is reserved (MURMUR_* is internal)`                                     | Choose a name that does not start with `MURMUR_`.                                                  |
| `INVALID_ARGUMENT` | `secret name "GH_TOKEN" is reserved — it is automatically populated from the developer profile` | `GH_TOKEN` is provided automatically. You do not need to set it.                                   |
| `INVALID_ARGUMENT` | `plaintext_value is required`                                                                   | The piped input was empty. Provide a non-empty value.                                              |
| —                  | `secret value must be piped via stdin`                                                          | You ran the command interactively. Pipe the value — e.g. `echo "value" \| murmur secret set NAME`. |
| `UNAUTHENTICATED`  | Identity token is missing or expired.                                                           | Run `murmur auth` or check your `murmur.local.yaml` configuration.                                 |

## Related

* [`secret`](/catalog/secret) — catalog resource reference
* [Profiles and secrets](/concepts/secrets) — concept overview
* [`murmur secret ls`](/cli/secret-ls) — list [secret](/catalog/secret) names
* [`murmur secret rm`](/cli/secret-rm) — delete a [secret](/catalog/secret)
