Skip to content

The agent that grows with you

docs(config): scope the .env routing claim to registered env settings

teknium1da9810387db6
diff --git a/website/docs/reference/cli-commands.md b/website/docs/reference/cli-commands.md
index d321a7cd717..2274d59cfc2 100644
--- a/website/docs/reference/cli-commands.md
+++ b/website/docs/reference/cli-commands.md
@@ -1228,7 +1228,7 @@ Subcommands:
| `show` | Show current config values. |
| `edit` | Open `config.yaml` in your editor. |
| `get <key> [--json] [--raw]` | Print a single config value by dotted key (e.g. `hermes config get model.default`). `--json` emits machine-readable output. Credential-shaped values (`api_key`, `*_TOKEN`, `*_SECRET`, `password`, …) are masked (`sk-o...7890`) because the agent runs this from sessions whose transcripts persist; `--raw` prints the real value (or set `security.redact_secrets: false`). |
-| `set <key> <value> [--force]` | Set a config value. Dotted paths go to `config.yaml`; API keys and every documented environment variable (`OPENROUTER_API_KEY`, `DISCORD_HOME_CHANNEL`, `*_ALLOWED_USERS`, …) go to `.env` — the same file the platform setup flows and `/sethome` write. An unknown path under a known section (`gateway.discord.foo`) is refused with a did-you-mean and nothing is written; an unknown *top-level* key is written with a notice (top-level scalars are bridged into the environment for skills). `--force` writes either. |
+| `set <key> <value> [--force]` | Set a config value. Dotted paths go to `config.yaml`; API keys and the environment settings Hermes registers (`OPENROUTER_API_KEY`, `DISCORD_HOME_CHANNEL`, `*_ALLOWED_USERS` and the other platform `*_HOME_CHANNEL` / `*_ALLOWED_USERS`-style names) go to `.env` — the same file the platform setup flows and `/sethome` write. An unknown path under a known section (`gateway.discord.foo`) is refused with a did-you-mean and nothing is written; an unknown *top-level* key is written with a notice (top-level scalars are bridged into the environment for skills). `--force` writes either. |
| `unset <key>` | Remove a config key, reverting it to the built-in default. For `.env`-routed names this also drops a stale top-level `config.yaml` copy. |
| `path` | Print the config file path. |
| `env-path` | Print the `.env` file path. |
diff --git a/website/docs/reference/environment-variables.md b/website/docs/reference/environment-variables.md
index c46c308efa1..69528c303f6 100644
--- a/website/docs/reference/environment-variables.md
+++ b/website/docs/reference/environment-variables.md
@@ -948,5 +948,5 @@ These go in `~/.hermes/config.yaml` under the `provider_routing` section:
| `data_collection` | `"allow"` (default) or `"deny"` to exclude data-storing providers |
:::tip
-Use `hermes config set` to set environment variables — every variable documented on this page (and any platform `*_HOME_CHANNEL` / `*_ALLOWED_USERS` style setting) is saved to `.env`, the same file the setup flows write; dotted `config.yaml` settings go to `config.yaml`.
+Use `hermes config set` to set environment variables — API keys, the optional variables Hermes registers, and any platform `*_HOME_CHANNEL` / `*_ALLOWED_USERS`-style setting are saved to `.env`, the same file the setup flows write; dotted `config.yaml` settings go to `config.yaml`.
:::
diff --git a/website/docs/user-guide/configuration.md b/website/docs/user-guide/configuration.md
index f6c4490efe1..570341c1253 100644
--- a/website/docs/user-guide/configuration.md
+++ b/website/docs/user-guide/configuration.md
@@ -47,7 +47,7 @@ hermes config set OPENROUTER_API_KEY sk-or-... # Saves to .env
```
:::tip
-The `hermes config set` command automatically routes values to the right file — API keys and every documented environment variable (`DISCORD_HOME_CHANNEL`, `TELEGRAM_ALLOWED_USERS`, …) are saved to `.env`, dotted settings to `config.yaml`. A misspelled path under a known section (`gateway.discord.foo`) is refused with a did-you-mean before anything is written; pass `--force` to write it anyway.
+The `hermes config set` command automatically routes values to the right file — API keys and the environment settings Hermes registers (`DISCORD_HOME_CHANNEL`, `TELEGRAM_ALLOWED_USERS`, …) are saved to `.env`; other bare ALL-CAPS names are written to `config.yaml` as top-level scalars with a notice, dotted settings to `config.yaml`. A misspelled path under a known section (`gateway.discord.foo`) is refused with a did-you-mean before anything is written; pass `--force` to write it anyway.
:::
## Configuration Precedence