Loading...
Loading...
Compare original and translation side by side
npm i -g opencode-ai@latestbrew install anomalyco/tap/opencodeopencode auth loginopencode auth listpty=truenpm i -g opencode-ai@latestbrew install anomalyco/tap/opencodeopencode auth loginopencode auth listpty=trueterminal(command="which -a opencode")
terminal(command="opencode --version")terminal(command="$HOME/.opencode/bin/opencode run '...'", workdir="~/project", pty=true)terminal(command="which -a opencode")
terminal(command="opencode --version")terminal(command="$HOME/.opencode/bin/opencode run '...'", workdir="~/project", pty=true)opencode runterminal(command="opencode run 'Add retry logic to API calls and update tests'", workdir="~/project")-fterminal(command="opencode run 'Review this config for security issues' -f config.yaml -f .env.example", workdir="~/project")--thinkingterminal(command="opencode run 'Debug why tests fail in CI' --thinking", workdir="~/project")terminal(command="opencode run 'Refactor auth module' --model openrouter/anthropic/claude-sonnet-4", workdir="~/project")opencode runterminal(command="opencode run 'Add retry logic to API calls and update tests'", workdir="~/project")-fterminal(command="opencode run 'Review this config for security issues' -f config.yaml -f .env.example", workdir="~/project")--thinkingterminal(command="opencode run 'Debug why tests fail in CI' --thinking", workdir="~/project")terminal(command="opencode run 'Refactor auth module' --model openrouter/anthropic/claude-sonnet-4", workdir="~/project")terminal(command="opencode", workdir="~/project", background=true, pty=true)terminal(command="opencode", workdir="~/project", background=true, pty=true)
**Important:** Do NOT use `/exit` — it is not a valid OpenCode command and will open an agent selector dialog instead. Use Ctrl+C (`\x03`) or `process(action="kill")` to exit.
**重要提示:** 请勿使用`/exit` — 这不是有效的OpenCode命令,会打开Agent选择对话框。请使用Ctrl+C(`\x03`)或`process(action="kill")`退出。| Key | Action |
|---|---|
| Submit message (press twice if needed) |
| Switch between agents (build/plan) |
| Open command palette |
| Switch session |
| Switch model |
| New session |
| Open editor |
| Exit OpenCode |
| 按键 | 操作 |
|---|---|
| 提交消息(必要时按两次) |
| 在Agent间切换(build/plan) |
| 打开命令面板 |
| 切换会话 |
| 切换模型 |
| 新建会话 |
| 打开编辑器 |
| 退出OpenCode |
terminal(command="opencode -c", workdir="~/project", background=true, pty=true) # Continue last session
terminal(command="opencode -s ses_abc123", workdir="~/project", background=true, pty=true) # Specific sessionterminal(command="opencode -c", workdir="~/project", background=true, pty=true) # 继续上一个会话
terminal(command="opencode -s ses_abc123", workdir="~/project", background=true, pty=true) # 继续指定会话| Flag | Use |
|---|---|
| One-shot execution and exit |
| Continue the last OpenCode session |
| Continue a specific session |
| Choose OpenCode agent (build or plan) |
| Force specific model |
| Machine-readable output/events |
| Attach file(s) to the message |
| Show model thinking blocks |
| Reasoning effort (high, max, minimal) |
| Name the session |
| Connect to a running opencode server |
| 参数 | 用途 |
|---|---|
| 一次性执行后退出 |
| 继续上一个OpenCode会话 |
| 继续指定会话 |
| 选择OpenCode Agent(build或plan) |
| 指定特定模型 |
| 机器可读的输出/事件 |
| 向消息附加文件 |
| 显示模型思考块 |
| 推理强度(high, max, minimal) |
| 为会话命名 |
| 连接到运行中的opencode服务器 |
terminal(command="opencode --version")terminal(command="opencode auth list")opencode run '...'opencodebackground=true, pty=trueprocess(action="poll"|"log")process(action="submit", ...)process(action="write", data="\x03")process(action="kill")terminal(command="opencode --version")terminal(command="opencode auth list")opencode run '...'opencodebackground=true, pty=trueprocess(action="poll"|"log")process(action="submit", ...)process(action="write", data="\x03")process(action="kill")terminal(command="opencode pr 42", workdir="~/project", pty=true)terminal(command="REVIEW=$(mktemp -d) && git clone https://github.com/user/repo.git $REVIEW && cd $REVIEW && opencode run 'Review this PR vs main. Report bugs, security risks, test gaps, and style issues.' -f $(git diff origin/main --name-only | head -20 | tr '\n' ' ')", pty=true)terminal(command="opencode pr 42", workdir="~/project", pty=true)terminal(command="REVIEW=$(mktemp -d) && git clone https://github.com/user/repo.git $REVIEW && cd $REVIEW && opencode run 'Review this PR vs main. Report bugs, security risks, test gaps, and style issues.' -f $(git diff origin/main --name-only | head -20 | tr '\n' ' ')", pty=true)terminal(command="opencode run 'Fix issue #101 and commit'", workdir="/tmp/issue-101", background=true, pty=true)
terminal(command="opencode run 'Add parser regression tests and commit'", workdir="/tmp/issue-102", background=true, pty=true)
process(action="list")terminal(command="opencode run 'Fix issue #101 and commit'", workdir="/tmp/issue-101", background=true, pty=true)
terminal(command="opencode run 'Add parser regression tests and commit'", workdir="/tmp/issue-102", background=true, pty=true)
process(action="list")terminal(command="opencode session list")terminal(command="opencode stats")
terminal(command="opencode stats --days 7 --models anthropic/claude-sonnet-4")terminal(command="opencode session list")terminal(command="opencode stats")
terminal(command="opencode stats --days 7 --models anthropic/claude-sonnet-4")opencodepty=trueopencode run/exitprocess(action="log", session_id="<id>")opencodepty=trueopencode run/exitprocess(action="log", session_id="<id>")terminal(command="opencode run 'Respond with exactly: OPENCODE_SMOKE_OK'")OPENCODE_SMOKE_OKterminal(command="opencode run 'Respond with exactly: OPENCODE_SMOKE_OK'")OPENCODE_SMOKE_OKopencode runprocess/exitopencode runprocess/exit