r/opencodeCLI • • 2d ago

I made an OpenCode plugin that puts a diff in front of me before applying an edit

I built Mirage because I wanted a small review step for edits I care about. In OpenCode 2 CLI, I can ask the agent to send one edit through Mirage, look at the diff, then approve that proposal. A quick way to try it is to pick one tracked text file, ask for a small change through Mirage, and compare the approved preview with `git diff` afterward.

The plugin is opt-in. OpenCode’s native write tools are still there, so the review only covers edits sent through Mirage. If you use OpenCode, would you bother with this for config and migrations, or is reviewing the final Git diff enough for you?

https://github.com/MrGray17/Mirage

4 Upvotes

3 comments sorted by

7

u/Equal-Move-4971 2d ago

Why do projects like these never have screenshots

-2

u/Mean-Bison-1701 2d ago

to be fair its a CLI diff tool, a screenshot would just be a couple lines of red and green terminal text

1

u/hieuphung97 2d ago

Having an in-flight gate is genuinely useful. Catching bad AST rewrites before disk mutation prevents hot-reloading watchers from choking on truncated files while the agent is still running.