Skip to content

Environment Variables

All EDGECRAB_* variables are applied via apply_env_overrides() in config.rs. They override the corresponding config.yaml values at runtime.


VariableTypeDefaultDescription
EDGECRAB_HOMEpath~/.edgecrabOverride the EdgeCrab home directory
EDGECRAB_MODELstringollama/gemma4:latestDefault LLM model
EDGECRAB_MAX_ITERATIONSinteger90Max tool call iterations per session
EDGECRAB_TIMEZONEstring(system)IANA timezone (e.g. America/New_York)
EDGECRAB_REASONING_EFFORTstring""Reasoning budget: low, medium, high, xhigh
EDGECRAB_SAVE_TRAJECTORIESboolfalseLog full trajectory to file
EDGECRAB_WORKTREEboolfalseLaunch agent sessions in isolated git worktrees by default
EDGECRAB_SKIP_CONTEXT_FILESboolfalseSkip SOUL.md and AGENTS.md loading
EDGECRAB_SKIP_MEMORYboolfalseDisable memory for this session
EDGECRAB_MANAGEDboolfalseBlock all config writes (1 to enable)

VariableTypeDescription
EDGECRAB_GATEWAY_HOSTstringGateway bind host (default: 127.0.0.1)
EDGECRAB_GATEWAY_PORTintegerGateway bind port (default: 8080)
EDGECRAB_GATEWAY_WEBHOOKboolEnable/disable webhook endpoint

VariableTypeDescription
TELEGRAM_BOT_TOKENstringRequired. Auto-enables Telegram platform
TELEGRAM_ALLOWED_USERScsvComma-separated allowed Telegram usernames
TELEGRAM_HOME_CHANNELstringChat ID for proactive messages

VariableTypeDescription
DISCORD_BOT_TOKENstringRequired. Auto-enables Discord platform
DISCORD_ALLOWED_USERScsvComma-separated Discord user IDs
DISCORD_HOME_CHANNELstringChannel ID for proactive messages

VariableTypeDescription
SLACK_BOT_TOKENstringRequired (with SLACK_APP_TOKEN). Auto-enables Slack
SLACK_APP_TOKENstringRequired (with SLACK_BOT_TOKEN). Socket Mode app token
SLACK_ALLOWED_USERScsvComma-separated Slack user IDs

VariableTypeDescription
SIGNAL_HTTP_URLstringRequired (with SIGNAL_ACCOUNT). signal-cli HTTP daemon URL
SIGNAL_ACCOUNTstringRequired (with SIGNAL_HTTP_URL). Registered phone number

VariableTypeDescription
WHATSAPP_ENABLEDboolEnable WhatsApp (1, true, or yes)
WHATSAPP_MODEstringBridge mode: self-chat or any-sender
WHATSAPP_ALLOWED_USERScsvComma-separated phone numbers
WHATSAPP_BRIDGE_PORTintegerBridge port (default: 3000)
WHATSAPP_BRIDGE_URLstringOverride bridge URL
WHATSAPP_SESSION_PATHpathBridge session storage path
WHATSAPP_REPLY_PREFIXstringText prepended to all replies

