Environment variables
| Variable | Meaning |
|---|---|
MALAC_HOME |
malac’s home directory instead of ~/.malac: configuration, credentials, sessions, memory, browser profiles, logs. malac-control uses it too. |
MALAC_LOG |
Log filter, in tracing syntax, for example debug or malac_core=debug. Default warn. Logs go to stderr, to ~/.malac/malac.log while the full-screen terminal UI is open, and to ~/.malac/daemon.log for the background daemon. |
MALAC_WEB_TOKEN |
Token for the daemon’s web UI and API, instead of the one saved in ~/.malac/daemon.token (same as --token); applies when the daemon starts |
MALAC_WEB_DIR |
Serve the web UI’s files from this directory instead of the copies built into the binary, for UI development; set it for the daemon |
MALAC_RELEASES |
Release download base for malac update and update checks, for mirrors. Default https://github.com/lobirus/malac/releases. |
ANTHROPIC_API_KEY |
Key for the built-in anthropic provider |
OPENAI_API_KEY |
Key for the built-in openai provider |
SHELL |
The bash tool uses it when it is bash or zsh, else /bin/sh |
TERM |
The full-screen terminal UI needs it set and not dumb |
COLORTERM |
truecolor or 24bit makes the terminal UI use 24-bit color; otherwise it uses the 256-color palette |
NO_COLOR |
Any non-empty value turns the terminal UI’s colors off |
The daemon keeps the environment it was started with: after changing a variable such as an API key, run malac daemon restart.
Provider keys can come from any variable you name with api_key_env, and MCP servers, the control service and Milvus read tokens from variables named with token_env. ${VAR} references in MCP command, args, env and headers are expanded from the environment.
Set by malac
Section titled “Set by malac”Commands run by the bash tool get:
| Variable | Value |
|---|---|
MALAC |
1, so scripts can tell they run under malac |
PAGER |
cat |
GIT_PAGER |
cat |
SKILL_DIR |
The folder of the skill the agent loaded last, so its scripts run as sh "$SKILL_DIR/scripts/x.sh" |
Plugin hooks run with CLAUDE_PLUGIN_ROOT, CLAUDE_PLUGIN_DATA and CLAUDE_PROJECT_DIR, and stdio MCP servers from Agent Plugins packages get PLUGIN_ROOT and PLUGIN_DATA.
malac-control
Section titled “malac-control”| Variable | Meaning |
|---|---|
MALAC_CONTROL_TOKEN |
Token for malac-control serve, instead of a random one (same as --token) |
MALAC_HOME |
Where control.toml, control.json and browser profiles live |
RUST_LOG |
Log filter for stderr. Default info. |
Install script
Section titled “Install script”Set these for the sh side of curl … | sh:
| Variable | Default | Meaning |
|---|---|---|
MALAC_INSTALL_DIR |
~/.local/bin |
Where the binaries go |
MALAC_VERSION |
latest | Release tag to install, for example v0.2.0 |
MALAC_FROM_SOURCE |
unset | 1 to always build from source |
MALAC_REF |
main |
Branch or tag to build from source |
MALAC_SOURCE |
unset | Build this local checkout instead of cloning |
MALAC_RELEASES |
GitHub releases | Release download base, for mirrors |
Release packaging
Section titled “Release packaging”| Variable | Meaning |
|---|---|
MALAC_SIGN_IDENTITY |
A “Developer ID Installer” identity for scripts/package.sh --pkg to sign the macOS package. See Releasing. |
malac is created by lobirus and released under the MIT license. About malac