Skip to content

Quick start

This page assumes malac is installed.

If ANTHROPIC_API_KEY or OPENAI_API_KEY is already set in your environment, you can skip this step: malac has built-in anthropic and openai providers that read those variables.

Otherwise, add a provider. The key is read from stdin and stored in ~/.malac/credentials.toml, readable only by you:

printf '%s' "$OPENAI_API_KEY" | malac provider add openai \
--base-url https://api.openai.com/v1 --model gpt-5 --api-key-stdin --set-default

--set-default makes openai/gpt-5 the default model. Check what you have:

malac provider list
malac models

Configure a provider covers Anthropic, gateways and local models.

Everything after the options is the prompt. Quotes are optional:

malac explain how requests are routed in this repo

malac starts working right away. In the default ask mode, it asks before it edits a file or runs a command. Reading and searching never ask.

To let it work without asking, use autopilot:

malac -y add a --json flag to the export command and test it

Piped stdin becomes part of the prompt:

git diff | malac review this change

With -p, malac answers and exits, which is handy in scripts. See Plain mode and scripting.

malac # interactive: reopens your last workspace
malac -n # a fresh workspace
malac -c # continue the last session in this directory
malac web --open # the same sessions in your browser

Interactive sessions run in the malac daemon, which starts by itself: quitting leaves the agents working, and malac brings you back to them from any folder. A workspace holds tabs, one per project folder; malac <prompt> adds a tab for the folder you are in. See Workspaces, tabs and the daemon.

In a session, type a prompt and press Enter. The full-screen UI has menus (F9), a model picker (F4) and help (F1); see The terminal UI. Slash commands work in both interfaces:

Command What it does
/model Show or switch the model
/mode Show or change the permission mode
/agents Show subagents and what they are doing
/cost Token usage and cost of this session
/help List every command

Ctrl+C interrupts the current turn and every subagent it started. See Slash commands for the full list.

If a prompt starts with a subcommand name, malac still treats it as a prompt when it does not parse as that subcommand: malac web scraper for the docs is a prompt. malac -- <prompt> always is.

malac is created by lobirus and released under the MIT license. About malac