open-diff
v0.1.8
Published
A modern diff review tool for OpenCode with Svelte + Monaco Editor
Maintainers
Readme
Open Diff
This project is based on pi-diff-review.
A modern diff review tool for OpenCode with Svelte + Monaco Editor.
Features
- Git Diff Review: Review working tree changes against HEAD
- Last Commit Review: Review the last commit against its parent
- All Files View: Browse all files in the repository
- Monaco Editor: Full-featured diff editor with syntax highlighting
- Comments: Add inline comments and overall feedback
- File Tree: Collapsible sidebar with search and progress tracking
Installation
Via NPM (Recommended)
npm install -g open-diffThen register the command and add to your OpenCode configuration:
curl -fsSL https://raw.githubusercontent.com/yourusername/open-diff/main/scripts/install.sh | bashAdd to your OpenCode config:
{
"plugin": ["open-diff"]
}Local Development
For developing or testing open-diff locally:
git clone https://github.com/yourusername/open-diff.git
cd open-diff
./scripts/install-local.shThis will:
- Build the project
- Copy the plugin to
~/.config/opencode/plugins/open-diff/ - Register the
/diff-reviewcommand
Then add to OpenCode:
{
"plugin": ["open-diff"]
}Usage
Once installed, use the slash command in OpenCode:
/diff-reviewThis will:
- Open a review window in your browser
- Show all changed files in a sidebar
- Let you review diffs with full syntax highlighting
- Add comments on specific lines or overall
- Submit feedback back to your OpenCode session
Commands
/diff-review- Open the diff review UI for current git changes
Development
Start Dev Server
npm run devOpens at http://localhost:5173
Build for Production
npm run buildCreates compiled backend in dist/ and bundled frontend in dist/web/
Type Checking
npm run checkRequirements
- Node.js 18+
- Git repository
- OpenCode
Keywords
opencode, opencode-plugin, diff, review, git, code-review, monaco-editor, svelte
