___ ___
/' __` __`\
/\ \/\ \/\ \
\ \_\ \_\ \_\
\/_/\/_/\/_/
magenta is for agentic flow
Magenta provides transparent tools to empower AI workflows in neovim. It allows fluid shifting of control between the developer and the AI, from AI automation and agent-led feature planning and development.
Developed by dlants.me: I was tempted by other editors due to lack of high-quality agentic coding support in neovim. I missed neovim a lot, though, so I decided to go back and implement my own. I now happily code in neovim using magenta, and find that it's just as good as cursor, windsurf, ampcode & claude code.
I sometimes write about AI, neovim and magenta specifically:
π Also check out pkb: A CLI for building a local knowledge base with LLM-based context augmentation and embeddings for semantic search. Can be used as a claude skill.
Note: I mostly develop using the Anthropic provider, so Claude Opus is recommended. I decided to drop support for other providers for now, since I am more interested in exploring the features space. If another provider becomes significantly better or cheaper, I'll probably add it.
π Documentation: Run :help magenta.nvim in Neovim for complete documentation.
Magenta can spawn Docker sub-agents that work in isolated containers. This enables safe, unsupervised parallel work β the agent can edit files, run tests, and make commits without touching your local setup.
Docker config is specified inline when spawning sub-agents via the
spawn_subagents tool. The agent provides:
dockerfile β path to a Dockerfile relative to the working directoryworkspacePath β the working directory inside the containerThe project includes a sample Dockerfile at docker/Dockerfile. See
:help magenta-dev-containers for details.
@anthropic-ai/sandbox-runtime (seatbelt on macOS, bubblewrap on Linux) for shell commands and file I/O pre-flight checks. Configurable sandbox policy with sensible defaults that protect credentials and dotfiles..magenta/options.json is now protected from agent tampering.spawn_subagents tool calls instead of .magenta/options.json.leaf, thread, or orchestrator tiers that control spawn permissions. New worktree orchestrator agent replaces the conductor. New :Magenta agent <name> command.TEST_MODE env var splits tests into sandbox (local) and full-capabilities (docker) modes. New tests-in-sandbox subagent for fast local feedback.docs tool to learn tool.tsgo (TypeScript native Go compiler from @typescript/native-preview) for ~5x faster checks.capabilities/ layer. This decouples tools from neovim, moving towards being able to run it via server/client architecture, and dev container support.@anthropic-ai/sandbox-runtime for shell commands, with application-level pre-flight checks for file I/O. Configurable via sandbox config (filesystem and network restrictions). Graceful fallback on unsupported platforms.countTokens API.@fork: it now clones the thread. Can now fork while streaming or pending tool use, and continue the original thread afterward/tmp/magenta/threads/...) with abbreviated results sent to the model@compact command for manual thread compaction:help magenta documentationrg and fd support.claude/skills directory)@fork for thread forking with context retentionInput buffer completions with nvim-cmp
Thinking/reasoning support
Remote MCP support (HTTP/SSE)
Fast models and @fast modifier
spawn_foreach for parallel sub-agents
Requirements: Node.js v24+ (node --version), nvim-cmp
Recommended: fd and ripgrep for better file discovery
{
"dlants/magenta.nvim",
lazy = false,
build = "npm ci --production",
opts = {},
},
local vim = vim
local Plug = vim.fn['plug#']
vim.call('plug#begin')
Plug('dlants/magenta.nvim', {
['do'] = 'npm ci --production',
})
vim.call('plug#end')
require('magenta').setup({})
For complete configuration documentation, run :help magenta-config in Neovim.
require('magenta').setup({
profiles = {
{
name = "claude-sonnet",
provider = "anthropic",
model = "claude-sonnet-4-5",
fastModel = "claude-haiku-4-5",
apiKeyEnvVar = "ANTHROPIC_API_KEY"
}
}
})
See :help magenta-providers for detailed provider configuration.
Note: Other providers (openai, bedrock, ollama, copilot) were removed in Jan 2026. The new provider architecture is simpler - contributions welcome!
Skills are markdown files that teach the agent project-specific knowledge. Place them in ~/.magenta/skills/ (global) or .magenta/skills/ (project-local).
Recommended skills to create:
See :help magenta-skills for details on creating skills.
Create .magenta/options.json for project-specific configuration:
{
"profiles": [...],
"autoContext": ["README.md", "docs/*.md"],
"skillsPaths": [".claude/skills"],
"mcpServers": { ... }
}
See :help magenta-project-settings for details.
Magenta uses OS-level sandboxing to restrict shell commands and file I/O access:
Configure sandbox permissions in .magenta/options.json (project) or ~/.magenta/options.json (user):
{
"sandbox": {
"filesystem": {
"allowWrite": ["./"],
"denyWrite": [".env", ".git/hooks/"],
"denyRead": ["~/.ssh", "~/.gnupg", "~/.aws"],
"allowRead": ["~/.magenta"]
},
"network": {
"allowedDomains": ["registry.npmjs.org", "github.com"],
"deniedDomains": []
},
"requireApprovalPatterns": ["git\\s+push"]
}
}
Path matching: Literal paths (e.g., ~/.ssh) use subpath matching and block the path plus all children. Glob patterns (e.g., ~/*.rc) use regex matching.
Network: Supports domain wildcards (e.g., *.github.com).
Defaults: Conservative defaults protect credentials (~/.ssh, ~/.gnupg, ~/.aws, etc.) and shell configs (~/.bashrc, ~/.zshrc, etc.).
Pre-check patterns: requireApprovalPatterns accepts regex patterns that trigger an approval prompt before running a command, bypassing the sandbox entirely. Useful for commands like git push that should always require explicit approval.
See :help magenta-sandbox for complete documentation.
| Keymap | Description |
|---|---|
<leader>mt |
Toggle chat sidebar |
<leader>mf |
Pick files to add to context |
<leader>mn |
Create new thread |
Input commands: @fork, @file:, @diff:, @diag, @buf, @qf, @fast
For complete documentation:
:help magenta-commands - All commands and keymaps:help magenta-input-commands - Input buffer @ commands:help magenta-tools - Tools and sub-agents:help magenta-mcp - MCP server configuration:UpdateRemotePlugins! (h/t wallpants).It's neovim baby! Use your hard-won muscle memory to browse the agent output, explore files, gather context, and hand-edit when the agent can't swing it!
I've taken care to implement the best parts of claude code (context management, subagents, skills), so you shouldn't miss anything terribly.
Another thing is that magenta is a lot more transparent about what is happening to your context. For example, one major aspect of claude skills is that claude secretly litters the context with system reminders, to get the agent to actually use skills defined early in the context window. In magenta you can see everything the agent sees, and manipulate it to customize to your use case.
The closest plugins are avante.nvim and codecompanion.nvim. I haven't used either in a while, so take this with a grain of saltβboth are actively developed and may have added features since I last checked.
That said, I've spent a lot of time building magenta's abstractions around agentic coding. Here's what I think sets it apart:
Context management
spawn_subagent, spawn_foreach), then coordinate resultsOS-level sandboxing
filesystem.allowWrite, filesystem.denyRead, network.allowedDomainsProvider features
Architecture