Skip to content

alekseysotnikov/brepl-opencode-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

brepl opencode plugin

Brepl integration for OpenCode - automatic Clojure syntax validation, auto-fix, and REPL evaluation.

Features

  • Pre-edit Validation - Validates Clojure syntax before files are written
  • Auto-Correction - Fixes mismatched brackets
  • Post-edit Evaluation - Evaluates files in running nREPL server

Detailed brepl features here.

Installation

1. Install brepl

Shortcut

bbin install io.github.licht1stein/brepl
brepl --help

or

Follow instruction

2. Install Plugin

Global (default)

# to `~/.config/opencode/plugins/brepl.ts`
./install.sh

Local project

./install.sh /path/to/project

Manually

Copy brepl.ts file to either

  • Global plugin directory (~/.config/opencode/plugins/)
  • Project plugin directory (.opencode/plugins/)

Usage

# Just run in your project dir
opencode

Plugin automatically validates and fixes Clojure files on Edit/Write.

Architecture

OpenCode Starts
       ↓
session.created (capture sessionId)
       ↓
┌────────────────────────────────────┐
│  Edit/Write Clojure File           | 
├────────────────────────────────────┤
│  tool.execute.before (Event)       │
│       ↓                            │
│  brepl hook validate (stdin)       │
│       ↓                            │
│  Valid? → Allow + Apply correction │
└────────────────────────────────────┘
       ↓
File Written
       ↓
┌────────────────────────────────────┐
│  tool.execute.after (Event)        │
│       ↓                            │
│  brepl hook eval (with sessionId)  │
│       ↓                            │
│  Report results                    │
└────────────────────────────────────┘
       ↓
session.deleted (cleanup backups)

License

No license

About

brepl plugin for OpenCode - automatic Clojure syntax validation, auto-fix brackets, and REPL evaluation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors