AI Coders is a Neovim plugin that gives you a right-side sidebar for chatting with multiple terminal-based coding agents such as Codex, Claude Code, or any other CLI-powered assistant. Sessions run in standard Neovim terminal buffers so you can see full streaming output, keep history per chat, and manage multiple conversations side-by-side with your code.
- Toggleable sidebar pinned on the right (default width
50). - Create as many chat sessions as you like, each backed by its own terminal buffer.
- Cycle between active chats or pick one from a quick selector.
- Visual session header in the sidebar winbar so you always know which chats are active.
- Fully configurable agent registry: give each agent a label and launch command.
- Sensible default keymaps that follow the requested
<leader>anamespace.
| Mapping | Action |
|---|---|
<leader>af |
Toggle the sidebar |
<leader>ac |
Create a new chat session |
<leader>a] |
Cycle to the next chat session |
<leader>a[ |
Cycle to the previous session |
<leader>ad |
Close the current chat |
<leader>ap |
Pick a chat from a list |
All mappings can be changed (or disabled) via setup.
Add the plugin to your AstroNvim plugins/ specification (using lazy.nvim syntax):
return {
{
"yourname/ai-coders",
lazy = false,
config = function()
require("ai_coders").setup {
sidebar = {
width = 60,
auto_focus = true,
},
agents = {
codex = {
name = "Codex",
cmd = { "codex", "--chat" },
},
claude = {
name = "Claude Code",
cmd = { "claude-code", "--chat" },
},
open_interpreter = {
name = "Open Interpreter",
cmd = { "open-interpreter", "--shell" },
},
},
}
end,
},
}Adjust the commands to match the CLIs you have installed. The plugin ships with placeholder commands for Codex (codex) and Claude Code (claude-code); if you do not have those binaries, replace them.
- Press
<leader>afto open the sidebar. A help buffer appears if no sessions are active. - Press
<leader>ac, pick an agent from the menu, and a new terminal buffer launches that agent CLI. - Use
<leader>a]/<leader>a[to cycle through chats, or<leader>apto pick from a list. - Close a chat with
<leader>ad(or:AICodersClose). Close the sidebar with<leader>af; sessions keep running in the background, so reopening the sidebar restores the last active chat.
require("ai_coders").setup {
sidebar = {
width = 50, -- sidebar width when opened
auto_focus = true, -- focus the sidebar after creating a session
focus_back = false, -- reserved for future use
stay_open = true, -- keep sidebar visible after last session closes
placeholder = true, -- show a helper buffer when no sessions exist
header = true, -- display session tabs in the winbar
},
mappings = {
toggle = "<leader>af",
new_session = "<leader>ac",
next_session = "<leader>a]",
prev_session = "<leader>a[",
close_session = "<leader>ad",
pick_session = "<leader>ap",
},
agents = {
codex = { name = "Codex", cmd = { "codex" } },
claude = { name = "Claude Code", cmd = { "claude-code" } },
},
session = {
title_format = "%s #%d",
on_session_created = function(session) end,
on_session_closed = function(session, reason) end,
on_session_activated = function(session) end,
},
}- Agents: keys are user-facing names for
:AICodersNew {agent}.cmdaccepts a string or list. - Callbacks: optional hooks for integrating with status lines or logging.
:AICodersToggle:AICodersNew [agent]:AICodersNext:AICodersPrev:AICodersClose:AICodersPick
- Persistent session history across Neovim restarts.
- Telescope integration for picking sessions and agents.
- Inline input prompt for sending commands without leaving current window.
- Optional floating-window layout.
Contributions and ideas are welcome—open an issue or pull request! 🌟