VariableTypeDescription
MATRIX_HOMESERVERstringRequired. Homeserver URL (e.g. https://matrix.org)
MATRIX_ACCESS_TOKENstringRequired. Long-lived access token
MATRIX_USER_IDstringFull user ID (e.g. @edgecrab:matrix.org)
MATRIX_ALLOWED_USERScsvComma-separated Matrix user IDs

VariableTypeDescription
MATTERMOST_URLstringRequired. Server URL (e.g. https://chat.example.com)
MATTERMOST_TOKENstringRequired. Bot or personal access token
MATTERMOST_ALLOWED_USERScsvComma-separated Mattermost user IDs

VariableTypeDescription
DINGTALK_APP_KEYstringRequired. DingTalk app AppKey
DINGTALK_APP_SECRETstringRequired. DingTalk app AppSecret
DINGTALK_ROBOT_CODEstringRobot code if using multiple robots
DINGTALK_WEBHOOK_PORTintegerInbound webhook port

VariableTypeDescription
TWILIO_ACCOUNT_SIDstringRequired. Twilio Account SID
TWILIO_AUTH_TOKENstringRequired. Twilio Auth Token
TWILIO_PHONE_NUMBERstringRequired. Your number in E.164 format (e.g. +15551234567)
SMS_WEBHOOK_PORTintegerLocal webhook port (default: 8082)
SMS_ALLOWED_USERScsvComma-separated allowed phone numbers (E.164)

VariableTypeDescription
EMAIL_PROVIDERstringRequired. One of: sendgrid, mailgun, generic_smtp
EMAIL_API_KEYstringRequired for SendGrid/Mailgun; optional for SMTP
EMAIL_FROMstringRequired. Sender address (e.g. bot@example.com)
EMAIL_DOMAINstringRequired for Mailgun (e.g. mg.example.com)
EMAIL_SMTP_HOSTstringRequired for generic_smtp
EMAIL_SMTP_PORTintegerSMTP port (default: 587)
EMAIL_SMTP_USERNAMEstringSMTP username (defaults to EMAIL_FROM)
EMAIL_SMTP_PASSWORDstringSMTP password (fallback to EMAIL_API_KEY)
EMAIL_WEBHOOK_PORTintegerInbound webhook port (default: 8093)
EMAIL_ALLOWEDcsvComma-separated allowed sender addresses

VariableTypeDescription
FEISHU_APP_IDstringRequired. Feishu/Lark app ID
FEISHU_APP_SECRETstringRequired. Feishu/Lark app secret
FEISHU_WEBHOOK_PORTintegerInbound webhook port
FEISHU_WEBHOOK_HOSTstringWebhook bind host (default: 0.0.0.0)
FEISHU_WEBHOOK_PATHstringWebhook path (default: /feishu/webhook)
FEISHU_BASE_URLstringOverride Feishu API base URL
FEISHU_VERIFICATION_TOKENstringWebhook verification token
FEISHU_ENCRYPT_KEYstringWebhook payload encryption key
FEISHU_BOT_OPEN_IDstringBot’s open ID (used to filter out own messages)
FEISHU_BOT_USER_IDstringBot’s user ID (alternative to FEISHU_BOT_OPEN_ID)
FEISHU_BOT_NAMEstringBot’s display name (alternative identity filter)
FEISHU_GROUP_POLICYstringGroup chat message policy

VariableTypeDescription
WECOM_BOT_IDstringRequired. WeCom bot corp ID
WECOM_SECRETstringRequired. WeCom bot secret
WECOM_WEBSOCKET_URLstringOverride WeCom WebSocket URL

VariableTypeDescription
EDGECRAB_TTS_PROVIDERstringTTS provider: edge-tts, openai, elevenlabs
EDGECRAB_TTS_VOICEstringTTS voice name
ELEVENLABS_API_KEYstringElevenLabs API key

These are not EDGECRAB_* variables — they are standard API key env vars detected by setup.rs:

VariableProvider
OPENROUTER_API_KEYOpenRouter (default endpoint)
ANTHROPIC_API_KEYAnthropic
OPENAI_API_KEYOpenAI
GOOGLE_API_KEYGoogle Gemini
GOOGLE_APPLICATION_CREDENTIALSVertex AI (path to service account JSON)
XAI_API_KEYxAI Grok
DEEPSEEK_API_KEYDeepSeek
MISTRAL_API_KEYMistral AI
GROQ_API_KEYGroq (LPU inference)
HUGGING_FACE_HUB_TOKENHuggingFace
ZAI_API_KEYZ.AI
GITHUB_TOKENGitHub Copilot

Ollama and LM Studio require no API key (local inference only).


VariableServiceDescription
HONCHO_API_KEYHonchoEnables cloud sync (auto-sets honcho.cloud_sync: true)
HA_URLHome AssistantBase URL (enables Home Assistant tools)
HA_TOKENHome AssistantLong-lived access token
CDP_URLBrowserChrome DevTools Protocol endpoint (instead of local Chrome)

Variables marked as bool accept: 1, true, yes, on (case-insensitive) to enable. Any other value (including empty) is treated as disabled.

Variables marked as csv accept comma-separated values with optional whitespace: "user1, user2, user3".


Set a different model for one session without editing config.yaml:

Terminal window
EDGECRAB_MODEL=openai/gpt-5 edgecrab run "big refactor task"

Debug all environment overrides at startup:

Terminal window
RUST_LOG=edgecrab_core=debug edgecrab run "test" 2>&1 | grep "env override"

Disable all file-writing (read-only managed mode):

Terminal window
EDGECRAB_MANAGED=1 edgecrab run "read and summarize src/"

Run the gateway on a public interface:

Terminal window
EDGECRAB_GATEWAY_HOST=0.0.0.0 EDGECRAB_GATEWAY_PORT=8443 edgecrab gateway start

Combine multiple platforms at once:

Terminal window
export TELEGRAM_BOT_TOKEN=...
export DISCORD_BOT_TOKEN=...
edgecrab gateway start # both platforms start automatically

What order do settings merge in? Config resolution: defaults → ~/.edgecrab/config.yaml → EDGECRAB_* env vars → CLI flags. Environment variables always win over the config file, but CLI flags win over everything.