Lint Feedback
OpenCode V2 plugin that appends check-only project-local ESLint diagnostics after native edits.
4
近 30 天 +1
0
27.8
生态多维模型
2 天前
2026-10-03
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@madsoftwaredev/opencode-lint-feedback@0.1.2"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@madsoftwaredev/opencode-lint-feedback@0.1.2"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D @madsoftwaredev/opencode-lint-feedbackOpenCode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
OpenCode Plugins
Seven focused plugins for OpenCode V2.
Background subagents, live subagent visibility, session stats, lint feedback, direnv, and compaction, each in its own package.
[!NOTE] Built and maintained by MAD Software.
How It Works
OpenCode V2 loads plugins from two places. Server plugins extend sessions, tools, and shell behavior through opencode.json. TUI plugins extend the terminal interface through cli.json. Each package is independent, so install only what you want.
%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#f6f8fa', 'primaryBorderColor': '#57606a', 'primaryTextColor': '#24292f', 'lineColor': '#57606a'}}}%%
flowchart LR
S["Server plugins (opencode.json)"] --> A["background-subagent · lint-feedback · direnv · compaction-model"]
T["TUI plugins (cli.json)"] --> B["subagent-sidebar · stats · btw"]
Plugins
| Plugin | Surface | What It Does |
|---|---|---|
| Background subagent · npm | Server | Runs subagents in the background by default; explicit foreground calls still wait. |
| Subagent sidebar · npm | TUI | Shows live child and nested subagent sessions; click a row to open it. |
| Stats · npm | TUI | Shows token speed and session-wide turn and step counts in the prompt footer; toggle each in the TUI. |
| Lint feedback · npm | Server | Appends project-local ESLint diagnostics after successful edits. Checks only, never fixes. |
| direnv · npm | Server | Applies the approved direnv environment to each shell command's working directory. |
| Compaction model · npm | Server | Summarizes checkpoints with a selectable model and reasoning variant. |
/btw · npm |
TUI | Runs a side conversation in a background fork of the current session. |
Each plugin README documents its behavior, setup, and limitations.
[!WARNING] Upgrading from
0.1.0? Background subagent, subagent sidebar, lint feedback, and direnv dropped thelocal.prefix from their plugin IDs in0.1.1. npm package names are unchanged, but update any config rules that reference the old IDs (local.direnvis nowdirenv, and so on).
What This Looks Like
Session Stats in the Footer
44.4 tok/s · 3 turns · 8 steps
The stats plugin appends live token speed and session-wide turn and step counts to the prompt footer. Enable or disable each stat in cli.json, or save overrides with /stats.
Background Subagents by Default
| Without the plugin | With the plugin |
|---|---|
Every delegated task pauses the parent turn. |
Explicit |
Install
Requires OpenCode V2. Install each package you want with opencode plugin add:
# Server plugins (opencode.json)
opencode plugin add @madsoftwaredev/opencode-background-subagent
opencode plugin add @madsoftwaredev/opencode-lint-feedback
opencode plugin add @madsoftwaredev/opencode-direnv
opencode plugin add @madsoftwaredev/opencode-compaction-model
# TUI plugins (cli.json)
opencode plugin add @madsoftwaredev/opencode-subagent-sidebar
opencode plugin add @madsoftwaredev/opencode-stats
opencode plugin add @madsoftwaredev/opencode-btw
Restart the OpenCode TUI after installing a TUI plugin.
Managing installed packages
opencode plugin list
opencode plugin check
opencode plugin update
The CLI checks and updates installed packages; exact version pins remain pinned.
Configure Compaction
The compaction plugin defaults to
opencode-go/deepseek-v4.1-flash#max. To use a different connected model, set
options.model in its entry in opencode.json. Replace the package's string
entry with the object form below, preserving your other plugins:
{
"$schema": "https://opencode.ai/config.json",
"plugins": [
{
"package": "@madsoftwaredev/opencode-compaction-model",
"options": {
"model": "provider/model#variant"
}
}
]
}
Use provider/model from a connected provider; #variant is optional. On
failure, the plugin logs a diagnostic and lets OpenCode use its normal session
model for compaction. See the full compaction guide
for details and a working configuration example.
Requirements
| Plugin | Requires |
|---|---|
| direnv | direnv installed where the OpenCode server runs, plus an approved .envrc per project (direnv allow). |
| Lint feedback | Node on the shell's PATH, project-installed ESLint 9 or 10, and a flat eslint.config.* file. |
Subagent sidebar, stats, /btw |
The OpenCode terminal UI. |
Develop
Development and tests require Bun, Node.js 22+, and direnv:
git clone https://github.com/madsoftwaredev/opencode-plugins.git
cd opencode-plugins
bun install --frozen-lockfile
bun run check
bun run check runs the entrypoint build check and all package tests. Tests use
temporary projects and do not require a live OpenCode server.
To try a package directly from the latest source before a release:
opencode plugin add 'github:madsoftwaredev/opencode-plugins#main::path:packages/direnv'
Replace direnv with the package directory you want to try.
Issues and ideas are welcome in the GitHub issue tracker.
Maintainers: Publishing Releases
All seven packages share one version. To prepare a release, update version in
the root manifest and each packages/*/package.json, refresh the lockfile, and
run the checks:
bun install
bun run check
npm pack --workspaces --dry-run
Commit the version bump and push a matching tag. For example, after changing
every package to 0.1.2:
git add package.json packages/*/package.json bun.lock
git commit -m "release: v0.1.2"
git tag v0.1.2
git push origin main v0.1.2
The release workflow verifies the packages and
publishes them with provenance. Configure npm Trusted Publishing for each
package with GitHub organization madsoftwaredev, repository
opencode-plugins, workflow filename release.yml, and direct npm publish
enabled. Trusted Publishing requires Node.js 22.14.0+ and npm 11.5.1+ on the
runner.
License
同类生态推荐
Permission Reviewer
opencode-permission-reviewer
Policy-aware permission reviewer for OpenCode V1 and V2
Jev Router
@robertn702/opencode-jev-router
Adaptive reasoning effort for OpenCode V2 with request-local GPT-6 model selection
Windows Encoding
opencode-windows-encoding
OpenCode V2 plugin to fix UTF-8 encoding issues in PowerShell on Windows