0
342
近 7 天 342
35.6
生态多维模型
18 小时前
2026-10-20
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-tiny-goal@0.1.4"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-tiny-goal@0.1.4"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D opencode-tiny-goalOpenCode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
Give opencode a goal, and it keeps working until the goal is done.
For opencode 2.x.
Install
opencode plugin add opencode-tiny-goal
Restart opencode.
Use
/goal make all tests pass
That's it. When opencode stops before the goal is done, it gets nudged to keep going. When the goal is done, it stops.
| Command | What it does |
|---|---|
/goal <text> |
Set a goal and start |
/goal |
Show the goal |
/goal pause |
Stop nudging, keep the goal |
/goal resume |
Start nudging again |
/goal clear |
Drop the goal |
Good to know:
- It doesn't nudge while subagents are running.
- While a command runs, it nudges at most once every
maxShellMinutes, because opencode wakes itself up when the command ends. The plugin can't tell a command opencode waits on from one left running on purpose (like a dev server), so it doesn't stay quiet forever. - Press Esc to stop it. It picks up again when you write a message.
- If opencode ignores 5 nudges in a row, the goal pauses. Use
/goal resume. - Goals survive a restart of opencode.
Settings (optional)
{
"plugins": [
{
"package": "opencode-tiny-goal",
"options": { "maxUnansweredReminders": 5, "maxWaitMinutes": 30, "maxShellMinutes": 5 }
}
]
}
| Option | Default | Meaning |
|---|---|---|
maxUnansweredReminders |
5 | Ignored nudges before the goal pauses |
maxWaitMinutes |
30 | Longest opencode can ask to be left alone |
maxShellMinutes |
5 | Time between nudges while a command runs |
Issues
opencode 2.x plugins are new, so an opencode update may break this. If it does, open an issue.
License
同类生态推荐
Goal
@prevalentware/opencode-goal-plugin
OpenCode goal plugin that adds Codex-style long-running goal mode, /goal commands, persistence, and TUI status for AI coding agents.
Goal
opencode-goal-plugin
Durable, guarded goal workflows for OpenCode.
Loopd
@bojackduy/opencode-loopd
Codex-inspired background goal engine for OpenCode — autonomous subagents, engine-driven loop, child worker sessions and modal TUI dashboard. Like Claude Code loop for OpenCode.