Repository navigation
Environment variables
Environment variables read by malac, malac-control and the install script.
| 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.
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.
| 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. |
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 |
| Variable | Meaning |
|---|---|
MALAC_SIGN_IDENTITY |
A "Developer ID Installer" identity for scripts/package.sh --pkg to sign the macOS package. See Releasing. |
Getting started
Tutorials
- Tutorials
- Tutorial 1: Your first task
- Tutorial 2: Delegating to subagents
- Tutorial 3: Automating a browser
- Tutorial 4: Long-term memory with Milvus
- Tutorial 5: Running malac unattended
- Tutorial 6: Customizing malac
- Tutorial 7: Running malac on a server
Using malac
- Workspaces, tabs and the daemon
- The terminal UI
- Plain mode and scripting
- Sessions
- Jobs
- Permissions and autopilot
- Subagents
- Memory
- Project context
- Plugins and marketplaces
- Computer and browser control
- Web UI
- VS Code
- Remote access
- Mobile (preview)
- MCP servers
- Configure malac by asking
- Updating
Reference
- CLI
- Slash commands
- Configuration
- Tools
- Control service tools
- JSON events
- Protocol
- Environment variables
Guides
- Using an LLM gateway
- Running models locally
- Vector memory with Milvus
- Controlling a remote machine
- Writing agent types, skills and commands
- Security model
- Things to know
Project