Loading...
Loading...
Delegate coding to OpenCode CLI (features, PR review).
npx skill4agent add nousresearch/hermes-agent opencodenpm 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)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)
# Returns session_id
# Send a prompt
process(action="submit", session_id="<id>", data="Implement OAuth refresh flow and add tests")
# Monitor progress
process(action="poll", session_id="<id>")
process(action="log", session_id="<id>")
# Send follow-up input
process(action="submit", session_id="<id>", data="Now add error handling for token expiry")
# Exit cleanly — Ctrl+C
process(action="write", session_id="<id>", data="\x03")
# Or just kill the process
process(action="kill", session_id="<id>")/exit\x03process(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 |
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 session| 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 |
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 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")opencodepty=trueopencode run/exitprocess(action="log", session_id="<id>")terminal(command="opencode run 'Respond with exactly: OPENCODE_SMOKE_OK'")OPENCODE_SMOKE_OKopencode runprocess/exit