Everything K-culture — comebacks to K-beauty, straight to your inboxGet it in your inbox

METAL MEDIA

zgs225/pi2.nvim

12LuaMIT

A Neovim plugin lets you run the pi coding agent inside the editor, with far more features than the project it was forked from

pi2.nvim is a Lua plugin that runs the pi coding agent in the background so you can chat with it, review its proposed edits, and manage sessions without leaving Neovim. It forks alex35mil/pi.nvim and adds a long list of features the original doesn't have, like a direct shell mode, a session tree, and image attachments. The project renamed itself pi2.nvim but kept the same commands and internal names for compatibility.

What it does

  1. It launches `pi --mode rpc` in the background, letting you send prompts from a Neovim chat panel and review the agent's proposed code changes in a two-way diff before applying them.
  2. Compared to the original alex35mil/pi.nvim (frozen at the fork point), it adds features not in upstream: a direct bash mode (`!`) to run shell commands from the prompt, a session tree (`:PiTree`) to jump back to past conversation points, a live sessions dashboard (`:PiSessions`), and clipboard image paste.
  3. Commands like `:Pi`, `:PiContinue`, and `:PiResume` open or resume sessions, and `@mention` syntax lets you point the agent at specific files or code ranges.
  4. It requires Neovim 0.10+ and pi 0.65.2+, and its default chat renderer depends on a separate plugin, render-markdown.nvim.
  5. The repository currently has 12 stars and was split off from a long-running fork into its own independently evolving project.

Why it matters

It gives developers a way to collaborate with an AI coding agent directly inside their editor instead of switching to a terminal or browser, which matters for anyone building an AI-assisted coding workflow. Its emphasis on session management and safe diff review is relevant to teams who want more control when letting an AI agent touch their codebase.

Terms in this repo

  • RPC mode · a way for two programs to communicate by calling each other's functions remotely, often over a pipe or socket
  • diff review · a side-by-side comparison of code before and after a change, used to check edits before accepting them
  • session tree · a branching history of past conversations that lets you jump back to any earlier point
  • @mention · a syntax for pointing the agent at a specific file or line range in the chat

Repository description (English)

π², a heavily extended fork of alex35mil/pi.nvim

Open on GitHub

Trending repos

All repos →

Latest from METAL MEDIA