Environment Variables
This page shows how to pass variables such as BASE_URL and AUTH_TOKEN to the agent CLI inside the container.
Two ways to pass them
# 1. -e on the command line: fine for quick tests (stays in shell history)
manyoyo run -e "ANTHROPIC_BASE_URL=https://xxxx" -e "ANTHROPIC_AUTH_TOKEN=your-key" -x claude
# 2. Env file with --ef: recommended, keys stay out of shell history
manyoyo run --ef /abs/path/anthropic.env -x claude--ef (and envFile in config) accepts absolute paths only. Env files are read live in a new container: they are re-read every time a command runs, so editing the file takes effect for the next command (running processes excepted); you can also add or remove them under "Environment variable files" on the web "Set container" tab. -e can be repeated.
Env file format
# Lines starting with # and blank lines are ignored
export ANTHROPIC_BASE_URL="https://api.anthropic.com"
export ANTHROPIC_AUTH_TOKEN="sk-xxxxxxxx"
API_TIMEOUT_MS=3000000 # export is optional
GREETING=hello world # spaces in a value need no quotes- Both
KEY=VALUEandexport KEY=VALUEwork; values may use single quotes, double quotes, or none; spaces in a value need no quotes (KEY=abc 123), and a matching pair of quotes around the value is removed. - The same syntax is used by the web "Environment variables" text view and
/run/manyoyo/envinside the container, so there is only one to learn. It matches docker / podman--env-file(no variable expansion, no command execution) and also accepts the shell / dotenvexportprefix and quoting. - Trailing comments are not supported:
#starts a comment only at the beginning of a line. - Names must match
^[A-Za-z_][A-Za-z0-9_]*$; values cannot contain newlines or shell special characters such as;,&,|,`,$,<,>.
Per-agent examples
mkdir -p ~/.manyoyo/env
# Claude Code
cat > ~/.manyoyo/env/claude.env << 'EOF'
export ANTHROPIC_BASE_URL="https://api.anthropic.com"
export ANTHROPIC_AUTH_TOKEN="sk-xxxxxxxx"
export ANTHROPIC_MODEL="claude-sonnet-4-5"
EOF
# Codex
cat > ~/.manyoyo/env/codex.env << 'EOF'
export OPENAI_BASE_URL="https://api.openai.com/v1"
export OPENAI_API_KEY="sk-xxxxxxxx"
EOF
# Gemini
cat > ~/.manyoyo/env/gemini.env << 'EOF'
export GEMINI_API_KEY="your-api-key"
EOFUse it with manyoyo run --ef $HOME/.manyoyo/env/claude.env -x claude, or put it in runs.<name>.envFile and run manyoyo run -r <name>. For OpenCode variables see the agent reference.
Completion bell
Claude Code in the image rings the terminal bell when a task finishes in an interactive terminal. Set the environment variable MANYOYO_CLAUDE_BELL to adjust it: 0 silent, 1 one beep, 3 three beeps (the default, also used when unset or invalid). Put it in the global config, a run profile or the container's environment variables; it takes effect on the next command. It never rings in web chat.
Which value wins
Later sources override earlier ones, in this order:
- Every layer's
envFile(global, thenruns.<name>, then--ef) - Global
env runs.<name>.env- Command-line
-e
So -e wins over runs.<name>.env, and both win over env files.
Tips
- Give files distinctive names (e.g.
claude-work.env) and split non-secret settings from keys; keep only the key file out of version control. - For secrets and access risks see Security.
MANYOYO_SERVER_USER/MANYOYO_SERVER_PASSare MANYOYO's own variables forserveauthentication; they are not injected into the container. See Web service.
Variable not taking effect?
manyoyo config show -r claude # final merged config
manyoyo run -r claude -x env | grep ANTHROPIC # values the container really gotCommon causes: the path is not absolute, the file format is invalid, or several sources set the same name.
Next
- Configuration overview: the four-layer priority
- Config files: using
envFileinruns - Examples