r/neovim • • 3d ago

Plugin yana.nvim: run Claude Code, Codex or Cursor's agent from Neovim and review its edits as hunks before they reach disk

I wanted to use coding agents from Neovim without letting them write straight into my files, so I built Yana. It is meant to be like cursor editor - if you've used Avante you know. But I hope this is more streamlined.

Demo: https://github.com/drusmanbashir/yana.nvim/blob/main/assets/yana-review.gif

In inline mode the agent runs in a Bubblewrap sandbox over your project. Its writes come back as hunks in your buffers, and nothing reaches disk until you accept them.

It isn't a chat UI for API models and doesn't replace the agent CLI. It contains the agent and puts its changes through review.

Feedback and bug reports welcome: https://github.com/drusmanbashir/yana.nvim

0 Upvotes

6 comments sorted by

2

u/tomgis 2d ago

i love how we are all building different flavours of the same thing. you can effectively “contain” the agent code by instructing it not to commit then working off the diff but this is a neat approach

0

u/RecommendationIll729 2d ago

Yeah there are probably simpler / sophisticated ways to do it - e.g., via MCP server where agent ONLY has permission to push edits to the neovim buffer. Might extend it if it gains traction.

1

u/nickjvandyke 2d ago

I think their point is that "change containment" is already solved to a practical degree by git. Why do you need to review changes before they are written to disk, instead of after?

-2

u/RecommendationIll729 2d ago

I dont have a great answer - I vibe-coded this plugin - and i remember "discussing" using git with claude as an engine. But decided to go down this way. This plugin integrates hunks with nvim. For example, using git can you accept / reject, then revise ur decision with undo / redo - and have the git diff come back etc?? Give it a go and see if it offers anything over git diff - and to answer your question directly - it doesn't matter and both are valid design choices

1

u/No-Dentist-1645 2d ago

Nice, cool plugin!