explaingit

compuficial/grok.nvim

Analysis updated 2026-05-18

2LuaAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

A Neovim plugin that runs the Grok Build AI coding assistant in a sidebar, with file edits shown as a native diff you can accept or reject.

Mindmap

mindmap
  root((grok.nvim))
    What it does
      Grok Build in sidebar
      Native diff review
      Editor matching theme
    Tech stack
      Lua
      Neovim
      Grok CLI
    Use cases
      Chat in editor
      Accept or reject edits
      Send selections
    Audience
      Developers
    Setup
      Install grok CLI
      Plugin manager

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Chat with Grok Build inside a Neovim sidebar instead of switching to a terminal.

USE CASE 2

Review AI-proposed file edits as a native diff before accepting or rejecting them.

USE CASE 3

Send a visually selected block of code or a file mention straight into a Grok prompt.

USE CASE 4

Switch the AI panel's theme to match your existing Neovim colorscheme.

What is it built with?

LuaNeovimGrok CLI

How does it compare?

compuficial/grok.nvimagalaxie/battlegroundtargets-coaduguyue100/planning.nvim
Stars222
LanguageLuaLuaLua
Setup difficultyeasyeasyeasy
Complexity2/51/51/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Requires the grok CLI installed and available on your system path.

MIT license: use, modify, and share freely, including for commercial purposes, as long as you keep the copyright notice.

In plain English

grok.nvim is a plugin for the Neovim text editor that puts Grok Build, the coding assistant from xAI, directly inside your editor as a sidebar. Instead of switching to a separate terminal window to talk to the AI, you open a split panel that runs the real Grok command line tool, so you get the same slash commands, file pickers, and permission prompts you would get outside the editor. The main feature is how it handles file edits. When the AI wants to change a file, the proposed change shows up as a normal Neovim diff view instead of just applying silently. Pressing one key accepts the change, another key rejects it, and the AI is told why if you reject it. This gate can be turned off if you want the AI to make changes automatically without asking each time. The plugin also matches whatever color theme you already use in Neovim, so the AI panel does not look out of place, and it lets you jump between windows with the usual Ctrl plus h, j, k, l shortcuts from inside the sidebar. Files the AI edits on disk are reloaded automatically in any open buffer, and you can send a selected block of code or mention a specific file into your prompt without leaving the editor. To use it you need Neovim version 0.10 or newer and the grok command line tool installed and available on your system path. It works with common Neovim plugin managers such as lazy.nvim, packer.nvim, vim-plug, and mini.deps, or it can be installed manually as a native package with no plugin manager at all. The project is small, written in Lua, and released under the MIT license.

Copy-paste prompts

Prompt 1
Help me install grok.nvim with lazy.nvim and set the theme to tokyonight.
Prompt 2
Show me how to bind default keymaps for grok.nvim under my own leader key.
Prompt 3
Explain how the diff review gate in grok.nvim works and how to disable it.
Prompt 4
Write a native package install command for grok.nvim without a plugin manager.

Frequently asked questions

What is grok.nvim?

A Neovim plugin that runs the Grok Build AI coding assistant in a sidebar, with file edits shown as a native diff you can accept or reject.

What language is grok.nvim written in?

Mainly Lua. The stack also includes Lua, Neovim, Grok CLI.

What license does grok.nvim use?

MIT license: use, modify, and share freely, including for commercial purposes, as long as you keep the copyright notice.

How hard is grok.nvim to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is grok.nvim for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.