opencode-meat
v0.2.0
Published
First-class OpenCode V2 integration for meat reading diffs
Readme
opencode-meat
First-class OpenCode V2 integration for meat.
It adds two integrations:
- A native
meattool agents can call when explicitly asked - A TUI
/meataction that runs the binary directly, without sending a prompt to an agent
The TUI action accepts /meat, /meat staged, /meat HEAD, or /meat main...HEAD. Its result is inserted into the active session as a synthetic message and does not resume the model.
Install
Install the meat binary first:
go install meat.dev/cmd/meat@latestAdd the server plugin to opencode.json for the native tool:
{
"$schema": "https://opencode.ai/config.json",
"plugins": ["opencode-meat"]
}Add the TUI entrypoint to ~/.config/opencode/cli.json for the direct slash action:
{
"plugins": ["opencode-meat"]
}The server and TUI are separate processes, so each reads its plugin configuration independently. If cli.json already contains settings, add the plugins field without replacing them.
For local server development from the meat repository, use:
{
"$schema": "https://opencode.ai/config.json",
"plugins": ["./opencode/index.ts"]
}For the local TUI entrypoint, add its absolute path to ~/.config/opencode/cli.json:
{
"plugins": ["/absolute/path/to/meat/opencode/tui.ts"]
}Both integrations run meat in the active session's project directory. Meat's normal credentials and cache configuration apply unchanged.
If meat is not on either process's PATH, configure its absolute path in both files:
{
"plugins": [
{
"package": "opencode-meat",
"options": {
"binary": "/home/me/.local/bin/meat",
"model": "gpt-5.6-luna",
"prewarm": {
"enabled": true,
"debounceMs": 1500
}
}
}
]
}model pins the cache identity used by foreground and background runs. Set the same option in the TUI plugin entry in cli.json so /meat reads the prewarmed result.
Server-side prewarm is optional and disabled by default. When enabled, successful edit, patch, write, and shell calls schedule a worktree reading diff in the background. Repeated changes are debounced, obsolete runs are cancelled, unchanged diffs are skipped, and an idle session starts a pending run immediately. Prewarm failures are silent; a normal meat tool or /meat invocation remains the fallback.
