refactor: rename clawdbot to moltbot with legacy compat

This commit is contained in:
Peter Steinberger
2026-01-27 12:19:58 +00:00
parent 83460df96f
commit 6d16a658e5
1839 changed files with 11250 additions and 11199 deletions

View File

@@ -1,5 +1,5 @@
---
summary: "Where Clawdbot loads environment variables and the precedence order"
summary: "Where Moltbot loads environment variables and the precedence order"
read_when:
- You need to know which env vars are loaded, and in what order
- You are debugging missing API keys in the Gateway
@@ -7,14 +7,14 @@ read_when:
---
# Environment variables
Clawdbot pulls environment variables from multiple sources. The rule is **never override existing values**.
Moltbot pulls environment variables from multiple sources. The rule is **never override existing values**.
## Precedence (highest → lowest)
1) **Process environment** (what the Gateway process already has from the parent shell/daemon).
2) **`.env` in the current working directory** (dotenv default; does not override).
3) **Global `.env`** at `~/.clawdbot/.env` (aka `$CLAWDBOT_STATE_DIR/.env`; does not override).
4) **Config `env` block** in `~/.clawdbot/clawdbot.json` (applied only if missing).
4) **Config `env` block** in `~/.clawdbot/moltbot.json` (applied only if missing).
5) **Optional login-shell import** (`env.shellEnv.enabled` or `CLAWDBOT_LOAD_SHELL_ENV=1`), applied only for missing expected keys.
If the config file is missing entirely, step 4 is skipped; shell import still runs if enabled.