A tool-use-focused LLM plugin for neovim.
npx skills add https://github.com/dlants/magenta.nvim --skill learnInstall this skill with the CLI and start using the SKILL.md workflow in your workspace.
___ ___
/' __` __`\
/\ \/\ \/\ \
\ \_\ \_\ \_\
\/_/\/_/\/_/
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 or ask magenta for complete documentation.
It's neovim, baby! Use your muscle memory to browse agent output, gather context, and edit your prompt. Jump into a buffer to fix errors or redirect the agent โ the diff of your edits will be sent to the agent in the next message.
Magenta is fully transparent: you see everything the agent sees โ prompts, reminders, tool descriptions โ and can customize all of it. Edits use EDL, a purpose-built DSL that's far more token-efficient than claude code's str_replace. The useful parts of claude code (context management, sub-agents, skills, custom agents) are all present, so you won't miss anything.
And also apparently the code quality is a lot better?
I haven't actually used other neovim AI plugins in a while, so take this with a grain of salt. My feeling is that magenta provides a richer set of features, nicer UI and more customizability than other plugins. Using a typescript core means we can leverage the anthropic sdk and libraries like anthropic's sandbox-runtime, which greatly speeds up development. The distinguishing features:
~/.magenta/agents/ or .magenta/agents/). Override or create new agent personalities without touching code.dd binding to delete thread subtrees.~/.magenta/agents/ or .magenta/agents/), making them easy to customize and override.docs tool: renamed from learn, now surfaces built-in :help magenta docs and discovers user-created documentation.requireApprovalPatterns: regex patterns (e.g. git\s+push) that trigger approval prompts before running a command. Defaults to ["git\\s+push"].@anthropic-ai/sandbox-runtime (seatbelt on macOS, bubblewrap on Linux) with sensible defaults protecting 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.authType = "keychain" profile option (macOS) reuses the Anthropic Console API key that Claude Code stores in the login Keychain, for users on the "Anthropic Console Account (API usage billing)" sign-in mode.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: Neovim 0.12.1+, Node.js v24+ (node --version), nvim-cmp
Recommended: fd and ripgrep for better file discovery
{
"dlants/magenta.nvim",
lazy = false,
build = "npm run build",
opts = {},
},
Neovim 0.12.1 includes a built-in package manager. Add to your init.lua:
vim.api.nvim_create_autocmd("PackChanged", {
callback = function(ev)
if ev.data.spec.name == "magenta.nvim" and ev.data.kind ~= "delete" then
vim.system({ "npm", "run", "build" }, { cwd = ev.data.path }):wait()
end
end,
})
vim.pack.add({ "https://github.com/dlants/magenta.nvim" })
require('magenta').setup({})
require('magenta').setup({
profiles = {
{
name = "claude-opus",
provider = "anthropic",
model = "claude-opus-4-7",
fastModel = "claude-haiku-4-5",
apiKeyEnvVar = "ANTHROPIC_API_KEY"
}
}
})
For any of the below, you can also just ask magenta to explain.
:help magenta-providers.magenta/options.json for profiles, auto-context, skills paths, and MCP servers. docs ยท :help magenta-config~/.magenta/skills/, .magenta/skills/, ~/.claude/skills/, or .claude/skills/ that teach the agent project-specific knowledge. docs ยท :help magenta-skills:help magenta-sandbox:help magenta-mcp:help magenta-docker| Keymap | Description |
|---|---|
<leader>mt |
Toggle chat sidebar |
<leader>mf |
Pick files to add to context |
<leader>mn |
Create new thread |
<leader>mp |
Paste clipboard image (in input buffer) |
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 configurationThe install hooks above run npm run build to produce a single-file bundle at dist/magenta.mjs. Neovim invokes this bundle directly, which keeps startup fast by avoiding thousands of file opens through the TypeScript source tree.
When hacking on the plugin, set MAGENTA_DEV=1 in your shell (or your neovim launcher) to skip the bundle and run the TypeScript source directly via node --experimental-transform-types:
MAGENTA_DEV=1 nvim
If dist/magenta.mjs is missing (e.g. you cloned the repo without running the build), the plugin automatically falls back to source mode and prints a one-line warning.