A Neovim plugin to seamlessly integrate the Gemini CLI.
Screen.Recording.2025-07-03.at.11.46.09.mov
- Toggle the Gemini CLI in a split window (vertical or horizontal).
- Automatically checks if the
gemini
CLI is installed on startup. - Prompts to install the
gemini
CLI if it's missing. - Sets the
EDITOR
environment variable tonvim
for the Gemini CLI session, so you can use Neovim to edit files from within Gemini.
- Neovim >= 0.7.0
- Node.js and npm (for the Gemini CLI)
{
"jonroosevelt/gemini-cli.nvim",
config = function()
require("gemini").setup({
split_direction = "horizontal", -- optional: "vertical" (default) or "horizontal"
})
end,
}
use {
"jonroosevelt/gemini-cli.nvim",
config = function()
require("gemini").setup({
split_direction = "horizontal", -- optional: "vertical" (default) or "horizontal"
})
end,
}
Plug 'jonroosevelt/gemini-cli.nvim'
And then in your init.lua
:
require('gemini').setup()
The plugin can be configured with the following options:
require('gemini').setup({
split_direction = "horizontal", -- "vertical" (default) or "horizontal"
})
split_direction
: Controls how the Gemini CLI window opens"vertical"
(default): Opens in a vertical split (side by side)"horizontal"
: Opens in a horizontal split (top and bottom)
require('gemini').setup() -- or
require('gemini').setup({
split_direction = "vertical"
})
require('gemini').setup({
split_direction = "horizontal"
})
- Use the keymap
<leader>og
to open and close the Gemini CLI window. - In visual mode, select one or more lines and use the keymap
<leader>sg
to send the selected text to the Gemini CLI. If the CLI window is not open, a floating message will prompt you to open it first.
When you first run the plugin, it will check if you have the gemini
CLI installed. If not, it will prompt you to install it.