A Neovim plugin for managing multiple background AI agents from within Neovim. Spawn, monitor, and interact with concurrent agent sessions without leaving your editor.
"Mr. Anderson, please sit down." — Agent Smith
- Spawn and manage multiple background agent instances
- Real-time streaming output
- Visual selection context support for code-aware prompts
- History management with live updates for running agents
- Floating window UI for viewing agent output
- Neovim >= 0.10.0
codexCLI tool available in PATH- Cursor Agent CLI (
agent) available in PATH (optional, forprovider = "agent") - Claude Code CLI (
claude) available in PATH (optional, forprovider = "claude")
Using lazy.nvim:
{
"ianjkaplan/smith.nvim",
}These are the default values. You only need to include options you want to change:
opts = {
-- Enable the plugin
enabled = true,
-- Enable default keymaps
keymaps = true,
-- Prefix for all keymaps (e.g., <leader>mm, <leader>mc, etc.)
keymap_prefix = "<leader>m",
-- Active provider: "codex" (default), "agent", or "claude"
provider = "codex",
}Use Codex (default):
require("smith").setup({
provider = "codex",
})Switch to Cursor Agent:
require("smith").setup({
provider = "agent",
})Switch to Claude Code:
require("smith").setup({
provider = "claude",
})All keymaps use the configured prefix (default: <leader>m):
| Mode | Keymap | Description |
|---|---|---|
| Normal | <leader>mm |
Open command palette |
| Visual | <leader>mm |
Open with selection as context |
| Visual | <leader>mM |
Open palette (selection stored but not auto-used) |
| Normal/Visual | <leader>mc |
Clear completed agents from history |
| Normal | <leader>mr |
Repeat last command |
| Normal | <leader>ml |
Show history list |
When viewing agent output or history:
| Keymap | Description |
|---|---|
q |
Close window |
<Esc> |
Close window |
d |
Delete entry from history |
b |
Go back to history list |
When using <leader>mm in visual mode, the selected text is automatically included as context in your prompt. The agent receives:
- The selected text content
- File path where the selection originated
- Line numbers of the selection
MIT. See LICENSE for details.
