Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Environment Variables

The config file is the recommended way to configure meka. Environment variables are useful for operational overrides; for example, in CI pipelines, containers, or to isolate a per-project config and data directory.

These operational variables override config file values but are overridden by CLI flags.

Provider configuration is not configurable via the environment. Provider selection, model, and base URL come from the config file (with per-run --provider / --model / --base-url flags); secrets come from the database via meka provider. There are no provider env vars. This is deliberate: an ambient OPENAI_API_KEY or MEKA_PROVIDER left in the environment must never silently rebind which account a named profile bills.

meka-Specific Variables

VariableDescriptionExample
MEKA_PERMISSIONDefault permission modenone, read, write
MEKA_INSTRUCTIONSReplace [prompt].instructions for this run. Equivalent to --instructions. Used by the mekabox container wrapper to tell the agent it can install packages freely.Be terse.
MEKA_CONFIG_DIROverride the default config directory. Points at the meka directory itself (contains config.toml and skills/). The only isolation knob that works on every platform: dirs::config_dir() ignores $XDG_CONFIG_HOME on macOS/Windows./tmp/meka-test/meka
MEKA_DATA_DIROverride the default data directory (where meka.db lives). Same cross-platform escape hatch: dirs::data_dir() ignores $XDG_DATA_HOME on macOS/Windows. Useful for tests, portable installs, and per-project session isolation./tmp/meka-test/data/meka
MEKA_SANDBOX_BACKENDOverride [shell].sandbox_backend (Linux only). Pinning a value also suppresses the “install Bubblewrap” auto-resolve warning. Used by the mekabox wrapper to pin Landlock in the container without editing the read-only host config.landlock, bubblewrap
MEKA_RENDER_MODEOverride [display].render_mode. Handy for CI / non-TTY runs that want plain or no output.syntect, termimad, raw, silent

MCP Variables

VariableDescriptionDefault
MEKA_MCP_TOOL_TIMEOUTPer-call timeout for MCP tools, in milliseconds. Applies to every remote tool invocation; on timeout meka cancels the request and returns an error to the model.600000 (600s)

Logging

meka uses the tracing framework. The log level can be controlled with:

VariableDescriptionExample
RUST_LOGStandard Rust log filtermeka=debug, meka=trace

If RUST_LOG is not set, the verbosity flag (-v, -vv, -vvv) controls the level:

FlagLevel
(none)warn
-vinfo
-vvdebug
-vvvtrace

Logs are written to stderr so they do not interfere with agent output.