An efficient AI coding agent extendable by neovim like Lua plugins
An efficient AI coding agent extendable by neovim like Lua plugins
An AI coding agent optimized for minimal use of context tokens, while providing a great user experience.
index tool - uses tree-sitter to parse supported programming languages to produce a high level skeleton of a file, with exact start-end lines of each item (e.g. a function's implementation is in lines 150-165). Encouraged to be used before reads. For my usage it adds 59 tok/turn but saves 224 tok/turn on read calls, saving 165 tok/turn.code_execution tool - uses monty to run an interpreter that has all other tools available as async functions. Maki uses it to filter / summarize / transform / pipe data to other tools as input, without it ever reaching and polluting the context window. Sandbox limited by time & memory.task tool - when delegating work to subagents, the AI chooses whether to run weak / medium / strong model of used provider. Think haiku / sonnet / opus.maki.setup({ agent = { rtk = false } }) in your init.lua. Saves ~50% of bash output tokens. Remember bash is just 12% of total token usage, so 6% is nice, but saving on reads (65% of total) by using index gave me more benefit. I think I'll do bash output filtering like this myself in a future release./tasks (Ctrl-X).git diff && rm -rf /, what do you think will happen in your current coding agent? It will treat it as git *. Maki uses tree-sitter to parse the bash command and figure out the permissions requested are git * and rm *. Disable using --yolo.webfetch calls.memory tool to keep long term context, just tell maki to remember something (sometimes it uses it automatically). Managed via /memory (view / edit / delete memories)./btw to run a command with the chat history without interfering with the current session.!, or !! if you want maki to not know about it./cd to change dir.--print --output-format stream-json to run UI-less. Output is compatible with Claude Code, so you can easily replace your existing solutions.ANTHROPIC_API_KEY only (using OAuth is against TOS). Bedrock supported via CLAUDE_CODE_USE_BEDROCK=1.OPENAI_API_KEY and OAuth via maki auth login openai.XAI_API_KEY and OAuth via maki auth login xai.GEMINI_API_KEY.GH_COPILOT_TOKEN or an existing GitHub Copilot sign-in at ~/.config/github-copilot/.OLLAMA_HOST for local (e.g. http://localhost:11434), or OLLAMA_API_KEY for cloud.LLAMA_CPP_HOST (e.g. http://localhost:8080), optionally LLAMA_CPP_API_KEY.MISTRAL_API_KEY.ZHIPU_API_KEY.DEEPSEEK_API_KEY.OPENROUTER_API_KEY.REQUESTY_API_KEY. Set REQUESTY_BASE_URL=https://router.eu.requesty.ai/v1 for the EU region.SYNTHETIC_API_KEY.REGOLO_API_KEY. EU-hosted open-weight models.TENSORX_API_KEY.OPENCODE_API_KEY, or the free public key for zero-cost models. Models from the models.dev catalog.OPENCODE_API_KEY. Models from the models.dev catalog.APERTURE_HOST (e.g. https://your-host.tailnet.ts.net). No API key needed, Tailscale handles auth.Dynamic providers - drop an executable script into ~/.config/maki/providers/ to add custom providers or proxies. See docs for details.
# Download and read the script first (don't blindly trust shell scripts).
curl -fsSL https://maki.sh/install.sh -o install.sh
cat install.sh
# Then run.
chmod +x install.sh && sh install.shOne-liner:
curl -fsSL https://maki.sh/install.sh | shInstalls to ~/.local/bin. Override with MAKI_INSTALL_DIR.
# Download and read the script first (don't blindly trust remote scripts).
irm https://maki.sh/install.ps1 -OutFile install.ps1
Get-Content install.ps1
# Then run.
.\install.ps1One-liner:
irm https://maki.sh/install.ps1 | iexcurl -fsSL https://maki.sh/install.sh | shBoth install to %LOCALAPPDATA%\maki and add it to your user PATH. Override with MAKI_INSTALL_DIR / $env:MAKI_INSTALL_DIR.
cargo install --locked --git https://github.com/tontinton/maki.git makinix run github:tontinton/makiOr download a pre-built binary from GitHub Releases.
Run maki acp or configure your ACP supporting editor to use maki, e.g. in Zed's settings.json:
"agent_servers": {
"Maki": {
"default_config_options": {
"model": "deepseek/deepseek-flash"
},
"type": "custom",
"command": "maki",
"args": ["acp"],
"env": {}
}
}More info at the official docs.
tontinton/makiconf - includes a semble tool (Lua code) for semantic code search, and an ast-grep MCP server for AST-based search and replace.
DISCLAIMER: >90% of code in maki was written by maki, guided by humans. Some parts of the code are not as good as what I would've made in the artisanal hand-made style. But it's also not slop / vibe coded, and can easily be refactored if needed nowadays.
No open issues yet, or sync has not completed.